我已经搜索了我的问题,但在 stackoverflow 上找不到它。发现了类似的问题,但没有一个与我的完全一样。我正在关注 Hartl 的 ruby on rails 教程,但是当我尝试像他一样使用 rspec 时,我遇到了这个问题:
harrisspec $ rspec spec/
/home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/configuration.rb:896:in `load': cannot load such file -- /home/harris/rails_projects/myapp/spec/spec (LoadError)
from /home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/configuration.rb:896:in `block in load_spec_files'
from /home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/configuration.rb:896:in `each'
from /home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/configuration.rb:896:in `load_spec_files'
from /home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/command_line.rb:22:in `run'
from /home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/runner.rb:80:in `run'
from /home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/runner.rb:17:in `block in autorun'
也尝试在应用程序文件夹的根目录中运行它(另一个线程说这会起作用)但没有骰子:
harris~ $ rspec spec/
/home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/configuration.rb:896:in `load': cannot load such file -- /home/harris/spec (LoadError)
from /home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/configuration.rb:896:in `block in load_spec_files'
from /home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/configuration.rb:896:in `each'
from /home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/configuration.rb:896:in `load_spec_files'
from /home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/command_line.rb:22:in `run'
from /home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/runner.rb:80:in `run'
from /home/harris/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.6/lib/rspec/core/runner.rb:17:in `block in autorun'
我该如何解决这个问题?如果没有这个,我会觉得继续学习本教程会感到不舒服,因为我不确定这对于应用程序的开发有多重要。
提前致谢!!