Created
January 4, 2016 13:17
-
-
Save takuyan/8be0b9ed7a5e5d1f6fc9 to your computer and use it in GitHub Desktop.
ruby error on rails s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ r s | |
dyld: lazy symbol binding failed: Symbol not found: _rb_data_object_alloc | |
Referenced from: /Users/takuyan/dev/github/scrum/vendor/bundle/gems/nokogiri-1.6.6.2/lib/nokogiri/nokogiri.bundle | |
Expected in: flat namespace | |
dyld: Symbol not found: _rb_data_object_alloc | |
Referenced from: /Users/takuyan/dev/github/scrum/vendor/bundle/gems/nokogiri-1.6.6.2/lib/nokogiri/nokogiri.bundle | |
Expected in: flat namespace | |
[1] 30819 trace trap rails s |
Author
takuyan
commented
Jan 4, 2016
For fellow devs arriving here after searching for dyld: Symbol not found: _rb_data_object_alloc
:
- Check your ruby version
ruby -v
for the project you're trying to run is the one you intended. - You may want to create a
.ruby-version
file for rbenv/rvm in the project root to set the version. After creating.ruby-version
, Check thatruby -v
gives the version you expect. - Try whatever command (e.g.
bundle exec rails s
,bundle exec rspec
) that gave the original error ensuring that it is run with the bundle deps (usebundle exec ...
). Hopefully the error has gone. - If you still get the
dyld: Symbol not found: _rb_data_object_alloc
error, rebuild all the bundled gems with extensions from scratch for the current ruby version. This can be done by runningbundle exec gem pristine
inside the project root.
On my side, I also had to:
- delete everything under vendor/bundle directory:
rm -Rf vendor/bundle/*
- run
bundle install
yes, also for me, delete the .bundle
dir and rebundle fixed it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment