Andrew Stroup
Andrew Stroup

Reputation: 330

Heroku Ruby on Rails upgrade crash

I am updating my website hosted on Heroku from Ruby 1.9.3 > 2.1.0 and Rails 3.2.13 > 4.0.3.

Based on the deployment command "git push heroku master"

Everything was updated successfully, see below

Fetching repository, done.
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 505 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.0
-----> Installing dependencies using 1.5.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       Fetching gem metadata from https://rubygems.org/.......
       Fetching additional metadata from https://rubygems.org/..
       Using i18n (0.6.9)
       Using rake (10.1.1)
       Using minitest (4.7.5)
       Using multi_json (1.8.4)
       Using atomic (1.1.14)
       Using tzinfo (0.3.38)
       Using builder (3.1.4)
       Using erubis (2.7.0)
       Using mime-types (1.25.1)
       Using polyglot (0.3.4)
       Using activerecord-deprecated_finders (1.0.3)
       Using rack (1.5.2)
       Using arel (4.0.2)
       Using addressable (2.3.5)
       Using aws_cf_signer (0.1.2)
       Using thor (0.18.1)
       Using coffee-script-source (1.7.0)
       Using execjs (2.0.2)
       Using commonjs (0.2.7)
       Using netrc (0.7.7)
       Using excon (0.31.0)
       Using rubyzip (1.1.0)
       Using hike (1.2.3)
       Using json (1.8.1)
       Using newrelic_rpm (3.7.2.195)
       Using libv8 (3.16.14.3)
       Using pg (0.17.1)
       Using bundler (1.5.2)
       Using tilt (1.4.1)
       Using ref (1.0.5)
       Using sass (3.2.14)
       Using therubyrhino_jar (1.7.4)
       Using thread_safe (0.1.3)
       Using rest-client (1.6.7)
       Using treetop (1.4.15)
       Using less (2.3.3)
       Using launchy (2.4.2)
       Using heroku-api (0.3.17)
       Using coffee-script (2.2.0)
       Using uglifier (2.4.0)
       Using therubyracer (0.12.1)
       Using rack-test (0.6.2)
       Using sprockets (2.11.0)
       Using therubyrhino (2.0.3)
       Using activesupport (4.0.3)
       Using cloudinary (1.0.68)
       Using mail (2.5.4)
       Using heroku (3.3.0)
       Using actionpack (4.0.3)
       Using activemodel (4.0.3)
       Using actionmailer (4.0.3)
       Using railties (4.0.3)
       Using activerecord (4.0.3)
       Using protected_attributes (1.0.5)
       Using less-rails (2.3.2)
       Using sprockets-rails (2.0.1)
       Using bootstrap-slider-rails (1.9.0)
       Using coffee-rails (4.0.1)
       Using fancybox2-rails (0.2.6)
       Using jquery-rails (3.1.0)
       Using rails (4.0.3)
       Using sass-rails (4.0.1)
       Using twitter-bootstrap-rails (2.2.8)
       Installing rails_serve_static_assets (0.0.2)
       Installing rails_stdout_logging (0.0.3)
       Installing rails_12factor (0.0.2)
       Your bundle is complete!
       Gems in the groups development and test were not installed.
       It was installed into ./vendor/bundle
       Bundle completed (7.24s)
       Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       Asset precompilation completed (2.48s)
       Cleaning assets
       Running: rake assets:clean
-----> Discovering process types
       Procfile declares types -> (none)
       Default types for Ruby  -> console, rake, web, worker

-----> Compressing... done, 80.9MB
-----> Launching... done, v8
       http://still-caverns-3613.herokuapp.com/ deployed to Heroku

To [email protected]:still-caverns-3613.git
   19f47ce..56434b9  master -> master

But when I check the website I get Application Error and the following report "heroku logs"

2014-03-11T22:11:58.201068+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2014-03-11T22:11:58.200666+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2014-03-11T22:11:58.201068+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:67:in `block in tagged'
2014-03-11T22:11:58.201068+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2014-03-11T22:11:58.201068+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
2014-03-11T22:11:58.201068+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.3/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
2014-03-11T22:11:58.201526+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/engine.rb:511:in `call'
2014-03-11T22:11:58.201526+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2014-03-11T22:11:58.201526+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2014-03-11T22:11:58.201526+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/application.rb:97:in `call'
2014-03-11T22:11:58.201526+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2014-03-11T22:11:58.201526+00:00 app[web.1]:   vendor/ruby-2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
2014-03-11T22:11:58.201526+00:00 app[web.1]:   vendor/ruby-2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
2014-03-11T22:11:58.
201526+00:00 app[web.1]:   vendor/ruby-2.1.0/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
2014-03-11T22:11:58.201526+00:00 app[web.1]: 
2014-03-11T22:11:58.201526+00:00 app[web.1]: 
2014-03-11T22:11:58.124118+00:00 heroku[router]: at=info method=GET path=/assets/tomas.png host=still-caverns-3613.herokuapp.com request_id=10a0b9b0-bde7-4c20-b583-5ac347835548 fwd="72.89.243.219" dyno=web.1 connect=4ms service=21ms status=500 bytes=919
2014-03-11T22:11:58.151936+00:00 heroku[router]: at=info method=GET path=/assets/bettercollective.png host=still-caverns-3613.herokuapp.com request_id=fc2fbc14-0eff-4d7c-b4bd-82b1b7d852f7 fwd="72.89.243.219" dyno=web.1 connect=4ms service=21ms status=500 bytes=919
2014-03-11T22:11:58.039235+00:00 heroku[router]: at=info method=GET path=/assets/mof.png host=still-caverns-3613.herokuapp.com request_id=02a35b98-aa42-45a3-9f3f-20a55181669a fwd="72.89.243.219" dyno=web.1 connect=13ms service=19ms status=500 bytes=919
2014-03-11T22:11:57.860033+00:00 heroku[router]: at=info method=GET path=/assets/application-b0331ed810136e2d3bb1b69717ffe0eb.js host=still-caverns-3613.herokuapp.com request_id=f116b5f2-c205-41b1-b21b-cf99b0f3c927 fwd="72.89.243.219" dyno=web.1 connect=3ms service=34ms status=304 bytes=422
2014-03-11T22:11:58.202363+00:00 heroku[router]: at=info method=GET path=/assets/pionect-logo.png host=still-caverns-3613.herokuapp.com request_id=2c6a4a39-7858-47d3-bd42-c4c67d6b95e2
 fwd="72.89.243.219" dyno=web.1 connect=11ms service=14ms status=500 bytes=919
2014-03-11T22:11:58.066289+00:00 heroku[router]: at=info method=GET path=/assets/matt-cook.png host=still-caverns-3613.herokuapp.com request_id=6827d137-e0a1-481f-8900-4a987027db5c fwd="72.89.243.219" dyno=web.1 connect=2ms service=31ms status=500 bytes=919
2014-03-11T22:11:58.126774+00:00 heroku[router]: at=info method=GET path=/assets/janis.png host=still-caverns-3613.herokuapp.com request_id=6e051ca3-13bf-45d0-a455-64225a330610 fwd="72.89.243.219" dyno=web.1 connect=2ms service=24ms status=500 bytes=919
2014-03-11T22:11:58.150182+00:00 heroku[router]: at=info method=GET path=/assets/erictulle.png host=still-caverns-3613.herokuapp.com request_id=4bae5642-73c2-4812-9186-6c83bca6adc4 fwd="72.89.243.219" dyno=web.1 connect=3ms service=19ms status=500 bytes=919
2014-03-11T22:12:02.357425+00:00 heroku[router]: at=info method=GET path=/assets/cklogofav-3-9930462f9db3339250531111fc95e41b.ico host=still-caverns-3613.herokuapp.com request_id=a57c84bb-f2fb-4753-9407-319c4a0307cb fwd="72.89.243.219" dyno=web.1 connect=3ms service=79ms status=304 bytes=422
2014-03-11T22:12:02.443601+00:00 heroku[router]: at=info method=GET path=/assets/cklogofav-3-9930462f9db3339250531111fc95e41b.ico host=still-caverns-3613.herokuapp.com request_id=ef9a4efa-1d2d-4943-85c5-d8fb22955620 fwd="72.89.243.219" dyno=web.1 connect=2ms service=53ms status=304 bytes=422
2014-03-11T22:17:01.615352+00:00 heroku[router]: at=info method=GET path=/assets/cklogofav-3-9930462f9db3339250531111fc95e41b.ico host=still-caverns-3613.herokuapp.com request_id=179e45ef-3e5e-4def-bf95-8eb3742d1bbc fwd="72.89.243.219" dyno=web.1 connect=2ms service=22ms status=304 bytes=422
2014-03-11T22:17:00.771682+00:00 heroku[router]: at=info method=GET path=/assets/cklogofav-3-9930462f9db3339250531111fc95e41b.ico host=still-caverns-3613.herokuapp.com request_id=6ab43ab3-0c68-4e19-abf9-da8738a61f46 fwd="72.89.243.219" dyno=web.1 connect=2ms service=41ms status=304 bytes=422
2014-03-11T22:20:13+00:00 heroku[slug-compiler]: Slug compilation started
2014-03-11T22:20:45.956002+00:00 heroku[api]: Deploy 56434b9 by [email protected]
2014-03-11T22:20:45.956078+00:00 heroku[api]: Release v8 created by [email protected]
2014-03-11T22:20:46.076627+00:00 heroku[web.1]: State changed from up to starting
2014-03-11T22:20:46+00:00 heroku[slug-compiler]: Slug compilation finished
2014-03-11T22:20:48.924152+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-03-11T22:20:49.620543+00:00 app[web.1]: [2014-03-11 22:20:49] FATAL SignalException: SIGTERM
2014-03-11T22:20:49.620543+00:00 app[web.1]:    /app/vendor/ruby-2.1.0/lib/ruby/2.1.0/webrick/server.rb:170:in `select'
2014-03-11T22:20:49.620813+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/commands.rb:71:in `<top (required)>'
2014-03-11T22:20:49.620543+00:00 app[web.1]:    /app/vendor/ruby-2.1.0/lib/ruby/2.1.0/webrick/server.rb:170:in `block in start'
2014-03-11T22:20:49.620543+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/commands.rb:76:in `block in <top (required)>'
2014-03-11T22:20:49.620543+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/commands.rb:71:in `tap'
2014-03-11T22:20:49.620543+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:14:in `run'
2014-03-11T22:20:49.620543+00:00 app[web.1]:    /app/vendor/ruby-2.1.0/lib/ruby/2.1.0/webrick/server.rb:32:in `start'
2014-03-11T22:20:49.620813+00:00 app[web.1]:    script/rails:6:in `<main>'
2014-03-11T22:20:49.620813+00:00 app[web.1]: [2014-03-11 22:20:49] INFO  going to shutdown ...
2014-03-11T22:20:49.6208
13+00:00 app[web.1]: [2014-03-11 22:20:49] INFO  WEBrick::HTTPServer#start done.
2014-03-11T22:20:49.620543+00:00 app[web.1]:    /app/vendor/ruby-2.1.0/lib/ruby/2.1.0/webrick/server.rb:160:in `start'
2014-03-11T22:20:49.620543+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'
2014-03-11T22:20:49.620543+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/commands/server.rb:84:in `start'
2014-03-11T22:20:49.620813+00:00 app[web.1]:    script/rails:6:in `require'
2014-03-11T22:20:50.029921+00:00 app[web.1]: I, [2014-03-11T22:12:02.286727 #2]  INFO -- :   Parameters: {"path"=>"assets/cklogofav-3-9930462f9db3339250531111fc95e41b"}
2014-03-11T22:20:50.029921+00:00 app[web.1]: I, [2014-03-11T22:12:02.293999 #2]  INFO -- :   Rendered pages/home.html.erb within layouts/application (6.2ms)
2014-03-11T22:20:50.029921+00:00 app[web.1]: I, [2014-03-11T22:12:02.394070 #2]  INFO -- : Started GET "/assets/cklogofav-3-9930462f9db3339250531111fc95e41b.ico" for 72.89.243.219 at 2014-03-11 22:12:02 +0000
2014-03-11T22:20:50.029921+00:00 app[web.1]: I, [2014-03-11T22:12:02.395482 #2]  INFO -- : Processing by PagesController#home as 
2014-03-11T22:20:50.030199+00:00 app[web.1]: I, [2014-03-11T22:17:00.739804 #2]  INFO -- : Processing by PagesController#home as 
2014-03-11T22:20:50.030199+00:00 app[web.1]: I, [2014-03-11T22:17:01.597643 #2]  INFO -- : Started GET "/assets/cklogofav-3-9930462f9db3339250531111fc95e41b.ico" for 72.89.243.219 at 2014-03-11 22:17:01 +0000
2014-03-11T22:20:50.030392+00:00 app[web.1]: Exiting
2014-03-11T22:20:50.029921+00:00 app[web.1]: I, [2014-03-11T22:12:02.286636 #2]  INFO -- : Processing by PagesController#home as 
2014-03-11T22:20:50.029921+00:00 app[web.1]: I, [2014-03-11T22:12:02.425872 #2]  INFO -- : Completed 200 OK in 30ms (Views: 29.6ms | ActiveRecord: 0.0ms)
2014-03-11T22:20:50.029921+00:00 app[web.1]: I, [2014-03-11T22:12:02.285168 #2]  INFO -- : Started GET "/assets/cklogofav-3-9930462f9db3339250531111fc95e41b.ico" for 72.89.243.219 at 2014-03-11 22:12:02 +0000
2014-03-11T22:20:50.030199+00:00 app[web.1]: I, [2014-03-11T22:17:00.765924 #2]  INFO -- :   Rendered pages/home.html.erb within layouts/application (24.9ms)
2014-03-11T22:20:50.030199+00:00 app[web.1]: I, [2014-03-11T22:17:01.599473 #2]  INFO -- : Processing by PagesController#home as 
2014-03-11T22:20:50.030199+00:00 app[web.1]: I, [2014-03-11T22:17:00.738434 #2]  INFO -- : Started GET "/assets/cklogofav-3-9930462f9db3339250531111fc95e41b.ico" for 72.89.243.219 at 2014-03-11 22:17:00 +0000
2014-03-11T22:20:50.029921+00:00 app[web.1]: I, [2014-03-11T22:12:02.295601 #2]  INFO -- : Completed 200 OK in 9ms (Views: 8.2ms | ActiveRecord: 0.0ms)
2014-03-11T22:20:50.030199+00:00 app[web.1]: I, [2014-03-11T22:17:00.739924 #2]  INFO -- :   Parameters: {"path"=>"assets/cklogofav-3-9930462f9db3339250531111fc95e41b"}
2014-03-11T22:20:50.030199+00:00 app[web.1]: I, [2014-03-11T22:17:00.768061 #2]  INFO -- : Completed 200 OK in 28ms (Views: 27.4ms | ActiveRecord: 0.0ms)
2014-03-11T22:20:50.030199+00:00 app[web.1]: I, [2014-03-11T22:17:01.609473 #2]  INFO -- :   Rendered pages/home.html.erb within layouts/application (8.7ms)
2014-03-11T22:20:50.029921+00:00 app[web.1]: I, [2014-03-11T22:12:02.395572 #2]  INFO -- :   Parameters: {"path"=>"assets/cklogofav-3-9930462f9db3339250531111fc95e41b"}
2014-03-11T22:20:50.030199+00:00 app[web.1]: I, [2014-03-11T22:17:01.611496 #2]  INFO -- : Completed 200 OK in 12ms (Views: 11.2ms | ActiveRecord: 0.0ms)
2014-03-11T22:20:50.029921+00:00 app[web.1]: I, [2014-03-11T22:12:02.424092 #2]  INFO -- :   Rendered pages/home.html.erb within layouts/application (27.4ms)
2014-03-11T22:20:50.030199+00:00 app[web.1]: I, [2014-03-11T22:17:01.599569 #2]  INFO -- :   Parameters: {"path"=>"assets/cklogofav-3-9930462f9db3339250531111fc95e41b"}
2014-03-11T22:20:51.483362+00:00 heroku[web.1]: Process exited with status 143
2014-03-11T22:20:51.741149+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 44533 -e production`
2014-03-11T22:20:52.775839+00:00 app[web.1]: bash: bin/rails: No such file or directory
2014-03-11T22:20:54.194013+00:00 heroku[web.1]: State changed from starting to crashed
2014-03-11T22:20:54.194791+00:00 heroku[web.1]: State changed from crashed to starting
2014-03-11T22:20:54.183143+00:00 heroku[web.1]: Process exited with status 127
2014-03-11T22:21:02.204687+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 45423 -e production`
2014-03-11T22:21:03.385793+00:00 app[web.1]: bash: bin/rails: No such file or directory
2014-03-11T22:21:04.708655+00:00 heroku[web.1]: Process exited with status 127
2014-03-11T22:21:04.718635+00:00 heroku[web.1]: State changed from starting to crashed
2014-03-11T22:21:06.104489+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=still-caverns-3613.herokuapp.com request_id=3b460675-d8bc-4750-ab4c-b7e86a6c8a94 fwd="72.89.243.219" dyno= connect= service= status=503 bytes=
2014-03-11T22:21:07.193734+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=still-caverns-3613.herokuapp.com request_id=70d1c3e8-a141-41cb-9281-c2c327b8e610 fwd="72.89.243.219" dyno= connect= service= status=503 bytes=
2014-03-11T22:21:06.931139+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=still-caverns-3613.herokuapp.com request_id=c61889ea-2435-4410-9a64-baa89cfd5317 fwd="72.89.243.219" dyno= connect= service= status=503 bytes=
2014-03-11T22:21:07.152744+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=still-caverns-3613.herokuapp.com request_id=8142b5b3-326e-4881-b502-54a28150493e fwd="72.89.243.2
19" dyno= connect= service= status=503 bytes=
2014-03-11T22:22:55.540143+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=still-caverns-3613.herokuapp.com request_id=8fc1c507-db5c-4a4f-a3b4-5fdd20610f23 fwd="72.89.243.219" dyno= connect= service= status=503 bytes=
2014-03-11T22:22:54.445423+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=still-caverns-3613.herokuapp.com request_id=1dd969dd-5af5-446d-bde4-d374f98ef1a4 fwd="72.89.243.219" dyno= connect= service= status=503 bytes=

Happy to provide any additional information to help resolve. Thanks in advance!

Upvotes: 1

Views: 198

Answers (2)

jordelver
jordelver

Reputation: 8432

Heroku is trying to start your app with bin/rails, but it does not exist.

This is because bin/rails didn't exist until Rails 4.

You should be able to add the missing file with rake rails:update:bin

If you add those files to git and then re-deploy, it should work.

I notice that you're using WEBrick to serve your app. I would recommend using another web server, such as Thin, as WEBrick is not really suitable for production use. You can do this by adding gem 'thin' to your Gemfile, bundle install, commit your changes and it will use Thin instead.

Upvotes: 3

When upgrading to Rails 4 this railscast is very useful: http://railscasts.com/episodes/415-upgrading-to-rails-4

Upvotes: 0

Related Questions