Heroku应用程序错误:无法正确迁移数据库?

时间:2015-06-01 01:01:55

标签: ruby-on-rails-4 heroku carrierwave heroku-postgres cloudinary

安装CarrierWave和Cloudinary后,我的Heroku应用程序无法启动。基于日志,Heroku不会识别其中一种CarrierWave方法,即使它在开发中有效。 ("无法加载应用程序:NameError:未初始化的常量Image :: ImageFileUploader")

我已经尝试过heroku run rake db:migrate。我已经尝试过heroku重启。我尝试使用相同的代码创建新的应用。我做错了什么?

Heroku的日志:



$ heroku logs
2015-06-01T00:48:53.843432+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `eager_load!'
2015-06-01T00:48:53.843431+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `each'
2015-06-01T00:48:53.843433+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/engine.rb:346:in `eager_load!'
2015-06-01T00:48:53.843438+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
2015-06-01T00:48:53.843436+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `each'
2015-06-01T00:48:53.843439+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
2015-06-01T00:48:53.843442+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
2015-06-01T00:48:53.843443+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
2015-06-01T00:48:53.843446+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
2015-06-01T00:48:53.843451+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
2015-06-01T00:48:53.843448+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
2015-06-01T00:48:53.843454+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
2015-06-01T00:48:53.843455+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each'
2015-06-01T00:48:53.843461+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
2015-06-01T00:48:53.843464+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
2015-06-01T00:48:53.843465+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
2015-06-01T00:48:53.843468+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
2015-06-01T00:48:53.843469+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2015-06-01T00:48:53.843472+00:00 app[web.1]:    from config.ru:3:in `require'
2015-06-01T00:48:53.843476+00:00 app[web.1]:    from config.ru:3:in `block in <main>'
2015-06-01T00:48:53.843479+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/builder.rb:55:in `instance_eval'
2015-06-01T00:48:53.843480+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/builder.rb:55:in `initialize'
2015-06-01T00:48:53.843486+00:00 app[web.1]:    from config.ru:in `<main>'
2015-06-01T00:48:53.843483+00:00 app[web.1]:    from config.ru:in `new'
2015-06-01T00:48:53.843489+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/builder.rb:49:in `eval'
2015-06-01T00:48:53.843492+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/builder.rb:49:in `new_from_string'
2015-06-01T00:48:53.843496+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/builder.rb:40:in `parse_file'
2015-06-01T00:48:53.843499+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.1/lib/puma/configuration.rb:107:in `app'
2015-06-01T00:48:53.843500+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.1/lib/puma/runner.rb:113:in `load_and_bind'
2015-06-01T00:48:53.843506+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.1/lib/puma/cli.rb:512:in `run'
2015-06-01T00:48:53.843509+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.1/bin/puma:10:in `<top (required)>'
2015-06-01T00:48:53.843503+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.1/lib/puma/cluster.rb:301:in `run'
2015-06-01T00:48:53.843512+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/puma:23:in `load'
2015-06-01T00:48:53.843515+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/puma:23:in `<main>'
2015-06-01T00:48:54.702444+00:00 heroku[web.1]: Process exited with status 1
2015-06-01T00:48:54.731224+00:00 heroku[web.1]: State changed from starting to crashed
2015-06-01T00:48:57.895443+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by jg2758@gmail.com
2015-06-01T00:49:01.593848+00:00 heroku[run.1852]: Starting process with command `bundle exec rake db:migrate`
2015-06-01T00:49:01.550327+00:00 heroku[run.1852]: Awaiting client
2015-06-01T00:49:01.828367+00:00 heroku[run.1852]: State changed from starting to up
2015-06-01T00:49:06.598219+00:00 heroku[run.1852]: State changed from up to complete
2015-06-01T00:49:06.584931+00:00 heroku[run.1852]: Process exited with status 0
2015-06-01T00:49:14.826659+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by jg2758@gmail.com
2015-06-01T00:49:19.919812+00:00 heroku[run.1011]: Awaiting client
2015-06-01T00:49:20.109250+00:00 heroku[run.1011]: State changed from starting to up
2015-06-01T00:49:20.176967+00:00 heroku[run.1011]: Starting process with command `bundle exec rake db:migrate`
2015-06-01T00:49:29.612953+00:00 heroku[run.1011]: State changed from up to complete
2015-06-01T00:49:29.607995+00:00 heroku[run.1011]: Process exited with status 0
2015-06-01T00:50:01.774595+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pure-hamlet-4826.herokuapp.com request_id=59f7b06f-a3da-47cd-8d5e-a2ae808a157b fwd="96.49.47.172" dyno= connect= service= status=503 bytes=
2015-06-01T00:50:02.100139+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=pure-hamlet-4826.herokuapp.com request_id=fcb09e9e-d0a3-4e44-a5fa-4880e4df6c3a fwd="96.49.47.172" dyno= connect= service= status=503 bytes=
2015-06-01T00:51:27.697318+00:00 heroku[web.1]: State changed from crashed to starting
2015-06-01T00:51:32.035368+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb`
2015-06-01T00:51:34.635649+00:00 app[web.1]: [3] Puma starting in cluster mode...
2015-06-01T00:51:34.635676+00:00 app[web.1]: [3] * Version 2.11.1 (ruby 2.0.0-p645), codename: Intrepid Squirrel
2015-06-01T00:51:34.635678+00:00 app[web.1]: [3] * Min threads: 5, max threads: 5
2015-06-01T00:51:34.635679+00:00 app[web.1]: [3] * Environment: production
2015-06-01T00:51:34.635682+00:00 app[web.1]: [3] * Preloading application
2015-06-01T00:51:34.635681+00:00 app[web.1]: [3] * Process workers: 2
2015-06-01T00:51:37.489392+00:00 app[web.1]: [3] ! Unable to load application: NameError: uninitialized constant Image::ImageFileUploader
2015-06-01T00:51:37.490340+00:00 app[web.1]: /app/app/models/image.rb:2:in `<class:Image>': uninitialized constant Image::ImageFileUploader (NameError)
2015-06-01T00:51:37.490345+00:00 app[web.1]:    from /app/app/models/image.rb:1:in `<top (required)>'
2015-06-01T00:51:37.490349+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
2015-06-01T00:51:37.490350+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `each'
2015-06-01T00:51:37.490355+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `block in eager_load!'
2015-06-01T00:51:37.490356+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `each'
2015-06-01T00:51:37.490360+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `eager_load!'
2015-06-01T00:51:37.490363+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/engine.rb:346:in `eager_load!'
2015-06-01T00:51:37.490367+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `each'
2015-06-01T00:51:37.490371+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
2015-06-01T00:51:37.490374+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
2015-06-01T00:51:37.490377+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
2015-06-01T00:51:37.490380+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
2015-06-01T00:51:37.490382+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
2015-06-01T00:51:37.490386+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
2015-06-01T00:51:37.490389+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
2015-06-01T00:51:37.490391+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
2015-06-01T00:51:37.490394+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each'
2015-06-01T00:51:37.490398+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
2015-06-01T00:51:37.490402+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
2015-06-01T00:51:37.490405+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
2015-06-01T00:51:37.490409+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2015-06-01T00:51:37.490406+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
2015-06-01T00:51:37.490413+00:00 app[web.1]:    from config.ru:3:in `require'
2015-06-01T00:51:37.490416+00:00 app[web.1]:    from config.ru:3:in `block in <main>'
2015-06-01T00:51:37.490420+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/builder.rb:55:in `instance_eval'
2015-06-01T00:51:37.490424+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/builder.rb:55:in `initialize'
2015-06-01T00:51:37.490425+00:00 app[web.1]:    from config.ru:in `new'
2015-06-01T00:51:37.490428+00:00 app[web.1]:    from config.ru:in `<main>'
2015-06-01T00:51:37.490431+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/builder.rb:49:in `eval'
2015-06-01T00:51:37.490435+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/builder.rb:49:in `new_from_string'
2015-06-01T00:51:37.490438+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.1/lib/rack/builder.rb:40:in `parse_file'
2015-06-01T00:51:37.490441+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.1/lib/puma/configuration.rb:107:in `app'
2015-06-01T00:51:37.490443+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.1/lib/puma/runner.rb:113:in `load_and_bind'
2015-06-01T00:51:37.490446+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.1/lib/puma/cluster.rb:301:in `run'
2015-06-01T00:51:37.490449+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.1/lib/puma/cli.rb:512:in `run'
2015-06-01T00:51:37.490452+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.1/bin/puma:10:in `<top (required)>'
2015-06-01T00:51:37.490455+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/puma:23:in `load'
2015-06-01T00:51:37.490459+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/puma:23:in `<main>'
2015-06-01T00:51:38.376970+00:00 heroku[web.1]: Process exited with status 1
2015-06-01T00:51:39.573008+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=pure-hamlet-4826.herokuapp.com request_id=8ecbed15-ccff-49d0-9dc5-9c89acbdd076 fwd="96.49.47.172" dyno= connect= service= status=503 bytes=
2015-06-01T00:51:39.426345+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pure-hamlet-4826.herokuapp.com request_id=ca881b6d-2628-422f-8e1e-281501a15cf4 fwd="96.49.47.172" dyno= connect= service= status=503 bytes=
WARNING: Toolbelt v3.37.3 update available.
&#13;
&#13;
&#13;

0 个答案:

没有答案