gpt4 book ai didi

ruby-on-rails - 遇到异常 : # 回溯:

转载 作者:行者123 更新时间:2023-12-01 13:33:01 24 4
gpt4 key购买 nike

我正在学习 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'

最佳答案

这解决了我的问题:

bundle exec spork --bootstrap

关于ruby-on-rails - 遇到异常 : #<RuntimeError: Application has been already initialized. > 回溯:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12630465/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com