Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails RSPEC未加载_Ruby On Rails_Ruby_Rspec_Configuration_Load - Fatal编程技术网

Ruby on rails RSPEC未加载

Ruby on rails RSPEC未加载,ruby-on-rails,ruby,rspec,configuration,load,Ruby On Rails,Ruby,Rspec,Configuration,Load,我正在从Hartl的指南学习Rails 无法得到 bundle exec rspec /spec/requests/static_pages_spec.rb 工作。这就是我得到的: sixxy@matilda:~/Rails/sample_app$ bundle exec rspec /spec/requests/static_pages_spec.rb /home/sixxy/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/rsp

我正在从Hartl的指南学习Rails

无法得到

bundle exec rspec /spec/requests/static_pages_spec.rb
工作。这就是我得到的:

sixxy@matilda:~/Rails/sample_app$ bundle exec rspec /spec/requests/static_pages_spec.rb
/home/sixxy/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load': cannot load such file -- /spec/requests/static_pages_spec.rb (LoadError)
from /home/sixxy/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
from /home/sixxy/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
from /home/sixxy/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
from /home/sixxy/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
from /home/sixxy/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
from /home/sixxy/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
我不仅在尝试测试的Rails应用程序中遇到了这个错误,而且我无法在其他地方尝试的Ruby代码上运行rspec测试。我遇到了同样的错误,这让我相信这是我的系统配置错误。

调用:

bundle exec rspec spec/requests/static_pages_spec.rb

否/在路径前面,否则RSpec将开始在您的根目录中而不是当前文件夹中查找文件。

Wow,我现在要自杀了。谢谢