开发者

Segmentation fault when running 'rails s'

开发者 https://www.devze.com 2023-03-29 08:19 出处:网络
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] Seg

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


  1. rvm gemset empty
  2. rvm use ree@my-gemset
  3. gem install bundler
  4. 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:

  1. 'gem list | cut -d" " -f1 | xargs gem uninstall -aIx'
  2. gem install bundler
  3. 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:

  1. rvm gemset empty
  2. rvm gemset create your_gem_set_name
  3. rvm use 1.8.7@your_gem_set_name --default
  4. 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?

0

精彩评论

暂无评论...
验证码 换一张
取 消