Heroku deployment error H10 App crashed - ruby-on-rails

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.

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

cannot run Heroku app from Hartl's Ruby on Rails Tutorial chapt 7

It has been asked many times already, but the previous solutions didn't work for me so far.
I'm a beginner, I'm trying to learn Rails and I'm following the famous tutorial from Hartl, I'm at chapter 7
This is the Github page of my project so far, and this is the Heroku app
the Heroku website says:
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.
$ heroku logs says:
app[api]: Initial release by user my.email#address.com
app[api]: Release v1 created by user my.email#address.com
app[api]: Release v2 created by user my.email#address.com
app[api]: Enable Logplex by user my.email#address.com
app[api]: Release v2 created by user my.email#address.com
app[api]: Starting process with command "rake db:migrate" by user my.email#address.com
heroku[run.5962]: Awaiting client
heroku[run.5962]: State changed from starting to up
heroku[run.5962]: Starting process with command "rake db:migrate"
heroku[run.5962]: Process exited with status 127
heroku[run.5962]: State changed from up to complete
app[api]: Starting process with command "rails db:migrate" by user my.email#address.com
heroku[run.3462]: State changed from starting to up
heroku[run.3462]: Awaiting client
heroku[run.3462]: Starting process with command "rails db:migrate"
heroku[run.3462]: State changed from up to complete
heroku[run.3462]: Process exited with status 127
app[api]: Build started by user my.email#address.com
app[api]: Set LANG, RACK_ENV, RAILS_ENV, RAILS_LOG_TO_STDOUT, RAILS_SERVE_STATIC_FILES, SECRET_KEY_BASE config vars by user my.email#address.com
app[api]: Release v3 created by user my.email#address.com
app[api]: Release v3 created by user my.email#address.com
app[api]: Release v4 created by user my.email#address.com
app[api]: Release v4 created by user my.email#address.com
app[api]: Attach DATABASE (#ref:postgresql-clear-76865) by user my.email#address.com
app[api]: Deploy ec2b24d by user my.email#address.com
app[api]: Scaled to console#0:Free rake#0:Free web#1:Free worker#0:Free by user my.email#address.com
app[api]: Release v5 created by user my.email#address.com
app[api]: Release v5 created by user my.email#address.com
app[api]: Build succeeded
heroku[web.1]: Starting process with command "bundle exec pume -C config/puma.rb"
app[web.1]: bundler: command not found: pume
app[web.1]: Install missing gem executables with "bundle install"
heroku[web.1]: State changed from starting to crashed
heroku[web.1]: State changed from crashed to starting
heroku[web.1]: Process exited with status 127
heroku[web.1]: Starting process with command "bundle exec pume -C config/puma.rb"
app[web.1]: bundler: command not found: pume
app[web.1]: Install missing gem executables with "bundle install"
heroku[web.1]: Process exited with status 127
heroku[web.1]: State changed from starting to crashed
app[api]: Starting process with command "bundle exec rake db:migrate" by user my.email#address.com
heroku[run.7856]: Awaiting client
heroku[run.7856]: Starting process with command "bundle exec rake db:migrate"
heroku[run.7856]: State changed from starting to up
heroku[run.7856]: Process exited with status 0
heroku[run.7856]: State changed from up to complete
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=infinite-thicket-26445.herokuapp.com request_id=c026b5fa-c5fd-49da-8117-8a237a54926a fwd="83.42.129.78" dyno= connect= service= status=503
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=infinite-thicket-26445.herokuapp.com request_id=b7fc3150-d64f-4496-b2c9-0e010eeed3b9 fwd="83.42.129.78" dyno= connect= service= status=503
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=infinite-thicket-26445.herokuapp.com request_id=8ed0ddde-7128-4efb-bf31-670c32129e8c fwd="83.42.129.78" dyno= connect= service= status=503
I have tried to do the migrations (both $ heroku run rails db:migrate and $ heroku run rake db:migrate)
I have tried restarting the Heroku dyno ($ heroku restart)
The app works locally brilliantly (on :development) and all the test from the book are in the green.
Output from $ heroku ps:
=== web (Free): bundle exec pume -C config/puma.rb (1)
web.1: crashed 2017/04/17 16:21:13 +0200 (~ 2h ago)
$ bundle update has been run many times, as well as deleting Gemfile.lock to rebuild it again
.Procfile is, as suggested in the tutorial:
web: bundle exec puma -C config/puma.rb
and, this is weird:
in $ heroku logs I've noticed this:
heroku[web.1]: Starting process with command bundle exec pume -C config/puma.rb
app[web.1]: bundler: command not found: pume
WHY pume? In the .Procfile it doesn't say that!
edit2: after it started working, I renamed the app. Now is https://manuel-sample-app.herokuapp.com/
Ok, that was stupid..
Turns out that the tutorial says
The Procfile should be created in your application’s root directory
Listing 7.38: Defining a Procfile for Puma.
./Procfile
web: bundle exec puma -C config/puma.rb
and I confused it with ./.Procfile, so my real Procfile had a typo but I was fixing an useless hidden file with the same name thinking it was the right one
sorry, got too tired today and my eyes were crossing each other

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

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