rvm conflit with sqlite3

2019-04-19 07:53发布

$: /Users/dev/.rvm/gems/ruby-1.9.2-head@rails3/gems/sqlite3-ruby-1.3.1/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

Abort trap

It's seem that ruby is not the correct version (1.8.7) but :

$: ruby - v
$: ruby 1.9.2dev (2010-07-15 revision 28653) [x86_64-darwin10.4.0]



$: gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.0.beta4, 3.0.0.beta3)
actionpack (3.0.0.beta4, 3.0.0.beta3)
activemodel (3.0.0.beta4, 3.0.0.beta3)
activerecord (3.0.0.beta4, 3.0.0.beta3)
activeresource (3.0.0.beta4, 3.0.0.beta3)
activesupport (3.0.0.beta4, 3.0.0.beta3)
arel (0.4.0, 0.3.3)
builder (2.1.2)
bundler (0.9.26)
erubis (2.6.6)
i18n (0.4.1, 0.3.7)
mail (2.2.5)
memcache-client (1.8.5)
mime-types (1.16)
polyglot (0.3.1)
rack (1.1.0)
rack-mount (0.6.9)
rack-test (0.5.4)
rails (3.0.0.beta4, 3.0.0.beta3)
railties (3.0.0.beta4, 3.0.0.beta3)
rake (0.8.7)
rdoc (2.5.9)
sqlite3-ruby (1.3.1)
text-format (1.0.0)
text-hyphen (1.0.0)
thor (0.13.8)
treetop (1.4.8)
tzinfo (0.3.22)
will_paginate (3.0.pre)

more info :

$: ~ dev$ ruby -v
ruby 1.9.2dev (2010-07-15 revision 28653) [x86_64-darwin10.4.0]
$ :~ dev$ rails -v



/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:827:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:261:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:68:in `gem'
from /usr/bin/rails:18

Any ideas ?

Thanks very much :)

8条回答
Animai°情兽
2楼-- · 2019-04-19 08:14

You might need to run

rvm reload
查看更多
太酷不给撩
3楼-- · 2019-04-19 08:20

I Had the same problem when using ree-1.8.7-2011.03. (Ruby enterprise Edition)

I uninstalled the sqlite3 gems then I ran:

gem install sqlite3

and it worked. Note that the sqlite3-ruby gem now recommends to use 'sqlite3' now.

查看更多
Lonely孤独者°
4楼-- · 2019-04-19 08:20

Same problem after a bunch of updates (rvm to 1.5.2 and ruby to 1.9.2-p180)

Console restart did not work for me, updating to rails 3.0.6 changed the error to a seg error of mysql2 instead of sqlite3, re-installing mysql2 did the trick for me finally.

Regards Michael

查看更多
霸刀☆藐视天下
5楼-- · 2019-04-19 08:27

I encountered this exact error in zsh and MacVim, and eventually tracked it back to this RVM issue. The solution was to move the RVM sourcing I had in .zshrc to .zshenv. Worked immediately. Just posting on the off chance someone stumbles across this the way I did.

查看更多
地球回转人心会变
6楼-- · 2019-04-19 08:32

Had the same issue after moving to 1.9.2p0, but restarting the console on Snow Leopard did the trick. Seems rvm might have gotten confused.

查看更多
男人必须洒脱
7楼-- · 2019-04-19 08:34

There is a known issue with zsh, rvm and vim.

The latest solution is to set the shell to sh in your .vimrc

set shell=sh

This blog has all the solutions listed

查看更多
登录 后发表回答