未初始化的常量Improvedoutcomes(NameError)

时间:2013-07-05 17:25:20

标签: ruby-on-rails heroku

我正在尝试将gzip压缩添加到我的Heroku应用程序中。搜索后我发现它应该像修改config.ru一样简单:

require ::File.expand_path('../config/environment',  __FILE__)
use Rack::Deflater
run Improvingoutcomes::Application

但我收到以下错误:

/home/manuel/my_app/config.ru:8:in `block in <main>': uninitialized constant Improvingoutcomes (NameError)
    from /home/manuel/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
    from /home/manuel/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
    from /home/manuel/my_app/config.ru:in `new'
    from /home/manuel/my_app/config.ru:in `<main>'
    from /home/manuel/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
    from /home/manuel/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
    from /home/manuel/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
    from /home/manuel/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
    from /home/manuel/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
    from /home/manuel/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
    from /home/manuel/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
    from /home/manuel/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
    from /home/manuel/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
    from /home/manuel/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

听起来像是区分大小写/大写问题。 application.rb是什么样的,特别是module Improvingoutcomes位。我的猜测类似于module ImprovingOutcomes

相关问题