简体   繁体   中英

Problem with Ruby, Rails, ZSH and RVM

When I go into my rails app folder and write:

which ruby

I get this:

/Users/gugguson/.rvm/rubies/ruby-head/bin/ruby

When I write:

ruby -v

I get this:

ruby 1.9.3dev (2010-09-25 trunk 29341) [x86_64-darwin10.4.0]

Hovever when I run my app with:

rails s

I get an error indication it is using ruby 1.8.7 my app is using:

/Users/gugguson/.rvm/gems/ruby-head/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]

zsh: abort      rails s

Do you know what can be causing this?

You might be using system installed rails script, make sure that you use rails installed inside rvm and

head $(which rails)

starts with

#!/Users/gugguson/.rvm/rubies/ruby-head/bin/ruby

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM