作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
给定:
问题:
更新一些代码以便延迟作业正常运行后,我去运行 rails s
并且我意识到我正在运行 WEBrick。我为 1.9.2 版本安装了 mongrel:gem install mongrel --pre
并再次运行 rails s
。它仍在使用 WEBrick,这不是预期的行为。以前,我只会安装 mongrel,rails 会知道我需要 mongrel。
此外,当 WEBrick 运行时,我收到此错误...它启动然后出错并关闭。 (可能是由于升级或...也许 WEBrick 不喜欢 ruby 1.9.2?):
=> Booting WEBrick
=> Rails 3.0.5 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/aaron/dev/onlinescheduler/config/initializers/new_rails_defaults.rb:14:in `<top (required)>': undefined method `generate_best_match=' for ActionDispatch::Routing:Module (NoMethodError)
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:235:in `load'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:235:in `block in load'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:235:in `load'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/engine.rb:201:in `block (2 levels) in <class:Engine>'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/engine.rb:200:in `each'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/engine.rb:200:in `block in <class:Engine>'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `instance_exec'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `run'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/initializable.rb:50:in `block in run_initializers'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `each'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `run_initializers'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/application.rb:134:in `initialize!'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/application.rb:77:in `method_missing'
from /home/aaron/dev/onlinescheduler/config/environment.rb:5:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
from /home/aaron/dev/onlinescheduler/config.ru:3:in `block in <main>'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from /home/aaron/dev/onlinescheduler/config.ru:1:in `new'
from /home/aaron/dev/onlinescheduler/config.ru:1:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.1/lib/rack/builder.rb:35:in `eval'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.1/lib/rack/builder.rb:35:in `parse_file'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.1/lib/rack/server.rb:162:in `app'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.1/lib/rack/server.rb:248:in `wrapped_app'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.1/lib/rack/server.rb:213:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands/server.rb:65:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:30:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:27:in `tap'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
最佳答案
如果加上就更好了
group :development do
gem :mongrel
end
因为你在生产中不需要它
关于ruby-on-rails - 在新系统上升级到 Rails 3 的 Rails 应用程序未使用 Mongrel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5454092/
我是一名优秀的程序员,十分优秀!