首先测试-ruby 00_hello解析错误:OptionParser::InvalidoOption

首先测试-ruby 00_hello解析错误:OptionParser::InvalidoOption,ruby,parsing,rspec,Ruby,Parsing,Rspec,我很难理解关于TestFirstRuby(Alex Chaffee)的第一课,我正在运行“rake”测试,并且得到了我不应该收到的错误 我已经尝试过做gem更新--system并按照前面的帖子中的建议删除空格。所有这些都没有解决问题 下面是我收到的规格和错误 我将感谢任何帮助 ruby 1.9.3p545 (2014-02-24) [i386-mingw32] C:\Users\Greice>gem list *** LOCAL GEMS *** activemodel (4.1.4

我很难理解关于TestFirstRuby(Alex Chaffee)的第一课,我正在运行“rake”测试,并且得到了我不应该收到的错误

我已经尝试过做
gem更新--system
并按照前面的帖子中的建议删除空格。所有这些都没有解决问题

下面是我收到的规格和错误

我将感谢任何帮助

ruby 1.9.3p545 (2014-02-24) [i386-mingw32]

C:\Users\Greice>gem list

*** LOCAL GEMS ***

activemodel (4.1.4)
activerecord (4.1.4)
activesupport (4.1.4)
arel (5.0.1.20140414130214)
bigdecimal (1.2.5, 1.1.0)
builder (3.2.2)
bundler (1.6.5)
diff-lcs (1.2.5)
feedtools (0.2.29)
hpricot (0.8.6)
i18n (0.6.11)
io-console (0.4.2, 0.3)
json (1.8.1, 1.5.5)
minitest (5.4.0, 2.5.1)
rake (10.3.2, 0.9.2.2)
rdoc (4.1.1, 3.9.5)
RedCloth (4.2.9 x86-mingw32)
rspec (3.0.0, 2.0.1)
rspec-core (3.0.3, 2.0.1)
rspec-expectations (3.0.3, 2.0.1)
rspec-mocks (3.0.3, 2.0.1)
rspec-support (3.0.3)
rubygems-update (2.4.1)
sunlight-congress (1.1.0)
thread_safe (0.3.4)
tzinfo (1.2.1)
uuidtools (2.1.4)


C:\Users\Greice\Desktop\test-first-ruby-master>cd 00_hello

C:\Users\Greice\Desktop\test-first-ruby-master\00_hello>rake
(in C:/Users/Greice/Desktop/test-first-ruby-master)
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core/option_parse
r.rb:18:in `parse!': invalid option: --warnings (OptionParser::InvalidOption)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core
/option_parser.rb:4:in `parse!'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core
/configuration_options.rb:78:in `parse_options_file'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core
/configuration_options.rb:74:in `parse_global_options'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core
/configuration_options.rb:48:in `parse_options'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core
/runner.rb:41:in `run'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core
/runner.rb:10:in `block in autorun'
rake aborted!
ruby -S bundle exec rspec -IC:/Users/Greice/Desktop/test-first-ruby-master/00_he
llo -IC:/Users/Greice/Desktop/test-first-ruby-master/00_hello/solution -f docume
ntation -r ./rspec_config "C:/Users/Greice/Desktop/test-first-ruby-master/00_hel
lo/hello_spec.rb" failed

Tasks: TOP => default => spec
(See full trace by running task with --trace)
Rakefile

# This Rakefile has all the right settings to run the tests inside each lab
gem 'rspec', '~>2'
require 'rspec/core/rake_task'

task :default => :spec

desc "run tests for this lab"
RSpec::Core::RakeTask.new do |task|
  lab = Rake.application.original_dir.gsub(' ', '\ ')
  task.pattern = "#{lab}/*_spec.rb"
  task.rspec_opts = [ "-I#{lab}", "-I#{lab}/solution", '-f documentation', '-r ./rspec_config']
  task.verbose = false
end
rspec_config.rb

RSpec.configure do |c|
  c.fail_fast = true
  c.color = true
end

我以前在
.rspec
文件中的
--warnings
选项中看到过这种情况


尝试从
.rspec
rspec\u配置文件中删除
--warnings

谢谢。我检查了rspec_配置文件,它不包含任何--warnings。您可以将
Rakefile
rspec_配置文件添加到问题中吗?这可能有一些提示