Heroku crashes on deploying Rails application

Added by pulkit agarwal about 7 years ago

my Heroku logs

2013-06-26T16:08:48.700236+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-06-26T16:08:48.699748+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
2013-06-26T16:08:48.700519+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-06-26T16:08:48.700519+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
2013-06-26T16:08:48.699748+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
2013-06-26T16:08:48.700519+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-06-26T16:08:48.700996+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-06-26T16:08:48.699748+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-06-26T16:08:48.700519+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-06-26T16:08:48.700996+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
2013-06-26T16:08:50.186439+00:00 heroku[web.1]: Process exited with status 1
2013-06-26T16:08:50.195884+00:00 heroku[web.1]: State changed from starting to crashed
2013-06-26T16:18:54.112134+00:00 heroku[web.1]: State changed from crashed to starting
2013-06-26T16:18:57.711441+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 41914`
2013-06-26T16:18:59.963082+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-06-26T16:18:59.963082+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-06-26T16:19:00.605625+00:00 app[web.1]: => Booting WEBrick
2013-06-26T16:19:00.605625+00:00 app[web.1]: => Rails 3.2.13 application starting in production
2013-06-26T16:19:00.605625+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-06-26T16:19:00.605625+00:00 app[web.1]: => Call with -d to detach
2013-06-26T16:19:00.615105+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.3.2/lib/bundler/rubygems_integration.rb:214:in `block in replace_gem': Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.) (LoadError)
2013-06-26T16:19:00.615105+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:27:in `spec'
2013-06-26T16:19:00.615105+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
2013-06-26T16:19:00.615313+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
2013-06-26T16:19:00.615105+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `<top (required)>'
2013-06-26T16:19:00.615313+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
2013-06-26T16:19:00.615313+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `each'
2013-06-26T16:19:00.605625+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2013-06-26T16:19:00.615313+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
2013-06-26T16:19:00.615313+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
2013-06-26T16:19:00.615105+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-06-26T16:19:00.615105+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-06-26T16:19:00.615105+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
2013-06-26T16:19:00.613605+00:00 app[web.1]: Exiting
2013-06-26T16:19:00.615105+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-06-26T16:19:00.615105+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-06-26T16:19:00.615313+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-06-26T16:19:00.615313+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-06-26T16:19:00.615506+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-06-26T16:19:00.615506+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-06-26T16:19:00.615313+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/base.rb:720:in `<top (required)>'
2013-06-26T16:19:00.615313+00:00 app[web.1]: from /app/app/models/prod.rb:1:in `<top (required)>'
2013-06-26T16:19:00.615506+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:192:in `block in const_missing'
2013-06-26T16:19:00.615105+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
2013-06-26T16:19:00.615506+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `each'
2013-06-26T16:19:00.615506+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:229:in `each'
2013-06-26T16:19:00.615313+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
2013-06-26T16:19:00.615506+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-06-26T16:19:00.616021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:260:in `safe_constantize'
2013-06-26T16:19:00.616021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/core_ext/string/inflections.rb:66:in `safe_constantize'
2013-06-26T16:19:00.616021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:169:in `_set_wrapper_defaults'
2013-06-26T16:19:00.615506+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `const_missing'
2013-06-26T16:19:00.615506+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:229:in `constantize'
2013-06-26T16:19:00.615506+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:502:in `load_missing_constant'
2013-06-26T16:19:00.616021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:152:in `_default_wrap_model'
2013-06-26T16:19:00.615506+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:230:in `block in constantize'
2013-06-26T16:19:00.616021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:133:in `inherited'
2013-06-26T16:19:00.616021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/abstract_controller/railties/routes_helpers.rb:7:in `block (2 levels) in with'
2013-06-26T16:19:00.616021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/action_controller/railties/paths.rb:7:in `block (2 levels) in with'
2013-06-26T16:19:00.616021+00:00 app[web.1]: from /app/app/controllers/prods_controller.rb:1:in `<top (required)>'
2013-06-26T16:19:00.616021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-06-26T16:19:00.616021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-06-26T16:19:00.616196+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-06-26T16:19:00.616196+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-06-26T16:19:00.616196+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
2013-06-26T16:19:00.616196+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:438:in `each'
2013-06-26T16:19:00.616196+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:438:in `block in eager_load!'
2013-06-26T16:19:00.616196+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
2013-06-26T16:19:00.616196+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-06-26T16:19:00.616196+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-06-26T16:19:00.616196+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:313:in `depend_on'
2013-06-26T16:19:00.616667+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-06-26T16:19:00.616667+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-06-26T16:19:00.616667+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-06-26T16:19:00.616667+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-06-26T16:19:00.616196+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
2013-06-26T16:19:00.616667+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-06-26T16:19:00.616667+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-06-26T16:19:00.616667+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-06-26T16:19:00.616667+00:00 app[web.1]: from /app/config.ru:3:in `require'
2013-06-26T16:19:00.616841+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-06-26T16:19:00.616841+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2013-06-26T16:19:00.617211+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
2013-06-26T16:19:00.616841+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-06-26T16:19:00.616667+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-06-26T16:19:00.616667+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-06-26T16:19:00.616841+00:00 app[web.1]: from /app/config.ru:in `new'
2013-06-26T16:19:00.617211+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-06-26T16:19:00.617211+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
2013-06-26T16:19:00.617211+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
2013-06-26T16:19:00.616841+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-06-26T16:19:00.616841+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-06-26T16:19:00.617211+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-06-26T16:19:00.616841+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-06-26T16:19:00.617211+00:00 app[web.1]: from script/rails:6:in `require'
2013-06-26T16:19:00.616841+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-06-26T16:19:00.616841+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
2013-06-26T16:19:00.617211+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-06-26T16:19:00.616841+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-06-26T16:19:01.922368+00:00 heroku[web.1]: Process exited with status 1
2013-06-26T16:19:01.937382+00:00 heroku[web.1]: State changed from starting to crashed
and my Gemfile is

gem 'rails', '3.2.13'
gem "mysql2", "~>0.3.11"
gem 'json'

  1. Gems used only for assets and not required
  2. in production environments by default.
    group :assets do
    gem 'sass-rails', '~> 3.2.3'
    gem 'coffee-rails', '~> 3.2.1'

    gem 'uglifier', '>= 1.0.3'
    gem 'zurb-foundation'
    end

gem 'jquery-rails'

  1. To use ActiveModel has_secure_password
  2. gem 'bcrypt-ruby', '~> 3.0.0'
  1. To use Jbuilder templates for JSON
  2. gem 'jbuilder'
  1. Use unicorn as the app server
  2. gem 'unicorn'
  1. Deploy with Capistrano
  2. gem 'capistrano'
  1. To use debugger
  2. gem 'ruby-debug'

Replies (1)

RE: Heroku crashes on deploying Rails application - Added by Ricardo Trindade almost 7 years ago

At least part of your problem is this code in environment.rb :

vendor_plugins_dir = File.join(Rails.root, "vendor", "plugins")
if Dir.glob(File.join(vendor_plugins_dir, "*")).any?
  $stderr.puts "Plugins in vendor/plugins (#{vendor_plugins_dir}) are no longer allowed. " +
    "Please, put your Redmine plugins in the `plugins` directory at the root of your " +
    "Redmine directory (#{File.join(Rails.root, "plugins")})" 
  exit 1
end

Redmine exits on startup if plugins are found in vendor/plugins, to discourage using old plugin style. However, Heroku installs plugins there as part of it's deploy process. The workaround I've seen suggested is simply to comment out the "exit 1" line, which seems to work.

I saw this doc on the wiki - http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Heroku - but it seems outdated

(1-1/1)