Error in heroku app after database created - ruby-on-rails

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>.

Related

Active Storage causing Rails app to fail on Heroku; works locally

I have a Rails app that works fine locally. It does not require any database. I am trying to deploy it using Heroku, but this is the only information I am getting in my logs as to why it's not working:
2018-09-14T17:27:28.074554+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=calendarizer.herokuapp.com request_id=4da3eec1-23dd-4d1a-ae8f-7b05086d20fc fwd="65.207.79.74" dyno= connect= service= status=503 bytes= protocol=https
2018-09-14T17:27:28.469113+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=calendarizer.herokuapp.com request_id=f079f20e-a9c1-4547-b563-3c2822b89e2d fwd="65.207.79.74" dyno= connect= service= status=503 bytes= protocol=https
My log level is set to DEBUG. No idea where else to look or how to tackle this problem.
EDIT:
I went back in the logs and I found this:
2018-09-14T17:37:19.872142+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.1/lib/active_record/dynamic_matchers.rb:22:in `method_missing': undefined method `has_one_attached' for #<Class:0x00000007a055f8> (NoMethodError)
I had not heard of ActiveStorage before now, but it's not something I'm using (at least not intentionally).
Log dump:
2018-09-14T17:46:41.000000+00:00 app[api]: Build started by user username#gmail.com
2018-09-14T17:46:59.000000+00:00 app[api]: Build failed -- check your build logs
2018-09-14T17:47:09.445004+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=calendarizer.herokuapp.com request_id=6dca7f6f-3afd-4bcd-b144-f63b85994472 fwd="65.207.79.74" dyno= connect= service= status=503 bytes= protocol=https
2018-09-14T17:47:09.792706+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=calendarizer.herokuapp.com request_id=1818345c-2dfb-4a30-ada6-65ca3bbc04ea fwd="65.207.79.74" dyno= connect= service= status=503 bytes= protocol=https
2018-09-14T17:56:48.278447+00:00 app[api]: Starting process with command `bundle exec rake db:migrate` by user username#gmail.com
2018-09-14T17:56:52.733021+00:00 heroku[run.7080]: Awaiting client
2018-09-14T17:56:52.763164+00:00 heroku[run.7080]: Starting process with command `bundle exec rake db:migrate`
2018-09-14T17:56:52.907308+00:00 heroku[run.7080]: State changed from starting to up
2018-09-14T17:57:00.092474+00:00 heroku[run.7080]: Process exited with status 1
2018-09-14T17:57:00.107737+00:00 heroku[run.7080]: State changed from up to complete
2018-09-14T17:58:27.000000+00:00 app[api]: Build started by user username#gmail.com
2018-09-14T17:58:40.000000+00:00 app[api]: Build failed -- check your build logs
2018-09-14T17:59:08.348804+00:00 app[api]: Starting process with command `bundle exec rake db:migrate` by user username#gmail.com
2018-09-14T17:59:14.334567+00:00 heroku[run.7746]: State changed from starting to up
2018-09-14T17:59:14.252562+00:00 heroku[run.7746]: Awaiting client
2018-09-14T17:59:14.278462+00:00 heroku[run.7746]: Starting process with command `bundle exec rake db:migrate`
2018-09-14T17:59:22.174620+00:00 heroku[run.7746]: Process exited with status 1
2018-09-14T17:59:22.189708+00:00 heroku[run.7746]: State changed from up to complete
2018-09-14T17:59:56.283122+00:00 app[api]: Starting process with command `bundle exec rake db:migrate` by user username#gmail.com
2018-09-14T18:00:05.530380+00:00 heroku[run.7894]: State changed from starting to up
2018-09-14T18:00:05.579669+00:00 heroku[run.7894]: Awaiting client
2018-09-14T18:00:05.633999+00:00 heroku[run.7894]: Starting process with command `bundle exec rake db:migrate`
2018-09-14T18:00:20.779574+00:00 heroku[run.7894]: State changed from up to complete
2018-09-14T18:00:20.763154+00:00 heroku[run.7894]: Process exited with status 1
2018-09-14T18:01:58.718055+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=calendarizer.herokuapp.com request_id=989475e7-affc-41a2-ade6-5cf21ce746a9 fwd="65.207.79.74" dyno= connect= service= status=503 bytes= protocol=https
2018-09-14T18:01:59.041312+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=calendarizer.herokuapp.com request_id=38c77377-2758-4a31-9219-6dcb548a5b1e fwd="65.207.79.74" dyno= connect= service= status=503 bytes= protocol=https
Heroku usually wants to see some kind of database (ie pg) to run if something is going to get saved, which I believe having ActiveRecord in your app is going to imply (even if you don't intend to use it). So you have two solutions I believe. In your dev & test environment you likely have sqlite3 as your database (you can look in your gemfile), but Heroku doesn't work with sqlite3.
Option 1:
Disable ActiveRecord in your app - Following this post: Disable Active Storage in Rails 5.2
Option 2:
Add a database to your production environment for heroku, so it's happy:
- in your gemfile see if you have a production group already
group :production do
if not add it
add in the pg gem:
gem 'pg'
So you should end up with something like this in your gemfile:
group :production do
gem 'pg'
end
Then commit and push to Heroku. You may need to restart the Dynos in Heroku, and you may need to create the database files on heroku too:
heroku run rails db:create
You should be up and running now.
For me the problem was that the adapter in database.yml was sqlite3.
So I changed the production section of config/database.yml to:
production:
adapter: postgresql
encoding: unicodeubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
database: myapp_production
username: myapp
password: <%= ENV['MYAPP_DATABASE_PASSWORD'] %>

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

Heroku database error? Cannot Rake db:migrate

I've been stuck on this for hours. I've been going back and forth with rollbacks and heroku has been crashing on me. The error I've been getting is Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
I've tried heroku pg:reset DATABASE_URL and then heroku rake db:migrate many many many times and it still prompts that error each time.
Here are my logs
2015-08-20T03:53:52.883786+00:00 heroku[run.7282]: Awaiting client
2015-08-20T03:53:52.917990+00:00 heroku[run.7282]: Starting process with command `bundle exec rake db:migrate`
2015-08-20T03:53:53.287377+00:00 heroku[run.7282]: State changed from starting to up
2015-08-20T03:53:58.412740+00:00 heroku[run.7282]: Process exited with status 0
2015-08-20T03:53:58.432909+00:00 heroku[run.7282]: State changed from up to complete
2015-08-20T03:54:04.586682+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=linkmony.herokuapp.com request_id=f90ecec2-49f5-4faa-9736-40bdeb637b5e fwd="76.103.13.109" dyno= connect= service= status=503 bytes=
2015-08-20T03:54:05.400560+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=linkmony.herokuapp.com request_id=44fb2fae-15b8-4359-bbbb-47c59b2a7d3b fwd="76.103.12.101" dyno= connect= service= status=503 bytes=
Running the following in terminal should give you more info:
$ heroku run rails console
(hat tip: ntimba20)

"bundler: command not found: thin" heroku deployment rails

So my app runs perfectly on my local machine and I pushed it to github and heroku successfully but when I try opening the application in my browser, I get the following error:
Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
Then I try running
$ heroku logs
And I get the following output in my console:
2012-07-05T21:52:11+00:00 heroku[slugc]: Slug compilation started
2012-07-05T21:52:33+00:00 heroku[slugc]: Slug compilation failed: failed to compile Ruby/rails app
2012-07-05T21:53:33+00:00 heroku[slugc]: Slug compilation started
2012-07-05T21:53:55+00:00 heroku[slugc]: Slug compilation failed: failed to compile Ruby/rails app
2012-07-05T21:58:45+00:00 heroku[slugc]: Slug compilation started
2012-07-05T21:59:04+00:00 heroku[slugc]: Slug compilation failed: failed to compile Ruby/rails app
2012-07-05T22:00:34+00:00 heroku[slugc]: Slug compilation started
2012-07-05T22:01:21+00:00 heroku[api]: Add shared-database:5mb add-on by aayushgopaldawra#gmail.com
2012-07-05T22:01:21+00:00 heroku[api]: Release v2 created by username#gmail.com
2012-07-05T22:01:21+00:00 heroku[api]: Add RAILS_ENV, LANG, PATH, RACK_ENV, GEM_PATH config by aayushgopaldawra#gmail.com
2012-07-05T22:01:21+00:00 heroku[api]: Release v3 created by username#gmail.com
2012-07-05T22:01:23+00:00 heroku[api]: Release v4 created by username#gmail.com
2012-07-05T22:01:23+00:00 heroku[api]: Deploy 23effb5 by username#gmail.com
2012-07-05T22:01:24+00:00 heroku[slugc]: Slug compilation finished
2012-07-05T22:01:27+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 4606`
2012-07-05T22:01:30+00:00 app[web.1]: bundler: command not found: thin
2012-07-05T22:01:30+00:00 app[web.1]: Install missing gem executables with `bundle install`
2012-07-05T22:01:31+00:00 heroku[web.1]: Process exited with status 127
2012-07-05T22:01:31+00:00 heroku[web.1]: State changed from starting to crashed
2012-07-05T22:01:31+00:00 heroku[web.1]: State changed from crashed to starting
2012-07-05T22:01:34+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 16779`
2012-07-05T22:01:35+00:00 app[web.1]: bundler: command not found: thin
2012-07-05T22:01:35+00:00 app[web.1]: Install missing gem executables with `bundle install`
2012-07-05T22:01:36+00:00 heroku[web.1]: Process exited with status 127
2012-07-05T22:01:36+00:00 heroku[web.1]: State changed from starting to crashed
2012-07-05T22:01:37+00:00 heroku[router]: Error H10 (App crashed) -> GET glowing-robot-9319.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-07-05T22:01:38+00:00 heroku[router]: Error H10 (App crashed) -> GET glowing-robot-9319.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
2012-07-05T22:01:49+00:00 heroku[router]: Error H10 (App crashed) -> GET glowing-robot-9319.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-07-05T22:01:49+00:00 heroku[router]: Error H10 (App crashed) -> GET glowing-robot-9319.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
2012-07-05T22:01:50+00:00 heroku[router]: Error H10 (App crashed) -> GET glowing-robot-9319.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-07-05T22:01:51+00:00 heroku[router]: Error H10 (App crashed) -> GET glowing-robot-9319.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
2012-07-05T22:01:51+00:00 heroku[router]: Error H10 (App crashed) -> GET glowing-robot-9319.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-07-05T22:01:51+00:00 heroku[router]: Error H10 (App crashed) -> GET glowing-robot-9319.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
I can't figure what to make of this, since this is my first time deploying to heroku and I don't know anything about web-deployment. Any help would be greatly appreciated!
For me the issue was that I added thin to my Gemfile in the development section, but once I did that heroku wanted to use it for production, but doesn't install the gems in the development section. By moving the thin gem out of the development section for use by all environments, I was able to get past this error.
Your Gemfile will probably look something like this for a Rails app:
source 'https://rubygems.org'
gem 'rails'
gem 'heroku'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'thin'
# more gems
Heroku recommends thin for a production web server anyway.
Update (2012-05-16): In that Rails 3 webserver link above Heroku now recommends unicorn. thin will still work, but you may want to consider switching over to unicorn.
You're probably missing a gem in your Gemfile. Make sure that everything your application needs is specified in the Gemfile, as opposed to locally doing a "gem install ". To verify, you could install RVM, create a gemset specifically for your app, run "bundle install" in your app dir, and then see if your app runs locally. If it does not run, a gem is definitely missing.
It appears that heroku is trying to start Thin in the absence of a Procfile to tell it otherwise. As noted above, Thin is not installed in the Gemfile, hence the error. Taking Thin out of the development group will work, as noted above.
If you want to get heroku to start Unicorn instead of Thin, set up your config/unicorn.rb and your Procfile as indicated here: https://devcenter.heroku.com/articles/rails-unicorn
The Procfile contents for Unicorn are listed in the link above, and more info about the Procfile (just a file called 'Procfile' in the root of your application) here: https://devcenter.heroku.com/articles/procfile

Resources