Topic: Heroku deployment crashing

Hey all, i'm trying to deploy my app at heroku, but the app webpage displays:

Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for deta

So I ran >> heroku logs at the console and I got these lines

2011-03-16T21:00:35-07:00 app[web.1]:   from /app/87b80459-cb12-4016-b5a2-089369af2ac3/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
2011-03-16T21:00:35-07:00 app[web.1]:   from /app/87b80459-cb12-4016-b5a2-089369af2ac3/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
2011-03-16T21:00:35-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:11:in `new'
2011-03-16T21:00:35-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:11
2011-03-16T21:00:35-07:00 app[web.1]:   from /app/87b80459-cb12-4016-b5a2-089369af2ac3/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
2011-03-16T21:00:35-07:00 app[web.1]:   from /app/87b80459-cb12-4016-b5a2-089369af2ac3/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
2011-03-16T21:00:35-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1:in `new'
2011-03-16T21:00:35-07:00 heroku[web.1]: State changed from starting to crashed
2011-03-16T21:01:18-07:00 heroku[web.1]: State changed from crashed to created
2011-03-16T21:01:18-07:00 heroku[web.1]: State changed from created to starting
2011-03-16T21:01:24-07:00 app[web.1]: /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/app/uploaders/image_uploader.rb:3: uninitialized constant CarrierWave (NameError)
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/engine.rb:138:in `eager_load!'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/engine.rb:137:in `each'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/engine.rb:137:in `eager_load!'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/engine.rb:135:in `each'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/engine.rb:135:in `eager_load!'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/application.rb:108:in `eager_load!'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/application/finisher.rb:41
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:25:in `instance_exec'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:25:in `run'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:50:in `run_initializers'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:49:in `each'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:49:in `run_initializers'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/application.rb:134:in `initialize!'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/application.rb:77:in `send'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/application.rb:77:in `method_missing'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/config/environment.rb:5
2011-03-16T21:01:24-07: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-03-16T21:01:24-07:00 app[web.1]:   from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2011-03-16T21:01:24-07:00 app[web.1]:   from config.ru:3
2011-03-16T21:01:24-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:23
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:63:in `new'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:63:in `map'
2011-03-16T21:01:24-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:18
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
2011-03-16T21:01:24-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:11:in `new'
2011-03-16T21:01:24-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:11
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
2011-03-16T21:01:24-07:00 app[web.1]:   from /app/6008f2c1-a1cd-4c96-99fb-1234bb503eb5/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
2011-03-16T21:01:24-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1:in `new'
2011-03-16T21:01:24-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1
2011-03-16T21:01:25-07:00 heroku[web.1]: State changed from starting to crashed
2011-03-16T21:02:47-07:00 heroku[slugc]: Slug compilation started
2011-03-16T21:03:14-07:00 heroku[router]: Error H10 (App crashed) -> GET radiant-window-339.heroku.com/admin dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-03-16T21:03:14-07:00 heroku[nginx]: GET /admin HTTP/1.1 | 186.212.167.140 | 796 | http | 503
2011-03-16T21:03:14-07:00 heroku[router]: Error H10 (App crashed) -> GET radiant-window-339.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-03-16T21:03:14-07:00 heroku[nginx]: GET /favicon.ico HTTP/1.1 | 186.212.167.140 | 796 | http | 503
2011-03-16T21:04:22-07:00 heroku[api]: Deploy af5a9c5 by uriel.juliattivalle@gmail.com
2011-03-16T21:04:22-07:00 heroku[web.1]: State changed from crashed to created
2011-03-16T21:04:22-07:00 heroku[web.1]: State changed from created to starting
2011-03-16T21:04:23-07:00 heroku[slugc]: Slug compilation finished
2011-03-16T21:04:28-07:00 app[web.1]: /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/app/helpers/remote_link_renderer.rb:1: uninitialized constant WillPaginate::LinkRenderer (NameError)
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/engine.rb:138:in `eager_load!'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/engine.rb:137:in `each'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/engine.rb:137:in `eager_load!'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/engine.rb:135:in `each'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/engine.rb:135:in `eager_load!'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/application.rb:108:in `eager_load!'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/application/finisher.rb:41
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:25:in `instance_exec'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:25:in `run'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:50:in `run_initializers'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:49:in `each'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:49:in `run_initializers'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/application.rb:134:in `initialize!'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/application.rb:77:in `send'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/railties-3.0.4/lib/rails/application.rb:77:in `method_missing'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/config/environment.rb:5
2011-03-16T21:04:28-07: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-03-16T21:04:28-07:00 app[web.1]:   from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2011-03-16T21:04:28-07:00 app[web.1]:   from config.ru:3
2011-03-16T21:04:28-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:23
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:63:in `new'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:63:in `map'
2011-03-16T21:04:28-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:18
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
2011-03-16T21:04:28-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:11:in `new'
2011-03-16T21:04:28-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:11
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
2011-03-16T21:04:28-07:00 app[web.1]:   from /app/99275fac-8d13-48dd-bbbb-5fc234b34a6b/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
2011-03-16T21:04:28-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1:in `new'
2011-03-16T21:04:28-07:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1
2011-03-16T21:04:28-07:00 heroku[web.1]: State changed from starting to crashed
2011-03-16T21:04:37-07:00 heroku[rake.2]: State changed from created to starting
2011-03-16T21:04:43-07:00 heroku[rake.2]: State changed from starting to up
2011-03-16T21:04:44-07:00 heroku[rake.2]: State changed from up to complete
2011-03-16T21:04:56-07:00 heroku[router]: Error H10 (App crashed) -> GET radiant-window-339.heroku.com/admin dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-03-16T21:04:56-07:00 heroku[nginx]: GET /admin HTTP/1.1 | 186.212.167.140 | 796 | http | 503
2011-03-16T21:04:57-07:00 heroku[router]: Error H10 (App crashed) -> GET radiant-window-339.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-03-16T21:04:57-07:00 heroku[nginx]: GET /favicon.ico HTTP/1.1 | 186.212.167.140 | 796 | http | 503
2011-03-16T21:04:59-07:00 heroku[router]: Error H10 (App crashed) -> GET radiant-window-339.heroku.com/ dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-03-16T21:04:59-07:00 heroku[nginx]: GET / HTTP/1.1 | 186.212.167.140 | 796 | http | 503
2011-03-16T21:04:59-07:00 heroku[router]: Error H10 (App crashed) -> GET radiant-window-339.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0
2011-03-16T21:04:59-07:00 heroku[nginx]: GET /favicon.ico HTTP/1.1 | 186.212.167.140 | 796 | http | 503

Any ideas?

Re: Heroku deployment crashing

Three things to check:
- rack version (see more details on heroku site: http://devcenter.heroku.com/articles/gem-dependency. In my case I should use 1.1.0

Rails encourages developers to pin their application to a specific Rails gem version through config/environment.rb. Versions 2.3.3 to 2.3.5 use Rack ~> 1.0.0 and are incompatible with Rack >= 1.1.0, which is required by later 2.3.x releases. Rails 3 requires rack 1.2.1 and newer which is incompatible with with any  of the Rails 2 rack versions.

And in this case some gems were not installed at all.
-  uninitialized constant CarrierWave (NameError)
-  it seems like the 'will_paginate' was not installed

If not, open a request on Heroku support page, they will look you code (if you agree) and guide you.

Last edited by Javix (2011-03-17 06:15:55)

Re: Heroku deployment crashing

Javix wrote:

Three things to check:
- rack version (see more details on heroku site: http://devcenter.heroku.com/articles/gem-dependency. In my case I should use 1.1.0

Rails encourages developers to pin their application to a specific Rails gem version through config/environment.rb. Versions 2.3.3 to 2.3.5 use Rack ~> 1.0.0 and are incompatible with Rack >= 1.1.0, which is required by later 2.3.x releases. Rails 3 requires rack 1.2.1 and newer which is incompatible with with any  of the Rails 2 rack versions.

And in this case some gems were not installed at all.
-  uninitialized constant CarrierWave (NameError)
-  it seems like the 'will_paginate' was not installed

If not, open a request on Heroku support page, they will look you code (if you agree) and guide you.

Hello Javix, thanks for the quick reply.

I'm using Rails 3.0 and Ruby 1.9.2-p136

I had some replies outside this forum and some users said that CarrierWave is not supported by Heroku, they said about Amazon S3 solution. Besides that, I am using some gems that can compromise the application with Heroku, such as:

gem 'rspec-rails',      ">= 2.0.0.beta"
gem 'factory_girl_rails', '1.0'
gem 'will_paginate', '3.0.pre2'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'nifty-generators'
gem 'mocha', :group => :test
gem 'ckeditor', :git => 'git://github.com/galetahub/rails-ckeditor.git', :branch => 'rails3'
gem 'bluecloth'
gem 'formatize'
gem 'rmagick'
gem 'carrierwave'

Re: Heroku deployment crashing

I don't know carrierwave gem, never used  it. Ask heroku support team or directly carrier wave creator; As for others, I think there is no problem.

Re: Heroku deployment crashing

Javix wrote:

I don't know carrierwave gem, never used  it. Ask heroku support team or directly carrier wave creator; As for others, I think there is no problem.

Thanks again Javix.

I'm through a free profile over there and not as a costumer. Can I ask for support even though not being a client?

Last edited by ujvalle (2011-03-18 11:42:52)