出于某种原因,我无法在rspec中运行我的测试。堆栈溢出的帖子说它可能是命名空间问题,但在我的代码库中没有任何迹象表明(在我的视图中)。正在运行rspec spec
我收到以下错误。
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.0
/Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/xpath-2.0.0/lib/xpath/dsl.rb:1:in `<top (required)>': XPath is not a module (TypeError)
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/xpath-2.0.0/lib/xpath.rb:3:in `require'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/xpath-2.0.0/lib/xpath.rb:3:in `<top (required)>'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/capybara-2.2.1/lib/capybara.rb:3:in `require'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/capybara-2.2.1/lib/capybara.rb:3:in `<top (required)>'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545@global/gems/bundler-1.6.0/lib/bundler/runtime.rb:76:in `require'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545@global/gems/bundler-1.6.0/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545@global/gems/bundler-1.6.0/lib/bundler/runtime.rb:72:in `each'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545@global/gems/bundler-1.6.0/lib/bundler/runtime.rb:72:in `block in require'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545@global/gems/bundler-1.6.0/lib/bundler/runtime.rb:61:in `each'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545@global/gems/bundler-1.6.0/lib/bundler/runtime.rb:61:in `require'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545@global/gems/bundler-1.6.0/lib/bundler.rb:132:in `require'
from /Users/garytsai/Projects/reader-tool/config/application.rb:13:in `<top (required)>'
from /Users/garytsai/Projects/reader-tool/config/environment.rb:2:in `require'
from /Users/garytsai/Projects/reader-tool/config/environment.rb:2:in `<top (required)>'
from /Users/garytsai/Projects/reader-tool/spec/spec_helper.rb:3:in `require'
from /Users/garytsai/Projects/reader-tool/spec/spec_helper.rb:3:in `<top (required)>'
from /Users/garytsai/Projects/reader-tool/spec/controllers/readers_controller_spec.rb:1:in `require'
from /Users/garytsai/Projects/reader-tool/spec/controllers/readers_controller_spec.rb:1:in `<top (required)>'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `load'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `block in load_spec_files'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `each'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `load_spec_files'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:22:in `run'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:80:in `run'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:17:in `block in autorun'
对此有何修复?我已经为我需要删除的东西查找了我的gemfile,但似乎没有任何迹象表明或与rspec冲突
来源&#39; https://rubygems.org&#39;
ruby "1.9.3"
gem 'rails', '3.2.14'
gem 'jquery-rails'
gem 'simple_form'
gem 'pg'
gem 'thin'
gem 'XMLCanonicalizer'
gem 'humanize'
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'debugger'
gem 'quiet_assets'
gem 'sextant'
end
group :test do
gem 'capybara'
gem 'selenium-webdriver'
gem 'shoulda-matchers'
gem 'simplecov'
gem 'database_cleaner'
end
group :development, :test do
gem 'rspec-rails'
gem "factory_girl_rails", "~> 4.0"
gem 'faker'
gem "rack_session_access"
gem 'populator'
gem 'dotenv'
end
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'twitter-bootstrap-rails'
gem "less-rails"
gem "therubyracer"
end