尝试在 Hartl 的教程中运行 rspec 时出现此错误。我用谷歌搜索了这个错误,但它从来都不是针对特定版本的,而且修复程序实际上并没有解决我的问题。
/Users/Jimbo/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/lib/nokogiri.rb:28:in `require': dlopen(/Users/Jimbo/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri- 1.6.0/lib/nokogiri/nokogiri.bundle, 9): Library not loaded: /Users/Jimbo/.bundler/tmp/22862/gems/nokogiri-1.6.0/ports/i686-apple- darwin11/libxml2/2.8.0/lib/libxml2.2.dylib (LoadError)
Referenced from: /Users/Jimbo/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri- 1.6.0/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/Jimbo/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle
from /Users/Jimbo/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/lib/nokogiri.rb:28:in `<top (required)>'
from /Users/Jimbo/.rvm/gems/ruby-2.0.0-p247/gems/capybara-2.1.0/lib/capybara.rb:2:in `require'
from /Users/Jimbo/.rvm/gems/ruby-2.0.0-p247/gems/capybara-2.1.0/lib/capybara.rb:2:in `<top (required)>'
from /Users/Jimbo/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Users/Jimbo/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/Jimbo/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Users/Jimbo/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /Users/Jimbo/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Users/Jimbo/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Users/Jimbo/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'