Я несколько раз тестировал локальное приложение Rails 3 и, наконец, развернул его в Heroku. Некоторое время все работало нормально, все страницы загружались, а потом я начал получать страницу с сообщением об ошибке, в котором говорилось о сбое приложения. Я проверяю свои журналы и вот вывод:
2011-06-02T18:17:18+00:00 heroku[web.1]: State changed from starting to crashed
2011-06-02T18:17:18+00:00 heroku[web.1]: State changed from crashed to created
2011-06-02T18:17:18+00:00 heroku[web.1]: State changed from created to starting
2011-06-02T18:17:23+00:00 heroku[web.1]: Starting process with command: `thin -p 45189 -e production -R /home/heroku_rack/heroku.ru start`
2011-06-02T18:17:25+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/activerecord-3.0.3/lib/active_record/base.rb:1008:in `method_missing': undefined local variable or method `user_id' for #<Class:0x7fac147671c8> (NameError)
2011-06-02T18:17:25+00:00 app[web.1]: from /app/app/models/order.rb:23
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:227:in `load_dependency'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:346:in `require_or_load'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:300:in `depend_on'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:216:in `require_dependency'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/engine.rb:138:in `eager_load!'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/engine.rb:137:in `each'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/engine.rb:135:in `each'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/engine.rb:137:in `eager_load!'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/engine.rb:135:in `eager_load!'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:108:in `eager_load!'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/application/finisher.rb:41
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `instance_exec'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `run'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:50:in `run_initializers'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `each'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `run_initializers'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:134:in `initialize!'
2011-06-02T18:17:25+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `send'
2011-06-02T18:17:25+00:00 app[web.1]: from config.ru:3
2011-06-02T18:17:25+00:00 heroku[web.1]: Process exited
2011-06-02T18:17:26+00:00 heroku[web.1]: State changed from starting to crashed
2011-06-02T18:17:27+00:00 heroku[router]: Error H10 (App crashed) -> GET domainpolish.heroku.com/orders dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-06-02T18:17:35+00:00 heroku[router]: Error H10 (App crashed) -> GET domainpolish.heroku.com/orders dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-06-02T18:17:37+00:00 heroku[router]: Error H10 (App crashed) -> GET domainpolish.heroku.com/orders dyno=none queue=0 wait=0ms service=0ms bytes=0
Кто-нибудь знает, что происходит не так? Заранее спасибо!