0

我正在关注 micheal hartl 的 ruby​​ on rails 教程,但我被困在他安装 spork 进行自动测试的地方。

我安装了 spork,它显示已成功安装,然后我尝试在终端中运行命令(spork),这是我得到的错误。请问有什么线索吗?不知道,但 spork 的 github repo 似乎缺乏安装它的方向以及人们面临的常见问题。

PS :: 我已经跑了 spork --bootstrap

Using RSpec
/Users/Arjo/rails_testprojects/proto1/spec/spec_helper.rb has not been bootstrapped.  Run       spork --bootstrap to do so.
Preloading Rails environment
no such file to load -- spork/forker.rb (LoadError)
/Users/Arjo/.rvm/gems/ruby-1.9.2-p320@twitclone/gems/activesupport-   3.2.8/lib/active_support/dependencies.rb:251:in `require'
/Users/Arjo/.rvm/gems/ruby-1.9.2-p320@twitclone/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
/Users/Arjo/.rvm/gems/ruby-1.9.2-p320@twitclone/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/Arjo/.rvm/gems/ruby-1.9.2-p320@twitclone/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
/Users/Arjo/.rvm/gems/ruby-1.9.2-p320@twitclone/gems/spork-0.9.2/lib/spork/server.rb:3:in `<top (required)>'
/Users/Arjo/.rvm/gems/ruby-1.9.2-p320@twitclone/gems/spork-0.9.2/lib/spork/runner.rb:75:in `run'
/Users/Arjo/.rvm/gems/ruby-1.9.2-p320@twitclone/gems/spork-0.9.2/lib/spork/runner.rb:10:in `run'
/Users/Arjo/.rvm/gems/ruby-1.9.2-p320@twitclone/gems/spork-0.9.2/bin/spork:10:in `<top (required)>'
/Users/Arjo/.rvm/gems/ruby-1.9.2-p320@twitclone/bin/spork:19:in `load'
/Users/Arjo/.rvm/gems/ruby-1.9.2-p320@twitclone/bin/spork:19:in `<main>'
/Users/Arjo/.rvm/gems/ruby-1.9.2-p320@twitclone/bin/ruby_noexec_wrapper:14:in `eval'
/Users/Arjo/.rvm/gems/ruby-1.9.2-p320@twitclone/bin/ruby_noexec_wrapper:14:in `<main>'
4

1 回答 1

0

将 gem 'spork' 添加到 Gemfile 中,捆绑安装并重试。

于 2013-10-17T09:45:16.660 回答