After doing a bundle install, I run 'rails s' it runs into this error.
$ rails s
/开发者_Go百科Users/XXXX/.rvm/gems/ruby-1.8.7-p352@r3/gems/json-1.5.3/ext/json/ext/json/ext/parser.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin10.8.0]
Abort trap
Any help would be greatly appreciated
rvm gemset empty
rvm use ree@my-gemset
gem install bundler
bundle install
This solved the issue for me. Must be some extension got compiled against the wrong version of Ruby (in my case). Hope it works for you!
If you are not using RVM, I found this command to uninstall all gems:
- '
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
' gem install bundler
bundle install
Also you might want to try using bundle exec rails s
Your gemset is not compiled for the version of ruby you are using. I found this worked for me:
rvm gemset empty
rvm gemset create your_gem_set_name
rvm use 1.8.7@your_gem_set_name --default
bundle install
The new version of Ruby 1.8.7 caused this issue. Had to downgrade back to one from the past.
Pull out the json gem
and see if things work. If they don't then I'm lost. If they do work then you have to figure out why that gem won't work with your version of rails and your version of ruby.
If you look in Gemfile.lock you will see a "treeview" of gems, and the nested ones are ones that were pulled in by a dependency from the one they're nested under. See if you are using this json gem for something important or if it can go.
I had a very similar issue when I took my rails 3.0.9 and tried to deploy it on a host that only had 3.0.3 on it. It turned out that the json gem was for some 3.0.9 version of a rails gem...maybe ActiveSupport? I can't remember that part.
Can you tell us what version of rails you're using?
精彩评论