Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Rake db:migrate error - nokogiri incompatible version

Hi, I'm making the Todo list app with rails 4 and run into some database problems. The rake db:migrate RAILS_ENV=test command fails to complete because of the nokogiri gem.

Reason: Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0

I've looked in stackoverflow and found that I could uninstall nokogiri. Will try and then get back to post the output. Anyone had the same problem? Tx!

2 Answers

Got it!

I'm having this problem what was the fix?

The problems that are popping up for me is:

Sulcalibur@Ultra-Magnus:~/Documents/Projects/Treehouse/odot$ bin/rake db:migrate RAILS_ENV=test
rake aborted!
dlopen(/Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.1/lib/nokogiri/nokogiri.bundle, 9): Library not loaded: /Users/Sulcalibur/.bundler/tmp/22139/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0/lib/libxml2.2.dylib
  Referenced from: /Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.1/lib/nokogiri/nokogiri.bundle
  Reason: Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0 - /Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.1/lib/nokogiri/nokogiri.bundle
/Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.1/lib/nokogiri.rb:28:in `require'
/Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.1/lib/nokogiri.rb:28:in `<top (required)>'
/Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/capybara-2.1.0/lib/capybara.rb:2:in `require'
/Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/capybara-2.1.0/lib/capybara.rb:2:in `<top (required)>'
/Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `require'
/Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `each'
/Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `block in require'
/Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `each'
/Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `require'
/Users/Sulcalibur/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.5.2/lib/bundler.rb:131:in `require'
/Users/Sulcalibur/Documents/Projects/Treehouse/odot/config/application.rb:7:in `<top (required)>'
/Users/Sulcalibur/Documents/Projects/Treehouse/odot/Rakefile:4:in `require'
/Users/Sulcalibur/Documents/Projects/Treehouse/odot/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

As I'm new to this I have no idea what is going on. :(