рельсы геройка по устранению неисправностей - PullRequest
1 голос
/ 18 апреля 2011

Итак, я создал приложение heroku, поднял его, db: перенеси его Приложение отлично работает на моей локальной машине, но просто вылетает на герою. Я новичок и не знаю, с чего начать это. Заранее спасибо! Все журналы от создания приложения до миграции находятся здесь:

2011-04-17T22:51:03-07:00 heroku[slugc]: Slug compilation finished
2011-04-18T05:51:07+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require': /app/app/controllers/users_controller.rb:28: syntax error, unexpected '.', expecting kEND (SyntaxError)
2011-04-18T05:51:07+00:00 app[web.1]: ...                             .paginate(:page => params[:page...
2011-04-18T05:51:07+00:00 app[web.1]:                               ^
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:227:in `load_dependency'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:346:in `require_or_load'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:300:in `depend_on'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:216:in `require_dependency'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/engine.rb:138:in `eager_load!'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/engine.rb:137:in `each'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/engine.rb:137:in `eager_load!'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/engine.rb:135:in `each'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/engine.rb:135:in `eager_load!'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:108:in `eager_load!'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application/finisher.rb:41
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `instance_exec'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `run'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:50:in `run_initializers'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `each'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `run_initializers'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:134:in `initialize!'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:77:in `send'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:77:in `method_missing'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/config/environment.rb:5
2011-04-18T05:51:07+00:00 app[web.1]:   from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
2011-04-18T05:51:07+00:00 app[web.1]:   from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2011-04-18T05:51:07+00:00 app[web.1]:   from config.ru:3
2011-04-18T05:51:07+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:23
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:63:in `new'
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:63:in `map'
2011-04-18T05:51:07+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:18
2011-04-18T05:51:07+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
2011-04-18T05:51:07+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:11:in `new'
2011-04-18T05:51:07+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1
2011-04-17T22:51:07-07:00 heroku[web.1]: State changed from starting to crashed
2011-04-17T22:51:07-07:00 heroku[web.1]: State changed from crashed to created
2011-04-17T22:51:07-07:00 heroku[web.1]: State changed from created to starting
2011-04-17T22:51:10-07:00 heroku[web.1]: State changed from created to starting
2011-04-18T05:51:11+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require': /app/app/controllers/users_controller.rb:28: syntax error, unexpected '.', expecting kEND (SyntaxError)
2011-04-18T05:51:11+00:00 app[web.1]: ...                             .paginate(:page => params[:page...
2011-04-18T05:51:11+00:00 app[web.1]:                               ^
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:227:in `load_dependency'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:346:in `require_or_load'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:300:in `depend_on'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:216:in `require_dependency'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/engine.rb:138:in `eager_load!'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/engine.rb:137:in `each'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/engine.rb:137:in `eager_load!'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/engine.rb:135:in `each'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/engine.rb:135:in `eager_load!'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:108:in `eager_load!'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application/finisher.rb:41
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `instance_exec'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `run'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:50:in `run_initializers'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `each'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `run_initializers'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:134:in `initialize!'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:77:in `send'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:77:in `method_missing'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/config/environment.rb:5
2011-04-18T05:51:11+00:00 app[web.1]:   from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
2011-04-18T05:51:11+00:00 app[web.1]:   from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2011-04-18T05:51:11+00:00 app[web.1]:   from config.ru:3
2011-04-18T05:51:11+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:23
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:63:in `new'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:63:in `map'
2011-04-18T05:51:11+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:18
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
2011-04-18T05:51:11+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:11:in `new'
2011-04-18T05:51:11+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:11
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
2011-04-18T05:51:11+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
2011-04-18T05:51:11+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1:in `new'
2011-04-18T05:51:11+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1
2011-04-17T22:51:15-07:00 heroku[web.1]: State changed from starting to crashed
2011-04-18T05:51:21+00:00 heroku[router]: Error H10 (App crashed) -> GET indelearn.heroku.com/ dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-04-17T22:51:22-07:00 heroku[nginx]: GET / HTTP/1.1 | 75.72.164.255 | 795 | http | 503
2011-04-18T05:51:22+00:00 heroku[router]: Error H10 (App crashed) -> GET indelearn.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-04-17T22:51:22-07:00 heroku[nginx]: GET /favicon.ico HTTP/1.1 | 75.72.164.255 | 795 | http | 503
2011-04-17T22:51:39-07:00 heroku[rake.1]: State changed from created to starting
2011-04-17T22:51:43-07:00 heroku[rake.1]: State changed from starting to up
2011-04-17T22:51:49-07:00 heroku[rake.1]: State changed from up to complete
2011-04-18T05:51:59+00:00 heroku[router]: Error H10 (App crashed) -> GET indelearn.heroku.com/ dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-04-17T22:51:59-07:00 heroku[nginx]: GET / HTTP/1.1 | 75.72.164.255 | 795 | http | 503
2011-04-18T05:51:59+00:00 heroku[router]: Error H10 (App crashed) -> GET indelearn.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-04-17T22:51:59-07:00 heroku[nginx]: GET /favicon.ico HTTP/1.1 | 75.72.164.255 | 795 | http | 503
2011-04-18T05:52:00+00:00 heroku[router]: Error H10 (App crashed) -> GET indelearn.heroku.com/ dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-04-17T22:52:00-07:00 heroku[nginx]: GET / HTTP/1.1 | 75.72.164.255 | 795 | http | 503
2011-04-18T05:52:01+00:00 heroku[router]: Error H10 (App crashed) -> GET indelearn.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-04-17T22:52:01-07:00 heroku[nginx]: GET /favicon.ico HTTP/1.1 | 75.72.164.255 | 795 | http | 503

users_contoller # 28 - это paginate, за которым следует очень длинный SQL-запрос:

@discussions = Discussion.find_by_sql("SELECT d.*, MAX(c.created_at) AS lastCommentTime 
                 FROM discussions d JOIN comments c ON d.id = c.commentable_id 
                 WHERE c.commentable_type = 'Discussion' AND c.user_id = #{@user.id} 
                 GROUP BY d.id ORDER BY lastCommentTime DESC")
                 .paginate(:page => params[:page], :per_page => 10)

Итак, я удалил разрыв строки перед точкой, и она исправлена. Спасибо вам, ребята, за суперспособности! Новичку так сложно обнаружить строку критической ошибки в этом файле журнала. :)

1 Ответ

1 голос
/ 18 апреля 2011

В трассировке стека упоминается app/controllers/users_controller.rb в строке 28. Какой код находится в этом файле и вокруг него?Это, вероятно, где вы найдете свою проблему.

Кроме того, я знаю, что это звучит глупо, но трижды проверьте, что все проверено в вашем репозитории Git.Поскольку Heroku основан на Git, легко забыть проверить что-либо и git push старую версию вашего приложения на сервере.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...