-
-
Save unixcharles/1226596 to your computer and use it in GitHub Desktop.
Look like brew libxml2 and the one bundled with osx are fighting | |
/Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle: dlsym(0x7ffb44ee7880, Init_libxml_ruby): symbol not found - /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle (LoadError) | |
from /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/libxml-ruby-1.1.4/lib/libxml.rb:9 | |
from /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require' | |
from /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require' | |
from /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `each' | |
from /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `require' | |
from /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `each' | |
from /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `require' | |
from /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/bundler-1.0.15/lib/bundler.rb:120:in `require' | |
from /Users/unixcharles/projects/teambox/config/application.rb:7 | |
from /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/railties-3.1.0/lib/rails/commands.rb:52:in `require' | |
from /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/railties-3.1.0/lib/rails/commands.rb:52 | |
from /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/railties-3.1.0/lib/rails/commands.rb:49:in `tap' | |
from /Users/unixcharles/.rvm/gems/ruby-1.8.7-p352/gems/railties-3.1.0/lib/rails/commands.rb:49 | |
from script/rails:6:in `require' | |
from script/rails:6 | |
This fixed it for me: | |
brew update | |
brew uninstall libxml2 | |
brew install libxml2 --with-xml2-config | |
brew link libxml2 | |
gem uninstall libxml-ruby | |
bundle |
Thank you so much for this one!
No problem!
If it helps anyone:
On High Sierra, I have to follow the follow to get it to work (same as the original suggestion, but note the --force
)
brew update
brew uninstall libxml2
brew install libxml2 --with-xml2-config
brew link libxml2 --force
gem uninstall libxml-ruby
bundle
@khash this worked perfectly for me. Thanks a lot 👍
Yes. Thank you very much @khash
(y)
Worked great! Thanks @khash!
If you don't want to link libxml2
:
brew install libxml2 --with-xml2-config
gem install libxml-ruby -- --with-xml2-config=/usr/local/opt/libxml2/bin/xml2-config
bundle
@tamalw I owe you so many beers!
Since this was a top result while googling, I'll share my experience resolving this and the solution I found.
System: OSX 10.14
Homebrew: 2.7.2
The flag --with-xml2-config
doesn't seem to work anymore with brew (I got a usage error with the command above). This comment from a Twilio issue was helpful in that it explained brew isn't needed and how to figure out the correct path for the libxml2 headers using xcrun
gem install libxml-ruby -v '3.2.1' -- --with-xml2-include=`xcrun --show-sdk-path`/usr/include/libxml2
All credit to @CodingMarkus and @raldred for their comments on the Twilio issue #315
Glad this cloud be helpful to someone else.
That's what I did, I just removed them all