As told by the Bamboo to Cedar migration guide, I added this Procfile
to my Heroku app:
web: bundle exec unicorn -p $PORT -E $RACK_ENV -c config/unicorn.rb
worker: bundle exec rake jobs:work
Then I ran bundle install
and pushed. Now the server does not start anymore:
heroku[web.1]: State changed from up to starting
app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `block in start'
app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/commands/server.rb:65:in `start'
app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:32:in `start'
app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:160:in `start'
app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.2.8/lib/rack/server.rb:217:in `start'
app[web.1]: [2014-07-17 04:02:16] FATAL SignalException: SIGTERM
app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `select'
app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/commands.rb:30:in `block in <top (required)>'
app[web.1]: [2014-07-17 04:02:16] INFO WEBrick::HTTPServer#start done.
app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/commands.rb:27:in `tap'
app[web.1]: [2014-07-17 04:02:16] INFO going to shutdown ...
app[web.1]: Exiting
app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.2.8/lib/rack/handler/webrick.rb:13:in `run'
app[web.1]: script/rails:6:in `require'
app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/commands.rb:27:in `<top (required)>'
app[web.1]: script/rails:6:in `<main>'
app[web.1]: bundler: command not found: unicorn
app[web.1]: Install missing gem executables with `bundle install`
What am I doing wrong?
Add gem 'unicorn'
to your Gemfile, run bundle install
. Commit the updated Gemfile and Gemfile.lock files and push it to Heroku.