我目前正在使用rails 4.1.1和ruby 2.1.1运行rspec但是我得到了一堆与gems相关的错误,甚至没有进入模型。
这是一个新版本的rspec,它有一个spec_helper.rb以及一个rails_helper.rb
您需要使用该文件中的rails_helper.rb随后引用spec_helper.rb
我还没有对这两个帮助文件进行任何更改,并且刚开始使用我的项目。非常感谢任何帮助/信息!
$ bundle exec rspec
/.rvm/gems/ruby-2.1.1/gems/simplecov-html-0.8.0/lib/simplecov-html.rb:58: warning: possibly useless use of a variable in void context
/.rvm/gems/ruby-2.1.1/gems/gibbon-1.1.3/lib/gibbon/api_category.rb:75: warning: method redefined; discarding old api_key=
/.rvm/gems/ruby-2.1.1/gems/rack-cors-0.2.9/lib/rack/cors.rb:71: warning: shadowing outer local variable - logger
/.rvm/gems/ruby-2.1.1/gems/rack-cors-0.2.9/lib/rack/cors.rb:174: warning: assigned but unused variable - x_origin
/.rvm/gems/ruby-2.1.1/gems/stripe-1.14.0/lib/stripe.rb:172: warning: assigned but unused variable - ex
/.rvm/gems/ruby-2.1.1/gems/rest-client-1.6.7/lib/restclient/exceptions.rb:157: warning: assigned but unused variable - message
/.rvm/gems/ruby-2.1.1/gems/rest-client-1.6.7/lib/restclient/exceptions.rb:167: warning: assigned but unused variable - message
/.rvm/gems/ruby-2.1.1/gems/rest-client-1.6.7/lib/restclient/response.rb:11: warning: method redefined; discarding old body
/.rvm/gems/ruby-2.1.1/gems/rest-client-1.6.7/lib/restclient/payload.rb:47: warning: mismatched indentations at 'end' with 'case' at 40
/.rvm/gems/ruby-2.1.1/gems/warden-1.2.3/lib/warden/proxy.rb:72: warning: assigned but unused variable - opts
/.rvm/gems/ruby-2.1.1/gems/warden-1.2.3/lib/warden/proxy.rb:104: warning: assigned but unused variable - opts
/.rvm/gems/ruby-2.1.1/gems/warden-1.2.3/lib/warden/manager.rb:22: warning: `*' interpreted as argument prefix
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/doublespeak/double.rb:50: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/doublespeak/double.rb:50: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/doublespeak/double.rb:50: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/doublespeak/double.rb:50: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/doublespeak/double_collection.rb:42: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/doublespeak/double_collection.rb:42: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/doublespeak/object_double.rb:28: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/doublespeak/proxy_implementation.rb:26: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/doublespeak/stub_implementation.rb:30: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/independent/delegate_matcher.rb:89: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/independent/delegate_matcher.rb:89: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/independent/delegate_matcher.rb:89: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/independent/delegate_matcher.rb:89: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/independent/delegate_matcher.rb:89: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/independent/delegate_matcher.rb:89: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/independent/delegate_matcher.rb:89: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/independent/delegate_matcher.rb:89: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/independent/delegate_matcher/stubbed_target.rb:30: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/independent/delegate_matcher/stubbed_target.rb:30: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_model/allow_value_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_model/allow_value_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_model/allow_value_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_model/allow_value_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_model/allow_value_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_model/allow_value_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_model/allow_value_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_model/allow_value_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_model/allow_value_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_model/disallow_value_matcher.rb:51: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_model/have_secure_password_matcher.rb:52: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matcher.rb:204: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matcher.rb:204: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matcher.rb:204: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matcher.rb:204: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matcher.rb:204: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matcher.rb:204: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/counter_cache_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/counter_cache_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/counter_cache_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/inverse_of_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/inverse_of_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/inverse_of_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/order_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/order_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/order_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/through_matcher.rb:53: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/through_matcher.rb:53: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/through_matcher.rb:53: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/dependent_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/dependent_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/dependent_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/source_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/source_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/source_matcher.rb:31: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/model_reflector.rb:51: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/model_reflector.rb:51: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/model_reflection.rb:49: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/model_reflection.rb:49: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/option_verifier.rb:47: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/association_matchers/option_verifier.rb:47: warning: method redefined; discarding old reflector
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/active_record/have_db_column_matcher.rb:192: warning: assigned but unused variable - expected
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/route_params.rb:19: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/rescue_from_matcher.rb:41: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/rescue_from_matcher.rb:41: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/rescue_from_matcher.rb:41: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/rescue_from_matcher.rb:41: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/callback_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/callback_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/callback_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/callback_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/callback_matcher.rb:100: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb:67: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb:67: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb:67: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb:67: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb:67: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb:67: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/shoulda-matchers-2.6.1/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb:67: warning: private attribute?
/.rvm/gems/ruby-2.1.1/gems/capybara-2.1.0/lib/capybara/dsl.rb:1: warning: loading in progress, circular require considered harmful - /.rvm/gems/ruby-2.1.1/gems/capybara-2.1.0/lib/capybara.rb
from /.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
from /.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
from /.rvm/gems/ruby-2.1.1/bin/rspec:23:in `<main>'
from /.rvm/gems/ruby-2.1.1/bin/rspec:23:in `load'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/exe/rspec:4:in `<top (required)>'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:38:in `invoke'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:70:in `run'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:85:in `run'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:97:in `setup'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `load_spec_files'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `each'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `block in load_spec_files'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `load'
from /Desktop/winesimple_ecom/spec/models/factories_spec.rb:1:in `<top (required)>'
from /Desktop/winesimple_ecom/spec/models/factories_spec.rb:1:in `require'
from /Desktop/winesimple_ecom/spec/rails_helper.rb:7:in `<top (required)>'
from /Desktop/winesimple_ecom/spec/rails_helper.rb:7:in `require'
from /Desktop/winesimple_ecom/config/environment.rb:2:in `<top (required)>'
from /Desktop/winesimple_ecom/config/environment.rb:2:in `require'
from /Desktop/winesimple_ecom/config/application.rb:14:in `<top (required)>'
from /.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.1/lib/bundler.rb:132:in `require'
from /.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.1/lib/bundler/runtime.rb:61:in `require'
from /.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.1/lib/bundler/runtime.rb:61:in `each'
from /.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.1/lib/bundler/runtime.rb:72:in `block in require'
from /.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.1/lib/bundler/runtime.rb:72:in `each'
from /.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.1/lib/bundler/runtime.rb:76:in `require'
from /.rvm/gems/ruby-2.1.1/gems/capybara-webkit-1.1.1/lib/capybara-webkit.rb:1:in `<top (required)>'
from /.rvm/gems/ruby-2.1.1/gems/capybara-webkit-1.1.1/lib/capybara-webkit.rb:1:in `require'
from /.rvm/gems/ruby-2.1.1/gems/capybara-webkit-1.1.1/lib/capybara/webkit.rb:1:in `<top (required)>'
from /.rvm/gems/ruby-2.1.1/gems/capybara-webkit-1.1.1/lib/capybara/webkit.rb:1:in `require'
from /.rvm/gems/ruby-2.1.1/gems/capybara-2.1.0/lib/capybara.rb:5:in `<top (required)>'
from /.rvm/gems/ruby-2.1.1/gems/capybara-2.1.0/lib/capybara.rb:295:in `<module:Capybara>'
from /.rvm/gems/ruby-2.1.1/gems/capybara-2.1.0/lib/capybara.rb:295:in `require'
from /.rvm/gems/ruby-2.1.1/gems/capybara-2.1.0/lib/capybara/dsl.rb:1:in `<top (required)>'
from /.rvm/gems/ruby-2.1.1/gems/capybara-2.1.0/lib/capybara/dsl.rb:1:in `require'
/.rvm/gems/ruby-2.1.1/gems/capybara-2.1.0/lib/capybara/selenium/driver.rb:109: warning: assigned but unused variable - a
/.rvm/gems/ruby-2.1.1/gems/warden-1.2.3/lib/warden/manager.rb:72: warning: method redefined; discarding old serialize
/.rvm/gems/ruby-2.1.1/gems/warden-1.2.3/lib/warden/session_serializer.rb:14: warning: previous definition of serialize was here
/.rvm/gems/ruby-2.1.1/gems/warden-1.2.3/lib/warden/manager.rb:87: warning: method redefined; discarding old deserialize
/.rvm/gems/ruby-2.1.1/gems/warden-1.2.3/lib/warden/session_serializer.rb:18: warning: previous definition of deserialize was here
/.rvm/gems/ruby-2.1.1/gems/mail-2.5.4/lib/mail/network/delivery_methods/sendmail.rb:53: warning: shadowing outer local variable - to
/.rvm/gems/ruby-2.1.1/gems/factory_girl-4.4.0/lib/factory_girl/find_definitions.rb:16: warning: File.exists? is a deprecated name, use File.exist? instead
/.rvm/gems/ruby-2.1.1/gems/factory_girl-4.4.0/lib/factory_girl/find_definitions.rb:16: warning: File.exists? is a deprecated name, use File.exist? instead
/.rvm/gems/ruby-2.1.1/gems/factory_girl-4.4.0/lib/factory_girl/find_definitions.rb:16: warning: File.exists? is a deprecated name, use File.exist? instead
Coverage report generated for RSpec to /Desktop/winesimple_ecom/coverage. 76 / 113 LOC (67.26%) covered.
/.rvm/gems/ruby-2.1.1/gems/rspec-support-3.0.2/lib/rspec/support/version_checker.rb:28:in `raise_too_low_error': You are using capybara 2.1.0. RSpec requires version >= 2.2.0. (RSpec::Support::LibraryVersionTooLowError)
from /.rvm/gems/ruby-2.1.1/gems/rspec-support-3.0.2/lib/rspec/support/version_checker.rb:18:in `check_version!'
from /.rvm/gems/ruby-2.1.1/gems/rspec-rails-3.0.1/lib/rspec/rails/vendor/capybara.rb:13:in `<top (required)>'
from /.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /.rvm/gems/ruby-2.1.1/gems/rspec-rails-3.0.1/lib/rspec/rails.rb:9:in `<top (required)>'
from /.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Desktop/winesimple_ecom/spec/rails_helper.rb:8:in `<top (required)>'
from /Desktop/winesimple_ecom/spec/models/factories_spec.rb:1:in `require'
from /Desktop/winesimple_ecom/spec/models/factories_spec.rb:1:in `<top (required)>'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `load'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `block in load_spec_files'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `each'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `load_spec_files'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:97:in `setup'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:85:in `run'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:70:in `run'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:38:in `invoke'
from /.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/exe/rspec:4:in `<top (required)>'
from /.rvm/gems/ruby-2.1.1/bin/rspec:23:in `load'
from /.rvm/gems/ruby-2.1.1/bin/rspec:23:in `<main>'
from /.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
from /.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
答案 0 :(得分:7)
在此找到原因:https://stackoverflow.com/a/24005972/2491655
tl; dr - 正在运行$ rails g rspec:install
现在将--warnings
添加到根目录中的.rspec
文件
答案 1 :(得分:4)
该输出的一部分是警告(也许您在.rspec中打开了警告)
中间是
support / version_checker.rb:28:在`raise_too_low_error&#39;:你正在使用capybara 2.1.0。 RSpec要求版本> = 2.2.0。 (RSpec的::支持:: LibraryVersionTooLowError)
由于您使用的是rspec 3,因此您实际上需要使用capybara 2.3 - 版本2.2,但是您会收到有关弃用的匹配器语法的警告。