3

我正在学习 Ruby on Rails 教程。在第 5 章中,我遇到了另一个我无法弄清楚也找不到解决方案的障碍。

一方面,我的主页消失了,我不知道为什么。也就是说,由于某种原因,无法访问它。

当我运行测试时。我得到以下回复:

遇到异常:RuntimeError:应用程序已被初始化。回溯:

有人可以帮忙吗?


这是回溯(带有一些有用的格式以便于查看):

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.8/lib/rails/application.rb:135:in `initialize!'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'

/Users/tomgalpin/rails_projects/sample_app/config/environment.rb:5:in `<top (required)>'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'

/Users/tomgalpin/rails_projects/sample_app/spec/spec_helper.rb:3:in `<top (required)>'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `block in load'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/spork-0.9.2/lib/spork/run_strategy/forking.rb:11:in `block in run'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/spork-0.9.2/lib/spork/forker.rb:21:in `block in initialize'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/spork-0.9.2/lib/spork/forker.rb:18:in `fork'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/spork-0.9.2/lib/spork/forker.rb:18:in `initialize'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/spork-0.9.2/lib/spork/run_strategy/forking.rb:9:in `new'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/spork-0.9.2/lib/spork/run_strategy/forking.rb:9:in `run'

/Users/tomgalpin/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/spork-0.9.2/lib/spork/server.rb:48:in `run'

/Users/tomgalpin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'

/Users/tomgalpin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'

/Users/tomgalpin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'

/Users/tomgalpin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'

/Users/tomgalpin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'
4

1 回答 1

1

这为我解决了这个问题:

bundle exec spork --bootstrap
于 2013-01-26T07:04:00.167 回答