Heroku: App Crash - PullRequest
       12

Heroku: App Crash

1 голос
/ 12 июля 2011

Я пытаюсь отладить свое приложение heroku, и мне нужно небольшое руководство. Все работает в моей среде разработки.

Сначала я подумал, что это проблема с БД, поэтому я запустил heroku db:push с меткой taps. Это мой первый опыт развертывания с Heroku и первый раз, когда я работаю с рельсами, поэтому я немного растерялся здесь. : /

Мой heroku logs:

2011-07-12T13:31:56+00:00 heroku[web.1]: Starting process with command: `thin -p 17708 -e production -R /home/heroku_rack/heroku.ru start`
2011-07-12T13:31:56+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency'
2011-07-12T13:31:56+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:300:in `depend_on'
2011-07-12T13:31:56+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `instance_exec'
2011-07-12T13:31:56+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `run'
2011-07-12T13:31:56+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/initializable.rb:50:in `block in run_initializers'
2011-07-12T13:31:56+00:00 app[web.1]:   from <internal:lib/rubygems/custom_requir

2011-07-12T13:31:56+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:23:in `eval'
2011-07-12T13:31:56+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
2011-07-12T13:31:56+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
2011-07-12T13:31:56+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:11:in `block in <main>'
2011-07-12T13:31:56+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.11/lib/rack/adapter/loader.rb:36:in `load'
2011-07-12T13:31:56+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!'
2011-07-12T13:31:56+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.11/bin/thin:6:in `<top (required)>'
2011-07-12T13:41:36+00:00 heroku[web.1]: State changed from crashed to created
2011-07-12T13:41:36+00:00 heroku[web.1]: State changed from created to starting
2011-07-12T13:41:48+00:00 heroku[web.1]: Starting process with command: `thin -p 6465 -e production -R /home/heroku_rack/heroku.ru start`
2011-07-12T13:41:55+00:00 app[web.1]: /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require': /app/app/models/settings.rb:2: syntax error, unexpected ':', expecting keyword_end (SyntaxError)
2011-07-12T13:41:55+00:00 app[web.1]:   attr_accessible :var :value
2011-07-12T13:41:55+00:00 app[web.1]:                         ^
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `block in require'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:346:in `require_or_load'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:300:in `depend_on'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:216:in `require_dependency'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/engine.rb:138:in `block (2 levels) in eager_load!'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/engine.rb:137:in `each'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/engine.rb:137:in `block in eager_load!'


2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/engine.rb:135:in `eager_load!'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:108:in `eager_load!'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application/finisher.rb:41:in `block in <module:Finisher>'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `instance_exec'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `run'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/initializable.rb:50:in `block in run_initializers'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `each'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `run_initializers'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:134:in `initialize!'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:77:in `method_missing'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/config/environment.rb:5:in `<top (required)>'
2011-07-12T13:41:55+00:00 app[web.1]:   from <internal:lib/rubygems/custom_require>:29:in `require'
2011-07-12T13:41:55+00:00 app[web.1]:   from <internal:lib/rubygems/custom_require>:29:in `require'
2011-07-12T13:41:55+00:00 app[web.1]:   from config.ru:3:in `block (3 levels) in <main>'
2011-07-12T13:41:55+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:23:in `block (3 levels) in <main>'
2011-07-12T13:41:55+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:23:in `eval'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:63:in `new'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:63:in `map'
2011-07-12T13:41:55+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:18:in `block (2 levels) in <main>'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
2011-07-12T13:41:55+00:00 app[web.1]:   from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
2011-07-12T13:41:55+00:00 heroku[web.1]: Process exited
2011-07-12T13:41:56+00:00 heroku[web.1]: State changed from starting to crashed
2011-07-12T13:41:57+00:00 heroku[router]: Error H10 (App crashed) -> GET young-window-197.heroku.com/countdown dyno= queue= wait= service= status=503 bytes=
2011-07-12T13:41:57+00:00 heroku[router]: Error H10 (App crashed) -> GET young-window-197.heroku.com/favicon.ico dyno= queue= wait= service= status=503 bytes=

1 Ответ

4 голосов
/ 12 июля 2011

Это ваша ошибка:

/app/app/models/settings.rb:2: syntax error, unexpected ':', expecting keyword_end (SyntaxError)

В вашей модели настроек вам нужно поставить запятую между вашими виртуальными атрибутами:

attr_accessible :var :value

Должно быть:

attr_accessible :var, :value
...