所以我尝试卸载重新安装以及运行gem更新,但不断收到以下错误。
C:\Users\Dakota>rspec
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.0.2/lib/rspec/
core/configuration.rb:1057:in `load': cannot load such file -- C:/Users/Dakota/s
pec (LoadError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.0
.2/lib/rspec/core/configuration.rb:1057:in `block in load_spec_files'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.0
.2/lib/rspec/core/configuration.rb:1057:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.0
.2/lib/rspec/core/configuration.rb:1057:in `load_spec_files'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.0
.2/lib/rspec/core/runner.rb:97:in `setup'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.0
.2/lib/rspec/core/runner.rb:85:in `run'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.0
.2/lib/rspec/core/runner.rb:70:in `run'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.0
.2/lib/rspec/core/runner.rb:38:in `invoke'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-3.0
.2/exe/rspec:4:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/bin/rspec:23:in `load'
from C:/RailsInstaller/Ruby1.9.3/bin/rspec:23:in `<main>'
答案 0 :(得分:0)
看起来你不是你的app目录。当您执行rspec时,您当前在C:\User\Dakota
。您希望进入C:\Users\Dakota\<rails app here>
并从那里开始使用rspec spec/
执行rspec。实际上你应该使用bundle来执行,所以你很可能想要运行bundle exec rspec spec/