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

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

Related

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.

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

Jruby on Rails not deploying to Heroku?

I've spent hours unsuccessfully trying to deploy my app to Heroku, and can't figure out the problem. I'm running on Windows and using JDK8 Jruby9.0.0.0. I set up using the instructions found here and deploy a new app using this tutorial. The exact commands I'm using are:
C:\Users\MyName>Jruby -S rails new MyApp
---
C:\Users\MyName>cd MyApp
---
C:\Users\MyName\MyApp>git init
---
C:\Users\MyName\MyApp>git add .
---
C:\Users\MyName\MyApp>git commit -m "my first commit"
---
C:\Users\MyName\MyApp>heroku create
---
C:\Users\MyName\MyApp>git push heroku master
---
C:\Users\MyName\MyApp>heroku open
Unfortunately this provides the following "Applicaton Error" when I try to open the app:
2015-11-04T19:28:36.377052+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 27765 -e production`
2015-11-04T19:28:38.105808+00:00 app[web.1]: /usr/bin/env: jruby.exe: No such file or directory
2015-11-04T19:28:38.976959+00:00 heroku[web.1]: Process exited with status 127
2015-11-04T19:28:38.994372+00:00 heroku[web.1]: State changed from starting to crashed
2015-11-04T19:28:38.995406+00:00 heroku[web.1]: State changed from crashed to starting
2015-11-04T19:28:40.545185+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 14126 -e production`
2015-11-04T19:28:41.946326+00:00 app[web.1]: /usr/bin/env: jruby.exe: No such file or directory
2015-11-04T19:28:42.503828+00:00 heroku[web.1]: State changed from starting to crashed
2015-11-04T19:28:42.496390+00:00 heroku[web.1]: Process exited with status 127
2015-11-04T19:28:43.384581+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=desolate-lake-2856.herokuapp.com request_id=7d58e322-072a-4e26-bfdf-53ff637ebe97 fwd="86.174.222.227" dyno= connect= service= status=503 bytes=
2015-11-04T19:28:43.638575+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=desolate-lake-2856.herokuapp.com request_id=af171d45-f0ce-4e2e-a0ba-1375cfb90601 fwd="86.174.222.227" dyno= connect= service= status=503 bytes=
2015-11-04T19:28:44.199636+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=desolate-lake-2856.herokuapp.com request_id=b0e25fc6-0497-4a6b-ac71-fde22c700e57 fwd="86.174.222.227" dyno= connect= service= status=503 bytes=
2015-11-04T19:28:44.922656+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=desolate-lake-2856.herokuapp.com request_id=d680200e-e6e2-4132-92fe-fcddf8df77f4 fwd="104.131.28.255" dyno= connect= service= status=503 bytes=
I've followed instructions found on SO which suggest renaming bin/bundle,rails,rake to remove the '.exe', but this does not work.
Any ideas on what is going wrong here? Thanks!
EDIT:
I should have said that the app cloned in the Heroku tutorial deploys to Heroku as it should, but unfortunately it is completely different in structure to the app created by the CMD command 'Jruby -S rails new MyApp'. The cloned app has no 'bin' directory, and the 'Jruby -S new' app has no procfile. I think this means that the problem lies with how the 'Jruby -S new' app is configured to deploy, i.e. I need to specify how the process should start? Both apps work locally.
I know I could clone the heroku app every time I create a new rails app, but this seems like a bit of a clunky work around!
It looks like you may have your bin/rails script checked into Git. And if that script was generated on Windows, I think it will have jruby.exe in it. Make sure you remove those files by running:
> git rm -rf bin
And then add bin/ to your `.gitignore to make sure it doesn't get back in. Then finally:
> git commit -am "remove bin scripts"
> git push heroku master

Application Error when deploying a simple rack application on heroku

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.

Error in heroku app after database created

I'm get this errors in my heroku logs. The database was created but this error is continually being logged
2013-01-31T18:06:06+00:00 heroku[run.9334]: Starting process with command `bundle exec rake db:migrate`
2013-01-31T18:06:06+00:00 heroku[run.9334]: Awaiting client
2013-01-31T18:06:06+00:00 heroku[run.9334]: State changed from starting to up
2013-01-31T18:06:02+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by overallduka#hotmail.com
2013-01-31T18:06:10+00:00 heroku[run.9334]: Client connection closed. Sending SIGHUP to all processes
2013-01-31T18:06:11+00:00 heroku[run.9334]: Process exited with status 0
2013-01-31T18:06:11+00:00 heroku[run.9334]: State changed from up to complete
2013-01-31T18:06:16+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=youimports.herokuapp.com fwd=189.73.162.46 dyno= queue= wait= connect= service= status=503 bytes=
Your logs don't show any issue with postgres, although it does fail during a rake db:migrate.
I would verify whether DATABASE_URL is pointing at your database with heroku config --app <your-app>. If it's not, just promote your database. To do that, find out what "color" your database is via heroku pg:info --app <your-app>, and then promote it via heroku pg:promote <color> --app <your-app>.

Resources