Application Error when deploying a simple rack application on heroku - ruby-on-rails

i am trying to deploy my app on heroku
it contains 5 files
1.config.ru
with code
require 'rack'
require './myapp'
run MyApp.new
2.Gemfile
with code
source "http://rubygems.org"
gem 'grape'
gem 'sequel'
gem 'heroku'
gem 'rake'
gem 'pg'
gem 'rack'
group :test do
gem "rspec", "~> 2.12.0"
gem "rack-test", "~> 0.6.2"
gem "rspec-core", "~> 2.12.2"
gem "rspec-expectations", "~> 2.12.1"
gem "rspec-mocks", "~> 2.12.1"
gem "capybara", "~> 2.0.2"
gem "nokogiri", "~> 1.5.6"
end
3.Gemfile.lock which is created automatically
4.myapp.rb with code
# my_app.rb
class MyApp
def call env
[200, {"Content-Type" => "text/html"}, ["Hello Rack Participants"]]
end
end
5.Procfile with code
web: bundle exec rackup config.ru
then i call bundle install
after that rackup config.ru
its working perfectly fine as expected
but after that i try to deploy it on heroku and getting application error
i executed following commands for this
git init
git add .
git commit -m "initial commit"
heroku create
git push heroku master
heroku open
a web browser open with application error
when i run command heroku logs
then its giving me logs
2013-02-04T05:34:17+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=quiet-caverns-8170.herokuapp.com fwd=121.245.34.235 dyno= queue= wait= connect= service= status=503 bytes=
can any one please help why i am getting this error on heroku and hopw to rectify it??
here is full logs for heroku
2013-02-04T05:30:44+00:00 heroku[api]: Scale to web=1 by ritesh#iritesh.com
2013-02-04T05:30:44+00:00 heroku[api]: Attach HEROKU_POSTGRESQL_CYAN resource by ritesh#iritesh.com
2013-02-04T05:30:44+00:00 heroku[api]: Release v3 created by ritesh#iritesh.com
2013-02-04T05:30:45+00:00 heroku[api]: Add DATABASE_URL config by ritesh#iritesh.com
2013-02-04T05:30:45+00:00 heroku[api]: Release v4 created by ritesh#iritesh.com
2013-02-04T05:30:45+00:00 heroku[api]: Add config by ritesh#iritesh.com
2013-02-04T05:30:45+00:00 heroku[api]: Release v5 created by ritesh#iritesh.com
2013-02-04T05:30:45+00:00 heroku[api]: Release v6 created by ritesh#iritesh.com
2013-02-04T05:30:45+00:00 heroku[api]: Deploy 243e86c by ritesh#iritesh.com
2013-02-04T05:30:51+00:00 heroku[web.1]: Starting process with command `bundle exec ruby web.rb`
2013-02-04T05:30:52+00:00 app[web.1]: bash: bundle: command not found
2013-02-04T05:30:53+00:00 heroku[web.1]: Process exited with status 127
2013-02-04T05:30:56+00:00 heroku[web.1]: Starting process with command `bundle exec ruby web.rb`
2013-02-04T05:30:58+00:00 app[web.1]: ruby: No such file or directory -- web.rb (LoadError)
2013-02-04T05:31:00+00:00 heroku[web.1]: Process exited with status 1
2013-02-04T05:31:00+00:00 heroku[web.1]: State changed from starting to crashed
2013-02-04T05:31:00+00:00 heroku[web.1]: State changed from crashed to starting
2013-02-04T05:31:13+00:00 heroku[web.1]: Starting process with command `bundle exec ruby web.rb`
2013-02-04T05:31:19+00:00 heroku[web.1]: State changed from starting to crashed
2013-02-04T05:31:22+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=quiet-caverns-8170.herokuapp.com fwd=121.245.34.235 dyno= queue= wait= connect= service= status=503 bytes=
2013-02-04T05:31:22+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=quiet-caverns-8170.herokuapp.com fwd=121.245.34.235 dyno= queue= wait= connect= service= status=503 bytes=
2013-02-04T05:31:18+00:00 app[web.1]: ruby: No such file or directory -- web.rb (LoadError)
2013-02-04T05:31:19+00:00 heroku[web.1]: Process exited with status 1
2013-02-04T05:33:42+00:00 heroku[slugc]: Slug compilation started
2013-02-04T05:33:52+00:00 heroku[api]: Release v7 created by ritesh#iritesh.com
2013-02-04T05:33:52+00:00 heroku[api]: Deploy eb490fb by ritesh#iritesh.com
2013-02-04T05:33:52+00:00 heroku[web.1]: State changed from crashed to starting
2013-02-04T05:33:53+00:00 heroku[slugc]: Slug compilation finished
2013-02-04T05:33:59+00:00 heroku[web.1]: State changed from starting to crashed
2013-02-04T05:34:17+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=quiet-caverns-8170.herokuapp.com fwd=121.245.34.235 dyno= queue= wait= connect= service= status=503 bytes=
2013-02-04T05:33:55+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru`
2013-02-04T05:33:58+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-02-04T05:33:57+00:00 app[web.1]: [2013-02-04 05:33:57] INFO WEBrick::HTTPServer#start: pid=2 port=9292
2013-02-04T05:33:58+00:00 heroku[web.1]: Error R11 (Bad bind) -> Process bound to port 9292, should be 16705 (see environment variable PORT)
2013-02-04T05:33:57+00:00 app[web.1]: [2013-02-04 05:33:57] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux]
2013-02-04T05:33:57+00:00 app[web.1]: [2013-02-04 05:33:57] INFO WEBrick 1.3.1
2013-02-04T05:33:59+00:00 heroku[web.1]: Process exited with status 137
2013-02-04T05:41:22+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru`
2013-02-04T05:41:19+00:00 heroku[web.1]: State changed from crashed to starting
2013-02-04T05:41:24+00:00 app[web.1]: [2013-02-04 05:41:24] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux]
2013-02-04T05:41:24+00:00 app[web.1]: [2013-02-04 05:41:24] INFO WEBrick 1.3.1
2013-02-04T05:41:24+00:00 app[web.1]: [2013-02-04 05:41:24] INFO WEBrick::HTTPServer#start: pid=2 port=9292
2013-02-04T05:41:25+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-02-04T05:41:25+00:00 heroku[web.1]: Error R11 (Bad bind) -> Process bound to port 9292, should be 46347 (see environment variable PORT)
2013-02-04T05:41:26+00:00 heroku[web.1]: Process exited with status 137
2013-02-04T05:41:26+00:00 heroku[web.1]: State changed from starting to crashed
2013-02-04T05:51:59+00:00 heroku[web.1]: Error R11 (Bad bind) -> Process bound to port 9292, should be 15335 (see environment variable PORT)
2013-02-04T05:51:57+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru`
2013-02-04T05:51:59+00:00 app[web.1]: [2013-02-04 05:51:59] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux]
2013-02-04T05:51:59+00:00 app[web.1]: [2013-02-04 05:51:59] INFO WEBrick 1.3.1
2013-02-04T05:51:59+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-02-04T05:51:59+00:00 app[web.1]: [2013-02-04 05:51:59] INFO WEBrick::HTTPServer#start: pid=2 port=9292
2013-02-04T05:52:01+00:00 hero
ku[web.1]: Process exited with status 137
2013-02-04T05:55:18+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=quiet-caverns-8170.herokuapp.com fwd=121.245.34.235 dyno= queue= wait= connect= service= status=503 bytes=
2013-02-04T05:55:19+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=quiet-caverns-8170.herokuapp.com fwd=121.245.34.235 dyno= queue= wait= connect= service= status=503 bytes=
2013-02-04T06:01:58+00:00 heroku[web.1]: State changed from crashed to starting
2013-02-04T06:02:04+00:00 heroku[web.1]: State changed from starting to crashed
2013-02-04T06:12:11+00:00 heroku[web.1]: State changed from crashed to starting
2013-02-04T06:12:14+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru`
2013-02-04T06:12:18+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-02-04T06:12:17+00:00 app[web.1]: [2013-02-04 06:12:17] INFO WEBrick 1.3.1
2013-02-04T06:12:17+00:00 app[web.1]: [2013-02-04 06:12:17] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux]
2013-02-04T06:12:17+00:00 app[web.1]: [2013-02-04 06:12:17] INFO WEBrick::HTTPServer#start: pid=2 port=9292
2013-02-04T06:12:18+00:00 heroku[web.1]: Error R11 (Bad bind) -> Process bound to port 9292, should be 35684 (see environment variable PORT)
2013-02-04T06:12:19+00:00 heroku[web.1]: State changed from starting to crashed
2013-02-04T06:12:19+00:00 heroku[web.1]: Process exited with status 137

It looks like you're not specifying the correct port for the app to run on. Try switching your Procfile to the following
web: bundle exec rackup config.ru -p $PORT -E $RACK_ENV
See Deploy Sinatra app on Heroku and Deploying sinatra app (with config.ru) on heroku cedar stack for similar questions.

You are not binding to the port in $PORT, so we kill your process. You must change your Procfile to include -p $PORT.

Related

"How to fix 'App crashed' on heroku in cmd prompt"

I am trying to launch my app on heroku. Yet when I execute heroku open command I see that it is giving an issue in the logs that "App crashed"
Tried checking logs and restarting rails server.
heroku logs --app obscure-beyond-78036
CMD
2019-10-08T19:49:11.686542+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=obscure-beyond-78036.herokuapp.com request_id=db281cf3-6b5b-46fa-b35d-72617b23a864 fwd="73.244.194.180" dyno= connect= service= status=503 bytes= protocol=https
Expected functionality is to launch the app on heroku.
Added logs
C:\r5.1>heroku logs --app obscure-beyond-78036
2019-11-09T22:31:51.129452+00:00 heroku[web.1]: State changed from crashed to starting
2019-11-09T22:31:56.935810+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 32098 -e production`
2019-11-09T22:31:59.364804+00:00 heroku[web.1]: State changed from starting to crashed
2019-11-09T22:31:59.370115+00:00 heroku[web.1]: State changed from crashed to starting
2019-11-09T22:31:59.344842+00:00 heroku[web.1]: Process exited with status 127
2019-11-09T22:31:59.274991+00:00 app[web.1]: /usr/bin/env: ‘ruby\r’: No such file or directory
2019-11-09T22:32:03.221294+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 37912 -e production`
2019-11-09T22:32:05.568964+00:00 heroku[web.1]: State changed from starting to crashed
2019-11-09T22:32:05.551998+00:00 heroku[web.1]: Process exited with status 127
2019-11-09T22:32:05.470297+00:00 app[web.1]: /usr/bin/env: ‘ruby\r’: No such file or directory
Check out docs about logs and how to work with them on Heroku
https://devcenter.heroku.com/articles/logging#log-retrieval
and ask again if the logs are not clear to you.
Also, a google search shows some typical issues with rails app on heroku, for example Heroku code=H10 desc="App crashed" - Can't figure out why it's crashing

Heroku deployment error H10 App crashed

I have a RoR app running locally, but when I deploy it to Heroku the App crashes with the H10 error.
As already stated in multiple questions, the error logs aren't very helpful. I followed all possible answers given for this question, but everything seems fine:
'git push heroku master' - deployment worked fine
'heroku run rake db:migrate' - Migrations worked fine (Initially had to modify one of the migrations file since it was throwing an error around 'casting to integer type' directly
Tried 'heroku restart' and 'heroku run rails console' - Both commands worked fine but the app still crashes. Rails console is working fine.
Would be really great if someone could help me figure out the problem. Any pointers on how to debug would be helpful too since the logs are not revealing much.
Thanks in advance!
The logs are as follows:
2017-02-07T12:54:24.270796+00:00 app[api]: Deploy ccdb832 by user
hrishikeshpardeshi#gmail.com 2017-02-07T12:54:24.707255+00:00
app[api]: Release v7 created by user hrishikeshpardeshi#gmail.com
2017-02-07T12:54:25.059219+00:00 heroku[web.1]: State changed from
crashed to starting 2017-02-07T12:54:30.496466+00:00 heroku[web.1]:
Starting process with command bundle exec puma -C config/puma.rb
2017-02-07T12:54:33.433084+00:00 app[web.1]: bundler: command not
found: puma 2017-02-07T12:54:33.433103+00:00 app[web.1]: Install
missing gem executables with bundle install
2017-02-07T12:54:33.547470+00:00 heroku[web.1]: State changed from
starting to crashed 2017-02-07T12:54:33.548434+00:00 heroku[web.1]:
State changed from crashed to starting
2017-02-07T12:54:33.533288+00:00 heroku[web.1]: Process exited with
status 127 2017-02-07T12:54:39.076000+00:00 heroku[web.1]: Starting
process with command bundle exec puma -C config/puma.rb
2017-02-07T12:54:41.312542+00:00 app[web.1]: bundler: command not
found: puma 2017-02-07T12:54:41.312561+00:00 app[web.1]: Install
missing gem executables with bundle install
2017-02-07T12:54:41.273272+00:00 app[api]: Starting process with
command bundle install by user hrishikeshpardeshi#gmail.com
2017-02-07T12:54:41.437332+00:00 heroku[web.1]: State changed from
starting to crashed 2017-02-07T12:54:41.406962+00:00 heroku[web.1]:
Process exited with status 127 2017-02-07T12:54:46.473525+00:00
heroku[run.3853]: Awaiting client 2017-02-07T12:54:46.699719+00:00
heroku[run.3853]: Starting process with command bundle install
2017-02-07T12:54:46.645765+00:00 heroku[run.3853]: State changed from
starting to up 2017-02-07T12:54:56.711109+00:00 heroku[run.3853]:
Process exited with status 0 2017-02-07T12:54:56.721230+00:00
heroku[run.3853]: State changed from up to complete
2017-02-07T12:55:06.351307+00:00 app[api]: Starting process with
command bundle exec rake db:migrate by user
hrishikeshpardeshi#gmail.com 2017-02-07T12:55:11.878496+00:00
heroku[run.9062]: Awaiting client 2017-02-07T12:55:11.910846+00:00
heroku[run.9062]: Starting process with command bundle exec rake
db:migrate 2017-02-07T12:55:12.003058+00:00 heroku[run.9062]: State
changed from starting to up 2017-02-07T12:55:19.873613+00:00
heroku[run.9062]: Process exited with status 1
2017-02-07T12:55:19.885944+00:00 heroku[run.9062]: State changed from
up to complete 2017-02-07T12:57:38.720579+00:00 heroku[web.1]: State
changed from crashed to starting 2017-02-07T12:57:38.465627+00:00
app[api]: Release v8 created by user hrishikeshpardeshi#gmail.com
2017-02-07T12:57:38.465627+00:00 app[api]: Deploy a1c8e6d by user
hrishikeshpardeshi#gmail.com 2017-02-07T12:57:38.597661+00:00
heroku[slug-compiler]: Slug compilation started
2017-02-07T12:57:38.597673+00:00 heroku[slug-compiler]: Slug
compilation finished 2017-02-07T12:57:38.642076+00:00 app[api]:
Release v8 created by user hrishikeshpardeshi#gmail.com
2017-02-07T12:57:43.187357+00:00 heroku[web.1]: Starting process with
command bundle exec puma -C config/puma.rb
2017-02-07T12:57:45.183178+00:00 app[web.1]: bundler: command not
found: puma 2017-02-07T12:57:45.183197+00:00 app[web.1]: Install
missing gem executables with bundle install
2017-02-07T12:57:45.314860+00:00 heroku[web.1]: State changed from
starting to crashed 2017-02-07T12:57:45.301215+00:00 heroku[web.1]:
Process exited with status 127 2017-02-07T12:57:59.399411+00:00
app[api]: Starting process with command bundle exec rake db:migrate
by user hrishikeshpardeshi#gmail.com 2017-02-07T12:58:04.149041+00:00
heroku[run.7804]: Awaiting client 2017-02-07T12:58:04.193819+00:00
heroku[run.7804]: Starting process with command bundle exec rake
db:migrate 2017-02-07T12:58:04.384181+00:00 heroku[run.7804]: State
changed from starting to up 2017-02-07T12:58:11.107702+00:00
heroku[run.7804]: Process exited with status 0
2017-02-07T12:58:11.116829+00:00 heroku[run.7804]: State changed from
up to complete 2017-02-07T12:58:19.462586+00:00 heroku[router]:
at=error code=H10 desc="App crashed" method=GET path="/"
host=fast-refuge-78538.herokuapp.com
request_id=79f2a39b-18a0-440c-8568-77900729062f fwd="14.139.123.62"
dyno= connect= service= status=503 bytes=
2017-02-07T12:58:24.892436+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/"
host=fast-refuge-78538.herokuapp.com
request_id=5362493e-5ccc-4377-8540-a144ec15757c fwd="14.139.123.62"
dyno= connect= service= status=503 bytes=
2017-02-07T12:59:43.955445+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/"
host=fast-refuge-78538.herokuapp.com
request_id=1a58fff9-5c78-4257-af94-8fd01d153a5d fwd="14.139.123.62"
dyno= connect= service= status=503 bytes=
It looks like it is trying to use puma bundler: command not found: puma which is now the heroku recommended server.
Try adding puma to your gemfile: gem 'puma', '~> 3.4' and then push to heroku again.

Failed in deploying to Heroku

When deploying my Ruby on Rails app to heroku, I get an application error page, here
When typing heroku logs in my terminal line, I get the following information which I do not know how to process? Can anyone tell me what I need to do to solve the issue?
2016-07-11T11:12:32.333185+00:00 heroku[api]: Release v2 created by nicholas.wenzel#internsgopro.com
2016-07-11T11:12:32.333065+00:00 heroku[api]: Enable Logplex by nicholas.wenzel#internsgopro.com
2016-07-11T11:13:09.721816+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby app
2016-07-11T11:13:09.721807+00:00 heroku[slug-compiler]: Slug compilation started
2016-07-11T11:17:24.819913+00:00 heroku[api]: Set LANG, RACK_ENV, RAILS_ENV, RAILS_SERVE_STATIC_FILES, SECRET_KEY_BASE config vars by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:24.820006+00:00 heroku[api]: Release v3 created by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:25.503120+00:00 heroku[api]: Attach DATABASE (#ref:postgresql-rectangular-14432) by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:25.503211+00:00 heroku[api]: Release v4 created by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:25.942507+00:00 heroku[api]: Scale to web=1 by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:25.943837+00:00 heroku[api]: Release v5 created by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:25.943474+00:00 heroku[api]: Deploy d12e1f4 by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:26.383271+00:00 heroku[slug-compiler]: Slug compilation started
2016-07-11T11:17:26.383275+00:00 heroku[slug-compiler]: Slug compilation finished
2016-07-11T11:17:28.217297+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 40742 -e production`
2016-07-11T11:17:29.955175+00:00 app[web.1]: bash: bin/rails: No such file or directory
2016-07-11T11:17:30.862720+00:00 heroku[web.1]: Process exited with status 127
2016-07-11T11:17:30.877538+00:00 heroku[web.1]: State changed from starting to crashed
2016-07-11T11:17:30.878343+00:00 heroku[web.1]: State changed from crashed to starting
2016-07-11T11:17:33.707325+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 13244 -e production`
2016-07-11T11:17:35.968520+00:00 app[web.1]: bash: bin/rails: No such file or directory
2016-07-11T11:17:37.094194+00:00 heroku[web.1]: State changed from starting to crashed
2016-07-11T11:17:37.083048+00:00 heroku[web.1]: Process exited with status 127
2016-07-11T11:17:38.324735+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=secret-fjord-97193.herokuapp.com request_id=2fb7b183-2953-4290-a56e-cc4ab8000f5b fwd="31.179.119.186" dyno= connect= service= status=503 bytes=
2016-07-11T11:17:39.262796+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=secret-fjord-97193.herokuapp.com request_id=7a1d15d7-9ce4-44b2-ab29-3853c0223b06 fwd="31.179.119.186" dyno= connect= service= status=503 bytes=
2016-07-11T11:18:47.008968+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by nicholas.wenzel#internsgopro.com
2016-07-11T11:18:50.699273+00:00 heroku[run.8742]: Awaiting client
2016-07-11T11:18:50.745068+00:00 heroku[run.8742]: Starting process with command `bundle exec rake db:migrate`
2016-07-11T11:18:50.800462+00:00 heroku[run.8742]: State changed from starting to up
2016-07-11T11:18:57.245641+00:00 heroku[run.8742]: Process exited with status 0
2016-07-11T11:18:57.263781+00:00 heroku[run.8742]: State changed from up to complete
2016-07-11T11:19:05.165252+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=secret-fjord-97193.herokuapp.com request_id=1847e12b-66b1-44a9-8f5a-b50505aeb464 fwd="31.179.119.186" dyno= connect= service= status=503 bytes=
2016-07-11T11:19:41.487888+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=secret-fjord-97193.herokuapp.com request_id=631d71c7-d998-48d6-acd8-5ea507ba4554 fwd="31.179.119.186" dyno= connect= service= status=503 bytes=
2016-07-11T11:20:03.603738+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=secret-fjord-97193.herokuapp.com request_id=ceef2839-b13b-4794-9e17-1a87b8b344f8 fwd="31.179.119.186" dyno= connect= service= status=503 bytes=
Run rake rails:update:bin to create a bin folder that was added in rails4, then make a commit and push to Heroku. Hope this helps.

Getting Heroku h10 error when it works locally

Currently I am getting a h10 app crashed error even though it works locally and the logs do not seem very helpful. The log first has the error
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within
60 seconds of launch before getting the error at=error code=H10
desc="App crashed" method=GET path="/favicon.ico"
host=maitri-compassionate-care-app.herokuapp.com
request_id=602ed7f2-118f-43b2-b57f-077b89c7b2c4 fwd="98.248.251.49"
dyno= connect= service= status=503 bytes=
Here is the log:
2016-04-29T01:44:39.917289+00:00 heroku[slug-compiler]: Slug compilation started
2016-04-29T01:44:39.917299+00:00 heroku[slug-compiler]: Slug compilation finished
2016-04-29T01:44:41.023311+00:00 heroku[web.1]: State changed from crashed to starting
2016-04-29T01:44:43.205739+00:00 heroku[web.1]: Starting process with command `bundle exec rails s`
2016-04-29T01:44:46.498256+00:00 app[web.1]: DEPRECATION WARNING: The configuration option `config.serve_static_assets` has been renamed to `config.serve_static_files` to clarify its role (it merely enables serving everything in the `public` folder and is unrelated to the asset pipeline). The `serve_static_assets` alias will be removed in Rails 5.0. Please migrate your configuration files accordingly. (called from block in <top (required)> at /app/config/environments/production.rb:2)
2016-04-29T01:44:46.880147+00:00 app[web.1]: [2016-04-29 01:44:46] INFO WEBrick 1.3.1
2016-04-29T01:44:46.880438+00:00 app[web.1]: [2016-04-29 01:44:46] INFO WEBrick::HTTPServer#start: pid=3 port=3000
2016-04-29T01:44:46.880180+00:00 app[web.1]: [2016-04-29 01:44:46] INFO ruby 2.2.2 (2015-04-13) [x86_64-linux]
2016-04-29T01:45:43.548293+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-04-29T01:45:43.548293+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-04-29T01:45:44.291920+00:00 heroku[web.1]: Process exited with status 137
2016-04-29T01:45:44.312346+00:00 heroku[web.1]: State changed from starting to crashed
2016-04-29T01:45:48.319822+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=maitri-compassionate-care-app.herokuapp.com request_id=242958be-0403-4b41-aec9-c2d1603630a2 fwd="98.248.251.49" dyno= connect= service= status=503 bytes=
2016-04-29T01:45:48.178954+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=maitri-compassionate-care-app.herokuapp.com request_id=ae7f2a3a-d65e-4829-84b6-74c178e2973d fwd="98.248.251.49" dyno= connect= service= status=503 bytes=
2016-04-29T01:45:49.055039+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=maitri-compassionate-care-app.herokuapp.com request_id=602ed7f2-118f-43b2-b57f-077b89c7b2c4 fwd="98.248.251.49" dyno= connect= service= status=503 bytes=
I have tried heroku restart, heroku ps restart, and rake rails update bin but none of them seem to help. I am not sure how to get a more specific error besides just a timeout and a crash.
Thanks
It looks like your app is using WEBrick as the web server. This is fine for a local development environment, but it shouldn't be used in a production environment such as when deployed to Heroku.
Heroku recommends using puma as the production server. Detailed instructions can be found in their dev center documentation.
https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server
From Heroku docs:
In the Common Runtime, a web dyno must bind to its assigned $PORT within 60 seconds of startup. If it doesn’t, it is terminated by the dyno manager and a R10 Boot Timeout error is logged. Processes can bind to other ports before and after binding to $PORT.
According to your logs, WEBrick is running on port 3000 instead of $PORT, leaving $PORT unbound to trip the 60-second timeout. WEBrick must be configured to start on the Heroku-assigned port $PORT. You can do that with a Procfile.
Create a Procfile, named exactly that, with the following line:
web: bundle exec rails server -p $PORT
Then (from the docs):
For Heroku to use your Procfile, add the Procfile to the root directory of your application, then push to Heroku:
$ git add .
$ git commit -m "Procfile"
$ git push heroku

Heroku Application Error when opening Rails Tutorial Sample App

The app works perfectly in development, but it won't open in Heroku. I've executed heroku run rake db:migrate, and I have the pg gem in my Gemfile. I'm a newbie so any help interpreting the logs is greatly appreciated (see logs below Gemfile).
Gemfile
source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.0'
gem 'bootstrap-sass', '2.3.2.0'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.1.2'
gem 'will_paginate', '3.0.4'
gem 'bootstrap-will_paginate', '0.0.9'
gem 'execjs', '1.4.0'
group :development, :test do
gem 'sqlite3', '1.3.7'
gem 'rspec-rails', '2.13.1'
# The following optional lines are part of the advanced setup.
gem 'guard-rspec', '2.5.0'
gem 'spork-rails', github: 'sporkrb/spork-rails'
gem 'guard-spork', '1.5.0'
gem 'childprocess', '0.3.6'
end
group :test do
gem 'selenium-webdriver', '2.0.0'
gem 'capybara', '2.1.0'
gem 'factory_girl_rails', '4.2.0'
gem 'cucumber-rails', '1.3.0', :require => false
gem 'database_cleaner', github: 'bmabey/database_cleaner'
# Uncomment this line on OS X.
# gem 'growl', '1.0.3'
# Uncomment these lines on Linux.
# gem 'libnotify', '0.8.0'
# Uncomment these lines on Windows.
# gem 'rb-notifu', '0.0.4'
# gem 'win32console', '1.3.2'
end
gem 'sass-rails', '4.0.0'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.0'
gem 'jquery-rails', '2.2.1'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end
Heroku Logs
2013-08-07T07:20:48.191527+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-07T07:20:55.721992+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-08-07T07:20:55.721707+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-08-07T07:30:55.539343+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-07T07:30:59.366275+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 38150 -e $RAILS_ENV`
2013-08-07T07:31:00.198943+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-08-07T07:31:01.456201+00:00 heroku[web.1]: Process exited with status 127
2013-08-07T07:31:01.468706+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-07T07:31:09.462367+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-08-07T07:31:09.462587+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-08-07T07:41:32.224698+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-07T07:48:01.169884+00:00 heroku[web.1]: State changed from starting to down
2013-08-08T16:28:35+00:00 heroku[slug-compiler]: Slug compilation started
2013-08-08T16:30:21.321235+00:00 heroku[api]: Deploy 584d5dd by lionelramos#hotmail.com
2013-08-08T16:30:21.361053+00:00 heroku[api]: Release v9 created by lionelramos#hotmail.com
2013-08-08T16:30:21.408802+00:00 heroku[api]: Deploy 584d5dd by lionelramos#hotmail.com
2013-08-08T16:30:21.776973+00:00 heroku[web.1]: State changed from down to starting
2013-08-08T16:30:22+00:00 heroku[slug-compiler]: Slug compilation finished
2013-08-08T16:30:27.193957+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 54367 -e $RAILS_ENV`
2013-08-08T16:30:28.323977+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-08-08T16:30:29.641426+00:00 heroku[web.1]: Process exited with status 127
2013-08-08T16:30:29.653233+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-08T16:30:29.654038+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-08T16:30:33.329442+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 46009 -e $RAILS_ENV`
2013-08-08T16:30:33.987177+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-08-08T16:30:35.114974+00:00 heroku[web.1]: Process exited with status 127
2013-08-08T16:30:35.131772+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-08T16:30:39.524101+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:30:39.758914+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:30:43.397387+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-08-08T16:30:43.397150+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-08-08T16:31:18.425700+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:31:18.591149+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:31:28.469629+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:31:28.701988+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:32:03.650372+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:32:03.853597+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:32:48.963826+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:32:49.453647+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:33:47.304289+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:33:47.595892+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:38:29.879368+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-08T16:38:33.796829+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 8363 -e $RAILS_ENV`
2013-08-08T16:38:34.801683+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-08-08T16:38:36.319899+00:00 heroku[web.1]: Process exited with status 127
2013-08-08T16:38:36.336545+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-08T16:38:44.044665+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-08-08T16:38:44.044934+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-08-08T16:39:12.507540+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by lionelramos#hotmail.com
2013-08-08T16:39:17.159747+00:00 heroku[run.7755]: Awaiting client
2013-08-08T16:39:17.205425+00:00 heroku[run.7755]: Starting process with command `bundle exec rake db:migrate`
2013-08-08T16:39:18.501286+00:00 heroku[run.7755]: State changed from starting to up
2013-08-08T16:39:22.316247+00:00 heroku[run.7755]: State changed from up to complete
2013-08-08T16:39:22.300345+00:00 heroku[run.7755]: Process exit
ed with status 0
2013-08-08T16:39:40.520653+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-08T16:39:44.026519+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 16810 -e $RAILS_ENV`
2013-08-08T16:39:44.559308+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-08-08T16:39:45.606931+00:00 heroku[web.1]: Process exited with status 127
2013-08-08T16:39:45.623487+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-08T16:39:48.820868+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:39:49.063725+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:39:54.502024+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-08-08T16:39:54.501841+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-08-08T16:40:36.227715+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-08T16:40:40.500864+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 18671 -e $RAILS_ENV`
2013-08-08T16:40:41.165579+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-08-08T16:40:42.992519+00:00 heroku[web.1]: Proc
ess exited with status 127
2013-08-08T16:40:43.004269+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-08T16:49:52+00:00 heroku[slug-compiler]: Slug compilation started
2013-08-08T16:50:16.937021+00:00 heroku[api]: Deploy 6d2b02d by lionelramos#hotmail.com
2013-08-08T16:50:16.974839+00:00 heroku[api]: Release v10 created by lionelramos#hotmail.com
2013-08-08T16:50:17.016095+00:00 heroku[api]: Deploy 6d2b02d by lionelramos#hotmail.com
2013-08-08T16:50:17.300414+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-08T16:50:17+00:00 heroku[slug-compiler]: Slug compilation finished
2013-08-08T16:50:33.077888+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by lionelramos#hotmail.com
2013-08-08T16:50:36.009069+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 53499 -e $RAILS_ENV`
2013-08-08T16:50:36.872168+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-08-08T16:50:38.282632+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-08T16:50:38.282632+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-08T16:50:38.374822+00:00 heroku[web.1]: Process exited with status 127
2013-08-08T16:50:40.217842+00:00 heroku[run.9716]: Awaiting client
2013-08-08T16:50:40.270232+00:00 heroku[run.9716]: Starting process with command `bundle exec rake db:migrate`
2013-08-08T16:50:41.485820+00:00 heroku[run.9716]: State changed from starting to up
2013-08-08T16:50:44.073086+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 4578 -e $RAILS_ENV`
2013-08-08T16:50:45.504279+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-08-08T16:50:46.122292+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-08-08T16:50:46.122487+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-08-08T16:50:47.269304+00:00 heroku[run.9716]: State changed from up to complete
2013-08-08T16:50:47.331637+00:00 heroku[web.1]: Process exited with status 127
2013-08-08T16:50:47.348525+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-08T16:50:47.251417+00:00 heroku[run.9716]: Process exited with status 0
2013-08-08T16:51:18.817119+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by lionelramos#hotmail.com
2013-08-08T16:51:25.576114+00:00 heroku[run.9125]: Awaiting client
2013-08-08T16:51:25.605481+00:00 heroku[run.9125]: Starting process with command `bundle exec rake db:migrate`
2013-08-08T16:51:27.036113+00:00 heroku[run.9125]: State changed from starting to up
2013-08-08T16:51:30.821318+00:00 heroku[run.9125]: Process exited with status 0
2013-08-08T16:51:30.838410+00:00 heroku[run.9125]: State changed from up to complete
2013-08-08T16:52:05.045633+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:52:05.283192+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:52:29.661946+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:52:29.904570+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
I think you are missing rake db:create.

Resources