2012-11-01 38 views
4

我遇到了這個sqlite3問題,不知道爲什麼;我瀏覽了這個論壇好幾個小時,並且找不到報道的類似問題。 我使用紅寶石1.9.3,但錯誤消息似乎調用紅寶石1.8.7;我甚至卸載紅寶石1.8.7然後sqlite3的,然後重新安裝,但沒有解決不了問題sqlite3_native.so:[BUG]分割錯誤

我運行軌道3.2.8

[email protected] [~/rails_apps/myapp]# rails -v 
Rails 3.2.8 

和Ruby 1.9.3

[email protected] [~/rails_apps/myapp]# ruby -v 
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux] 

卸載紅寶石1.8.7

[email protected] [~/rails_apps/myapp]# rvm uninstall 1.8.7 
/home3/user1/.rvm/src/ruby-1.8.7-p371 has already been removed. 
/home3/user1/.rvm/rubies/ruby-1.8.7-p371 has already been removed. 

卸載的sqlite3

[email protected] [~/rails_apps/myapp]# gem uninstall sqlit3 
INFO: gem "sqlit3" is not installed 
[email protected] [~/rails_apps/myapp]# gem uninstall sqlite3 

You have requested to uninstall the gem: 
    sqlite3-1.3.6 
i18n-0.6.1 depends on [sqlite3 (>= 0)] 
If you remove this gems, one or more dependencies will not be met. 
Continue with Uninstall? [Yn] Y 
Successfully uninstalled sqlite3-1.3.6 

重新安裝sqlite3的

[email protected] [~/rails_apps/myapp]# gem install sqlite3 
Fetching: sqlite3-1.3.6.gem (100%) 
Building native extensions. This could take a while... 
Successfully installed sqlite3-1.3.6 
1 gem installed 
Installing ri documentation for sqlite3-1.3.6... 
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for CHANGELOG.rdoc, skipping 
Installing RDoc documentation for sqlite3-1.3.6... 
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for CHANGELOG.rdoc, skipping 

相同的錯誤消息再次

[email protected] [~/rails_apps/myapp]# rails generate scaffold project customer:string 
/home3/user1/ruby/gems/gems/sqlite3-1.3.6/lib/sqlite3/sqlite3_native.so: [BUG] Segmentation fault 
ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2012.02 

Aborted 
[email protected] [~/rails_apps/myapp]# 

任何人都可以請幫助?

+0

請告訴我們的'的輸出,ruby' –

+0

瑞安感謝您的及時回覆的博客。 [email protected] [〜/ rails_apps/myapp]#which ruby​​ /home3/user1/.rvm/rubies/ruby-1.9.3-p286/bin/ruby [email protected] [〜/ rails_apps/myapp ]# – rh4games

回答

3

我有完全相同的問題,我發現這個解決方案在線爲我工作。

gem list | cut -d" " -f1 | xargs gem uninstall -aIx 
gem install bundler 
bundle install 

這將卸載所有的寶石,然後安裝打包機,然後安裝您的項目的所有寶石。顯然你需要從一個rails項目運行bundle install。

這裏就是我找到了解決辦法http://www.zlu.me/blog/2012/10/16/segmentation-fault-with-rails-and-json/