我正在研究Michael Hartl的Ruby on Rails教程,并参考了3.2.1节 ,他首先介绍了测试驱动开发和Rspec的使用。 我相信我忠实地遵循教程(包括按照指示编辑spec_helper.rb和static_pages_spec.rb文件)。 我到了指示我跑的地步:
$ bundle exec spec spec/requests/static_pages_spec.rb我得到以下消息作为回应:
无效选项 - 警告
请使用--help获取有效选项列表
不可否认,我对所有这一切都很陌生,但我无法找到这个特定错误信息的含义(以及我应该做的)的答案。
我的Gemfile:
ruby '2.0.0' #ruby-gemset=railstutorial_rails_4_0 gem 'rails', '4.0.5' group :development, :test do gem 'sqlite3', '1.3.8' gem 'rspec-rails', '2.13.1' end group :test do gem 'selenium-webdriver', '2.35.1' gem 'capybara', '2.1.0' end gem 'sass-rails', '4.0.1' gem 'uglifier', '2.1.1' gem 'coffee-rails', '4.0.1' gem 'jquery-rails', '3.0.4' gem 'turbolinks', '1.1.1' gem 'jbuilder', '1.0.2' group :doc do gem 'sdoc', '~> 0.4.0', require: false end group :production do gem 'pg', '0.15.1' gem 'rails_12factor', '0.0.2' endI am working my way through Michael Hartl's Ruby on Rails Tutorial, and have come to section 3.2.1, where he first introduces test driven development and the use of Rspec. I believe I am faithfully following the tutorial (including editing the spec_helper.rb and static_pages_spec.rb files as directed). I get to the point where I am directed to run:
$ bundle exec spec spec/requests/static_pages_spec.rbAnd I get the following message in response:
invalid option --warnings
please use --help for a listing of valid options
Admittedly, I am pretty new to all of this, but I have not been able to find an answer as to what this particular error message means (and what I am supposed to do).
My Gemfile:
ruby '2.0.0' #ruby-gemset=railstutorial_rails_4_0 gem 'rails', '4.0.5' group :development, :test do gem 'sqlite3', '1.3.8' gem 'rspec-rails', '2.13.1' end group :test do gem 'selenium-webdriver', '2.35.1' gem 'capybara', '2.1.0' end gem 'sass-rails', '4.0.1' gem 'uglifier', '2.1.1' gem 'coffee-rails', '4.0.1' gem 'jquery-rails', '3.0.4' gem 'turbolinks', '1.1.1' gem 'jbuilder', '1.0.2' group :doc do gem 'sdoc', '~> 0.4.0', require: false end group :production do gem 'pg', '0.15.1' gem 'rails_12factor', '0.0.2' end最满意答案
那是一个非常古老的rspec版本。 我建议更新一些(或者你可以编辑你的.rspec文件来删除--warnings)。
That's a pretty old version of rspec. I'd suggest getting something newer (or you could edit your .rspec file to remove --warnings).
更多推荐
发布评论