Heroku部署问题 - 你能帮我找到错误吗?

时间:2012-04-13 09:28:40

标签: ruby-on-rails ruby-on-rails-3 heroku

我的应用程序在本地完美运行,但在部署时会崩溃。我的Heroku日志在下面,我已经解决了一些问题,但我现在正在努力寻找罪魁祸首。我知道设计警告,然而,我看不出这些是原因......

有人能发现有问题的错误吗?

2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/initializable.rb:54:in `each'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/initializable.rb:54:in `run_initializers'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/application.rb:96:in `initialize!'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/config/environment.rb:5:in `<top (required)>'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in `require'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in `block in require'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:223:in `block in load_dependency'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:640:in `new_constants_in'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:223:in `load_dependency'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in `require'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/builder.rb:51:in `instance_eval'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/config.ru:4:in `block in <main>'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/builder.rb:51:in `initialize'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/config.ru:1:in `<main>'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/config.ru:1:in `new'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/builder.rb:40:in `eval'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/builder.rb:40:in `parse_file'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/server.rb:200:in `app'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/commands/server.rb:46:in `app'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/server.rb:301:in `wrapped_app'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/server.rb:252:in `start'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/commands/server.rb:70:in `start'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/commands.rb:54:in `block in <top (required)>'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/commands.rb:49:in `tap'
2012-04-13T09:10:48+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/commands.rb:49:in `<top (required)>'
2012-04-13T09:10:48+00:00 app[web.1]:   from script/rails:6:in `require'
2012-04-13T09:10:48+00:00 app[web.1]:   from script/rails:6:in `<main>'
2012-04-13T09:10:49+00:00 heroku[web.1]: Process exited with status 1
2012-04-13T09:10:49+00:00 heroku[web.1]: State changed from starting to crashed
2012-04-13T09:10:49+00:00 heroku[web.1]: State changed from crashed to created
2012-04-13T09:10:49+00:00 heroku[web.1]: State changed from created to starting
2012-04-13T09:10:58+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 48016`
2012-04-13T09:11:08+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.2/lib/action_dispatch/http/mime_type.rb:101: warning: already initialized constant PDF
2012-04-13T09:11:08+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.2/lib/action_dispatch/http/mime_type.rb:101: warning: already initialized constant PDF
2012-04-13T09:11:09+00:00 app[web.1]: 
2012-04-13T09:11:09+00:00 app[web.1]: [DEVISE] Devise.case_insensitive_keys is false which is no longer supported. If you want to continue running on this mode, please ensure you are not using validatable (you can copy the validations directly to your model) and set case_insensitive_keys to an empty array.
2012-04-13T09:11:09+00:00 app[web.1]: 
2012-04-13T09:11:09+00:00 app[web.1]: [DEVISE] Devise.use_salt_as_remember_token is false which is no longer supported. Devise now only uses the salt as remember token and the remember_token column can be removed from your models.
2012-04-13T09:11:09+00:00 app[web.1]: 
2012-04-13T09:11:09+00:00 app[web.1]: 
2012-04-13T09:11:09+00:00 app[web.1]: 
2012-04-13T09:11:09+00:00 app[web.1]: [DEVISE] Devise.reset_password_within is nil. Please set this value to an interval (for example, 6.hours) and add a reset_password_sent_at field to your Devise models (if they don't have one already).
2012-04-13T09:11:09+00:00 app[web.1]: 
2012-04-13T09:11:13+00:00 app[web.1]: => Booting WEBrick
2012-04-13T09:11:13+00:00 app[web.1]: => Rails 3.1.2 application starting in production on http://0.0.0.0:48016
2012-04-13T09:11:13+00:00 app[web.1]: => Call with -d to detach
2012-04-13T09:11:13+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-04-13T09:11:13+00:00 app[web.1]: Exiting
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/app/models/press.rb:1:in `<top (required)>'
2012-04-13T09:11:13+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.2/lib/active_record/base.rb:1088:in `method_missing': undefined method `to' for #<Class:0x00000005f87690> (NoMethodError)
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:225:in `load_dependency'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/app/models/press.rb:2:in `<class:Press>'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in `require'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in `block in require'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in `require'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:348:in `require_or_load'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:302:in `depend_on'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:214:in `require_dependency'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/engine.rb:417:in `block (2 levels) in eager_load!'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/engine.rb:416:in `each'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/engine.rb:416:in `block in eager_load!'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/engine.rb:414:in `each'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/engine.rb:414:in `eager_load!'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/application/finisher.rb:51:in `block in <module:Finisher>'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/initializable.rb:30:in `instance_exec'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/initializable.rb:30:in `run'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/initializable.rb:54:in `each'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/initializable.rb:54:in `run_initializers'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/config/environment.rb:5:in `<top (required)>'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/application.rb:96:in `initialize!'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in `require'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in `block in require'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:223:in `block in load_dependency'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:640:in `new_constants_in'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:223:in `load_dependency'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in `require'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/config.ru:4:in `block in <main>'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/builder.rb:51:in `instance_eval'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/builder.rb:51:in `initialize'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/config.ru:1:in `new'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/config.ru:1:in `<main>'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/builder.rb:40:in `eval'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/builder.rb:40:in `parse_file'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/server.rb:200:in `app'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/commands/server.rb:46:in `app'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/server.rb:301:in `wrapped_app'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/rack/server.rb:252:in `start'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/commands/server.rb:70:in `start'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/commands.rb:54:in `block in <top (required)>'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/commands.rb:49:in `tap'
2012-04-13T09:11:13+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.2/lib/rails/commands.rb:49:in `<top (required)>'
2012-04-13T09:11:13+00:00 app[web.1]:   from script/rails:6:in `require'
2012-04-13T09:11:13+00:00 app[web.1]:   from script/rails:6:in `<main>'
2012-04-13T09:11:14+00:00 heroku[web.1]: Process exited with status 1
2012-04-13T09:11:14+00:00 heroku[web.1]: State changed from starting to crashed
2012-04-13T09:11:17+00:00 heroku[router]: Error H10 (App crashed) -> GET gentle-lightning-5246.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=

1 个答案:

答案 0 :(得分:1)

您需要在config / application.rb中添加config.assets.initialize_on_precompile = false。它在config / environments / production.rb

中不起作用