Rails 2.0.1,Pow.cx - config.ru错误

时间:2013-02-13 17:21:49

标签: ruby-on-rails ruby rack ruby-on-rails-2 rack-pow

我有rails 2.0.1和最新版本的pow.cx设置,我收到一个错误,我认为这与config.ru文件有关:

  NameError: uninitialized constant ActionController::Dispatcher
  ~/repos/selfsale-001/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:263:in `load_missing_constant'
  ~/repos/selfsale-001/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in `const_missing'
  ~/repos/selfsale-001/config.ru:3
  ~/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/builder.rb:4:in `instance_eval'
  ~/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/builder.rb:4:in `initialize'
  ~/repos/selfsale-001/config.ru:1:in `new'
  ~/repos/selfsale-001/config.ru:1

我的config.ru是:

# Rails.root/config.ru
require "./config/environment"
run ActionController::Dispatcher.new

所以ActionController没有初始化,我的问题是需要为这个设置初始化什么?我已经搜索过Google并且还没有找到可用的配置。

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

嗯......我的猜测是你需要至少使用Rails 2.3来运行Rack中间件,参见

http://edgeguides.rubyonrails.org/2_3_release_notes.html

因此,对于早于2.3的Rails,您的config.ru无法使用。