Heroku on Rails - Invalid DATABASE_URL - ruby-on-rails

EDIT: The general advice is to use CEDAR stack.
Pretty new to RoR, Gems, Heroku and Git. Following tutorial: http://ruby.railstutorial.org/book/ruby-on-rails-tutorial
Works smoothly on localhost, when deployed to Heroku got ConnectionNotEstablished error, that was solved here:
https://stackoverflow.com/questions/7542745/heroku-error-activerecordconnectionnotestablished (BTW: following same tutorial) After changing production database to PostgreSQL (gem 'pg') it generates another error:
Visting live site
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.
Tried this -
Heroku app crashed, receiving "Invalid DATABASE URL" when attempting heroku rake db:migrate -
heroku rake db:migrate
rake aborted!
Invalid DATABASE_URL
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)
heroku console
Internal server error
gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.1'
group :development do
gem 'rspec-rails', '2.6.1'
gem 'annotate', '~> 2.4.1.beta'
gem 'sqlite3'
end
group :test do
gem 'rspec-rails', '2.6.1'
gem 'webrat', '0.7.1'
gem 'sqlite3'
end
group :production do
gem 'pg'
end
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
heroku logs
9:02+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/runner.rb:143:in `run!'
9:02+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/bin/thin:6:in `<top (required)>'
9:02+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/runner.rb:177:in `run_command'
9:02+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:18:in `block (2 levels) in <main>'
9:02+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `initialize'
9:02+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `<main>'
9:02+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `load'
9:03+00:00 heroku[web.1]: State changed from starting to crashed
9:04+00:00 heroku[web.1]: Process exited
1:58+00:00 heroku[slugc]: Slug compilation started
3:09+00:00 heroku[api]: Deploy 3dea426 by mstefanow#gmail.com
3:09+00:00 heroku[api]: Release v7 created by mstefanow#gmail.com
3:09+00:00 heroku[web.1]: State changed from crashed to created
3:09+00:00 heroku[web.1]: State changed from created to starting
3:10+00:00 heroku[slugc]: Slug compilation finished
3:12+00:00 heroku[web.1]: Starting process with command `thin -p 44881 -e production -R /home/heroku_rack/heroku.ru start`
3:15+00:00 app[web.1]: (erb):9:in `rescue in <main>': Invalid DATABASE_URL (RuntimeError)
3:15+00:00 app[web.1]: from (erb):6:in `<main>'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/1.9.1/erb.rb:753:in `eval'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/1.9.1/erb.rb:753:in `result'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application/configuration.rb:106:in `database_configuration'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/railtie.rb:68:in `block (2 levels) in <class:Railtie>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/base.rb:2190:in `<top (required)>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:489:in `load_missing_constant'
3:15+00:00 app[web.1]: from /app/app/models/user.rb:12:in `<top (required)>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:179:in `each'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:179:in `const_missing'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/inflector/methods.rb:124:in `block in constantize'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/inflector/methods.rb:123:in `each'
3:15+00:00 a
from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/inflector/methods.rb:123:in `constantize'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/core_ext/string/inflections.rb:43:in `constantize'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:348:in `require_or_load'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:181:in `block in const_missing'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/params_wrapper.rb:148:in `_default_wrap_model'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/params_wrapper.rb:167:in `_set_wrapper_defaults'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/params_wrapper.rb:128:in `inherited'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/railties/routes_helpers.rb:7:in `block (2 levels) in wi
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/railties/paths.rb:7:in `block (2 levels) in with'
3:15+00:00 app[web.1]: from /app/app/controllers/users_controller.rb:1:in `<top (required)>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:348:in `require_or_load'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:302:in `depend_on'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:214:in `require_dependency'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:417:in `block (2 levels) in eager_load!'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:416:in `each'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:416:in `block in eager_load!'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:414:in `each'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:414:in `eager_load!'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application/finisher.rb:51:in `block in <module:Finisher>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'
3:15+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
3:15+00:00 app[web.1]: from <internal:lib/rubygems/custom_require>:29:in `require'
3:15+00:00 app[web.1]: from <internal:lib/rubygems/custom_require>:29:in `require'
3:15+00:00 app[web.1]: from config.ru:3:in `block (3 levels) in <main>'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `eval'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `block (3 levels) in <main>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:120:in `new'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:120:in `map'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:18:in `block (2 levels) in <main>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `initialize'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `new'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `initialize'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `block in <main>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `initialize'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `<main>'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/rack/adapter/loader.rb:36:in `eval'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/rack/adapter/loader.rb:36:in `load'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/controllers/controller.rb:175:in `load_rackup_config'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/controllers/controller.rb:65:in `start'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/runner.rb:143:in `run!'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/bin/thin:6:in `<top (required)>'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `load'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `<main>'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/runner.rb:177:in `run_command'
3:16+00:00 heroku[web.1]: State changed from starting to crashed
3:17+00:00 heroku[web.1]: Process exited
5:55+00:00 heroku[router]: Error H10 (App crashed) -> GET high-wind-7473.heroku.com/pages/home dyno= queue= wait= service= status=503 bytes=
5:57+00:00 heroku[router]: Error H10 (App crashed) -> GET high-wind-7473.heroku.com/pages/home dyno= queue= wait= service= status=503 bytes=
Kind of stuck, please help (point in right direction)
Of course
bundle install
git add .
git commit -m "another heroku fix"
git push
git push heroku

You need to set the DATABASE_URL environment variable with the path to your online postgres db.
Try running heroku pg. If the output is "myapp has no heroku-postgresql databases." then you need to add the PostgreSQL add-on first. It will create a postgres db for you on Amazon AWS.
heroku addons:add heroku-postgresql:hobby-basic
(hobby-basic is the free plan)
To find the URL for your new database, run
heroku config
You should see a variable that starts with HEROKU_POSTGRESQL. Copy its value (it should start with postgres:// and use it to set the DATABASE_URL
heroku config:set DATABASE_URL=postgres://your-db-url

I had exactly the same problem. It turned out I didn't have a database associated with the app. You will see this with the simple heroku config command-- you should see some database URLs there pointing to Amazon. eg:
$ h config
DATABASE_URL => postgres://fakedexgwa:fakepassword#ec2-33-44-55-77.compute-1.amazonaws.com/fakedexgwa
Anyway, I fixed this by creating a brand new app and deploying to it. I tried fiddling around in the config screens, but couldn't fix the problem.
I'm not sure if this is the same cause as yours: I created a simple Ruby app, deployed it, and then created a Rails app. I hadn't gotten to any database yet, and I'm wondering if Heroku somehow decided on the first deployment that I didn't need a database.

First thing I'd start with is moving your application to the Cedar Stack - it supports Rails 3.1 out of the box without having to do any messing around.
When you create your app via heroku create do it as
heroku create --stack cedar
and then repush to this stack - you may find your problems will all vanish. The thing to remember is to add 'run' into your commands, heroku run console, heroku run rake db:migrate etc.

Another way of setting DATABASE_URL in the config file is to run the command
heroku pg:promote HEROKU_POSTGRESQL_COLOR_URL
The .._COLOR_URL would be taken from running heroku config as suggested by rodrei
See the heroku documentation:
https://devcenter.heroku.com/articles/heroku-postgresql#establish-primary-db

Please read this article:
ClearDB MySQL Database
Commands:
heroku config
or if you use for one rails project multiple heroku projects
heroku config --app your_app_name
Add Database URL :
heroku config:set DATABASE_URL='mysql://adffdadf2341:adf4234#us-cdbr-east.cleardb.com/heroku_db?reconnect=true'
If you use mysql2 gem must to replace mysql with mysql2
heroku config:set DATABASE_URL='mysql2://adffdadf2341:adf4234#us-cdbr-east.cleardb.com/heroku_db?reconnect=true'
I hope those configurations can be used for PostgreSQL, NoSQL database or another database.

Can you please type heroku config --long --(app name). Please post results, especially DATABASE_URL.
Need more info. Also, definitely ensure you're on the cedar stack as mentioned above.

Related

heroku[router]: at=error code=H10 desc="App crashed" method

on Ruby on Rails - Heroku deployment, I got a error of heroku[route]: at=error code=H10 desc="App crashed" method After some debugging the log texts, main part of the log file I got:
2022-01-08T11:12:12.754916+00:00 heroku[web.1]: Starting process with command `bin/rails server -p ${PORT:-5000} -e production`
2022-01-08T11:12:16.534794+00:00 app[web.1]: => Booting Puma
2022-01-08T11:12:16.534809+00:00 app[web.1]: => Rails 6.1.4.4 application starting in production
2022-01-08T11:12:16.534810+00:00 app[web.1]: => Run `bin/rails server --help` for more startup options
2022-01-08T11:12:17.742438+00:00 app[web.1]: Exiting
2022-01-08T11:12:17.745593+00:00 app[web.1]: /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:34:in `require': cannot load such file -- net/pop (LoadError)
2022-01-08T11:12:17.745616+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.5.3/lib/zeitwerk/kernel.rb:35:in `require'
2022-01-08T11:12:17.745630+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/network/retriever_methods/pop3.rb:36:in `<class:POP3>'
2022-01-08T11:12:17.745642+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/network/retriever_methods/pop3.rb:35:in `<module:Mail>'
2022-01-08T11:12:17.745655+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/network/retriever_methods/pop3.rb:4:in `<main>'
2022-01-08T11:12:17.745668+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
2022-01-08T11:12:17.745681+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
2022-01-08T11:12:17.745694+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register'
2022-01-08T11:12:17.745708+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
2022-01-08T11:12:17.745720+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
2022-01-08T11:12:17.745733+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.5.3/lib/zeitwerk/kernel.rb:35:in `require'
2022-01-08T11:12:17.745745+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail.rb:54:in `block in eager_autoload!'
2022-01-08T11:12:17.745761+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail.rb:54:in `each'
2022-01-08T11:12:17.745774+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail.rb:54:in `eager_autoload!'
2022-01-08T11:12:17.745786+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/actionmailer-6.1.4.4/lib/action_mailer.rb:61:in `eager_load!'
2022-01-08T11:12:17.745799+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/application/finisher.rb:134:in `each'
2022-01-08T11:12:17.745811+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/application/finisher.rb:134:in `block in <module:Finisher>'
2022-01-08T11:12:17.745824+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:32:in `instance_exec'
2022-01-08T11:12:17.745838+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:32:in `run'
2022-01-08T11:12:17.745850+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:61:in `block in run_initializers'
2022-01-08T11:12:17.745863+00:00 app[web.1]: from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
2022-01-08T11:12:17.745875+00:00 app[web.1]: from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
2022-01-08T11:12:17.745888+00:00 app[web.1]: from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
2022-01-08T11:12:17.745900+00:00 app[web.1]: from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
2022-01-08T11:12:17.745913+00:00 app[web.1]: from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:347:in `each'
2022-01-08T11:12:17.745926+00:00 app[web.1]: from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:347:in `call'
2022-01-08T11:12:17.745938+00:00 app[web.1]: from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
2022-01-08T11:12:17.745950+00:00 app[web.1]: from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
2022-01-08T11:12:17.745963+00:00 app[web.1]: from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
2022-01-08T11:12:17.745975+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:60:in `run_initializers'
2022-01-08T11:12:17.745988+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/application.rb:391:in `initialize!'
2022-01-08T11:12:17.746002+00:00 app[web.1]: from /app/config/environment.rb:5:in `<main>'
2022-01-08T11:12:17.746015+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
2022-01-08T11:12:17.746027+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
2022-01-08T11:12:17.746040+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register'
2022-01-08T11:12:17.746053+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
2022-01-08T11:12:17.746066+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
2022-01-08T11:12:17.746079+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.5.3/lib/zeitwerk/kernel.rb:35:in `require'
2022-01-08T11:12:17.746092+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `block in require'
2022-01-08T11:12:17.746104+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299:in `load_dependency'
2022-01-08T11:12:17.746117+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `require'
2022-01-08T11:12:17.746130+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `require_relative'
2022-01-08T11:12:17.746143+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2022-01-08T11:12:17.746156+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
2022-01-08T11:12:17.746169+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
2022-01-08T11:12:17.746181+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
2022-01-08T11:12:17.746194+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
2022-01-08T11:12:17.746206+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
2022-01-08T11:12:17.746219+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
2022-01-08T11:12:17.746232+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
2022-01-08T11:12:17.746245+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:312:in `block in start'
2022-01-08T11:12:17.746258+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:379:in `handle_profiling'
2022-01-08T11:12:17.746270+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:311:in `start'
2022-01-08T11:12:17.746283+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/commands/server/server_command.rb:39:in `start'
2022-01-08T11:12:17.746297+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/commands/server/server_command.rb:144:in `block in perform'
2022-01-08T11:12:17.746309+00:00 app[web.1]: from <internal:kernel>:90:in `tap'
2022-01-08T11:12:17.746322+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/commands/server/server_command.rb:135:in `perform'
2022-01-08T11:12:17.746335+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
2022-01-08T11:12:17.746348+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
2022-01-08T11:12:17.746361+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
2022-01-08T11:12:17.746373+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/command/base.rb:69:in `perform'
2022-01-08T11:12:17.746386+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/command.rb:48:in `invoke'
2022-01-08T11:12:17.746399+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/commands.rb:18:in `<main>'
2022-01-08T11:12:17.746412+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
2022-01-08T11:12:17.746424+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
2022-01-08T11:12:17.746437+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register'
2022-01-08T11:12:17.746451+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
2022-01-08T11:12:17.746463+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
2022-01-08T11:12:17.746476+00:00 app[web.1]: from bin/rails:5:in `<main>'
2022-01-08T11:12:17.961296+00:00 heroku[web.1]: Process exited with status 1
2022-01-08T11:12:18.044550+00:00 heroku[web.1]: State changed from starting to crashed
Though this was the main topic of the full log text on production environment, but in local development environment, there was no issues found while starting the Rails server! Everything was working fine on development environment.
Besides, the URL was showing the following texts:
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. You can do this from the Heroku CLI with the command heroku logs --tail
And the console is showing this: Failed to load resource: the server responded with a status of 503 (Service Unavailable)
Solution
Ok, after a few deployments of fixing the errors found from the log file, I got that, in our Gemfile, we need to add some gem (around 3 gems) which are needed for some dependencies. Those gems are:
# Gemfile
gem 'net-smtp', require: false
gem 'net-pop', require: false
gem 'net-imap', require: false
after adding those to our gem file, run
bundle install
Then deploy the code on heroku and this will make a proper deployment.

FactoryGirl helper causing Heroku to fail

My Heroku app is crashing because of a 'missing helper file helpers/factory_girl.rb', even though it works on local and FactoryGirl is only installed in my Gemfile test group.
Why is Heroku asking for my FactoryGirl helper when it's not needed in development and isn't specified as a production gem?
What is helpers/factory_girl.rb supposed to look like? I searched online and couldn't find anything. Would a completely blank file work?
I am running Rails 3.2.13, Ruby 2.0.0-p481, and factory_girl_rails 4.4.1.
Gemfile:
group :test do
gem "factory_girl_rails", ">= 4.0"
end
Heroku logs:
2015-01-31T02:16:01.071477+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:317:in `rescue in depend_on': Missing helper file helpers/factory_girl.rb (LoadError)
2015-01-31T02:16:01.071484+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:312:in `depend_on'
2015-01-31T02:16:01.071515+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:135:in `block in modules_for_helpers'
2015-01-31T02:16:01.071524+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:131:in `modules_for_helpers'
2015-01-31T02:16:01.071522+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:131:in `map!'
2015-01-31T02:16:01.071487+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
2015-01-31T02:16:01.071526+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/helpers.rb:92:in `modules_for_helpers'
2015-01-31T02:16:01.071530+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/railties/paths.rb:18:in `block (2 levels) in with'
2015-01-31T02:16:01.071533+00:00 app[web.1]: from /app/app/controllers/application_controller.rb:4:in `<top (required)>'
2015-01-31T02:16:01.071535+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2015-01-31T02:16:01.071537+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2015-01-31T02:16:01.071528+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:95:in `helper'
2015-01-31T02:16:01.071538+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2015-01-31T02:16:01.071540+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2015-01-31T02:16:01.071581+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2015-01-31T02:16:01.071570+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:502:in `load_missing_constant'
2015-01-31T02:16:01.071572+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:192:in `block in const_missing'
2015-01-31T02:16:01.071574+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `each'
2015-01-31T02:16:01.071576+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `const_missing'
2015-01-31T02:16:01.071583+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_suppor
t/dependencies.rb:251:in `block in require'
2015-01-31T02:16:01.071578+00:00 app[web.1]: from /app/app/controllers/activations_controller.rb:1:in `<top (required)>'
2015-01-31T02:16:01.071550+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2015-01-31T02:16:01.071647+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
2015-01-31T02:16:01.071633+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2015-01-31T02:16:01.071622+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2015-01-31T02:16:01.071625+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2015-01-31T02:16:01.071627+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2015-01-31T02:16:01.071629+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:313:in `depend_on'
2015-01-31T02:16:01.071631+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
2015-01-31T02:16:01.071640+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `each'
2015-01-31T02:16:01.071642+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `block in eager_load!'
2015-01-31T02:16:01.071644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
2015-01-31T02:16:01.071648+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2015-01-31T02:16:01.071654+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2015-01-31T02:16:01.071650+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2015-01-31T02:16:01.071652+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2015-01-31T02:16:01.071656+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2015-01-31T02:16:01.071658+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2015-01-31T02:16:01.071659+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2015-01-31T02:16:01.071661+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2015-01-31T02:16:01.071688+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2015-01-31T02:16:01.071690+00:00 app[web.1]: from /app/config.ru:3:in `require'
2015-01-31T02:16:01.071692+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2015-01-31T02:16:01.071693+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2015-01-31T02:16:01.071695+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2015-01-31T02:16:01.071698+00:00 app[web.1]: from /app/config.ru:1:in `new'
2015-01-31T02:16:01.071699+00:00 app[web.1]: from /app/config.ru:1:in `<main>'
2015-01-31T02:16:01.071701+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/rack/adapter/loader.rb:33:in `eval'
2015-01-31T02:16:01.071703+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/rack/adapter/loader.rb:33:in `load'
2015-01-31T02:16:01.071705+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/rack/adapter/loader.rb:42:in `for'
2015-01-31T02:16:01.071707+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:170:in `load_adapter'
2015-01-31T02:16:01.071709+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:74:in `start'
2015-01-31T02:16:01.071711+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
2015-01-31T02:16:01.071713+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
2015-01-31T02:16:01.071715+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
2015-01-31T02:16:01.071717+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2015-01-31T02:16:01.071719+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
2015-01-31T02:16:01.971364+00:00 heroku[web.1]: Process exited with status 1
2015-01-31T02:16:01.976052+00:00 heroku[web.1]: State changed from starting to crashed
I think heroku's RAILS_ENV is production as below.
$ heroku config
=== app_name Config Vars
CLEARDB_DATABASE_URL: mysql://...
DATABASE_URL: mysql2://...
LANG: en_US.UTF-8
RACK_ENV: production
RAILS_ENV: production
SECRET_KEY_BASE: ....
That's why factory_girl in test group doesn't work well on heroku.
One of solution is just add production group. But, it not good idea.
group :test, :production do
gem "factory_girl_rails", ">= 4.0"
end
I think if you just load test data on heroku for test, I suggets as below.
# run to load test data
rake db:data_import
# test data import rake file
# deta_import.rb
if Rails.env.production?
require "factory_girl_rails"
FactoryGirl.find_definitions
end
... test data import with FactoryGirl ...

Ruby on Rails and Heroku "App Crashed"

I've gone through MANY forum posts about this exact problem and I have not found a solution.
App works locally but not on Heroku.
http://majorleaguebetting.herokuapp.com/
What am I missing??!!
Heroku Logs:
searoth#searoth-VB:~/Desktop/rails_projects/MajorLeagueBetting$ heroku logs
2013-04-01T20:14:26+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
2013-04-01T20:14:26+00:00 app[web.1]: from config.ru:1:in `<main>'
2013-04-01T20:14:26+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'
2013-04-01T20:14:26+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
2013-04-01T20:14:26+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
2013-04-01T20:14:26+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2013-04-01T20:14:26+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
2013-04-01T20:14:28+00:00 heroku[web.1]: Process exited with status 1
2013-04-01T20:14:28+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-01T20:24:39+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-01T20:24:42+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 34898`
2013-04-01T20:24:48+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-04-01T20:24:48+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-04-01T20:24:52+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2013-04-01T20:24:53+00:00 app[web.1]: from /app/app/models/head2head_bet.rb:8:in `<top (required)>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-04-01T20:24:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/dynamic_matchers.rb:55:in `method_missing': undefined local variable or method `current_user' for Head2headBet(Table doesn't exist):Class (NameError)
2013-04-01T20:24:53+00:00 app[web.1]: from /app/app/models/head2head_bet.rb:12:in `<class:Head2headBet>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:313:in `depend_on'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `each'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `block in eager_load!'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-04-01T20:24:53+00:00 app[web.1]: from config.ru:3:in `require'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-04-01T20:24:53+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-04-01T20:24:53+00:00 app[web.1]: from config.ru:1:in `new'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
2013-04-01T20:24:53+00:00 app[web.1]: from config.ru:1:in `<main>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
2013-04-01T20:24:54+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-01T20:24:54+00:00 heroku[web.1]: Process exited with status 1
2013-04-01T20:34:59+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-01T20:35:01+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 15944`
2013-04-01T20:35:04+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for mo
re on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-04-01T20:35:04+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-04-01T20:35:08+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2013-04-01T20:35:08+00:00 app[web.1]: from /app/app/models/head2head_bet.rb:12:in `<class:Head2headBet>'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/app/models/head2head_bet.rb:8:in `<top (required)>'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-04-01T20:35:08+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/dynamic_matchers.rb:55:in `method_missing': undefined local variable or method `current_user' for Head2headBet(Table doesn't exist):Class (NameError)
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:313:in `depend_on'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `each'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `block in eager_load!'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-04-01T20:35:08+00:00 app[web.1]: from config.ru:3:in `require'
2013-04-01T20:35:08+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-04-01T20:35:08+00:00 app[web.1]: from config.ru:1:in `new'
2013-04-01T20:35:08+00:00 app[web.1]: from config.ru:1:in `<main>'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
2013-04-01T20:35:10+00:00 heroku[web.1]: Process exited with status 1
2013-04-01T20:35:10+00:00 heroku[web.1]: State changed from starting to crashed
Here is the gemfile
source 'http://rubygems.org'
gem 'rails', '3.2.13'
gem 'railties', '3.2.13'
gem 'execjs'
gem 'therubyracer', '0.11.4'
gem 'jquery-rails'
gem 'nokogiri', '1.5.0'
gem "colorbox-rails", "~> 0.0.7"
gem 'formtastic'
gem 'tabletastic'
gem "paperclip", "~> 2.4"
gem 'faker', '0.3.1'
gem 'thin'
gem 'pg'
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
end
gem 'sqlite3', :group => [:development, :test]
group :development, :test do
gem 'rspec-rails', '~> 2.6'
gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
end
group :test do
gem 'rspec-rails', '~> 2.6'
# Pretty printed test output
gem 'turn', :require => false
gem 'factory_girl_rails', '1.0'
end
group :production do
gem 'thin'
gem 'pg'
end
Looks like you have forgotten to migrate
heroku run rake db:migrate
the clue is in
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/dynamic_matchers.rb:55:in `method_missing': undefined local variable or method `current_user' for Head2headBet(Table doesn't exist):Class (NameError)
2013-04-01T20:24:53+00:00 app[web.1]: from /app/app/models/head2head_bet.rb:12:in `'
Depending on the state of your database you may try any of the following commands
heroku run rake db:migrate
heroku run rake db:reset # WARNING DESTRUCTIVE
heroku run rake db:setup # WARNING DESTRUCTIVE
as John Baynon said, the clue is in table doesnt exist line

Keep getting 'Error H10 (App crashed) -> GET' when trying to deploy to Heroku

So I've been trying to deploy a rails app to heroku and have been having some issues. I did a good amount of poking around through the logs and on SO but couldn't find anything to point me in the proper direction. Then again I just might be missing something obvious. Anyway any help would be greatly appreciated.
Command
git push -f heroku master
LOGS
2012-08-28T05:56:30+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
2012-08-28T05:56:30+00:00 app[web.1]: from /app/config.ru:1:in `new'
2012-08-28T05:56:30+00:00 app[web.1]: from /app/config.ru:1:in `<main>'
2012-08-28T05:56:30+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
2012-08-28T05:56:30+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
2012-08-28T05:56:30+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
2012-08-28T05:56:30+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/commands/server.rb:46:in `app'
2012-08-28T05:56:30+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
2012-08-28T05:56:30+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
2012-08-28T05:56:30+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/commands/server.rb:70:in `start'
2012-08-28T05:56:30+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-08-28T05:56:30+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:50:in `tap'
2012-08-28T05:56:30+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:50:in `<top (required)>'
2012-08-28T05:56:30+00:00 app[web.1]: from script/rails:6:in `require'
2012-08-28T05:56:30+00:00 app[web.1]: from script/rails:6:in `<main>'
2012-08-28T05:56:31+00:00 heroku[web.1]: Process exited with status 1
2012-08-28T05:56:31+00:00 heroku[web.1]: State changed from starting to crashed
2012-08-28T05:56:36+00:00 heroku[slugc]: Slug compilation started
2012-08-28T05:57:19+00:00 heroku[api]: Release v6 created by raphael.shejnberg#gmail.com
2012-08-28T05:57:19+00:00 heroku[api]: Deploy 8bc52ce by raphael.shejnberg#gmail.com
2012-08-28T05:57:19+00:00 heroku[web.1]: State changed from crashed to starting
2012-08-28T05:57:20+00:00 heroku[slugc]: Slug compilation finished
2012-08-28T05:57:21+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 6287`
2012-08-28T05:57:27+00:00 app[web.1]: => Rails 3.2.3 application starting in production on http://0.0.0.0:6287
2012-08-28T05:57:27+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-08-28T05:57:27+00:00 app[web.1]: Exiting
2012-08-28T05:57:27+00:00 app[web.1]: => Booting WEBrick
2012-08-28T05:57:27+00:00 app[web.1]: from /app/app/models/project.rb:1:in `<top (required)>'
2012-08-28T05:57:27+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/active_record/dynamic_matchers.rb:50:in `method_missing': undefined method `has_attached_file' for #<Class:0x00000003d3b3e8> (NoMethodError)
2012-08-28T05:57:27+00:00 app[web.1]: => Call with -d to detach
2012-08-28T05:57:27+00:00 app[web.1]: from /app/app/models/project.rb:4:in `<class:Project>'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:359:in `require_or_load'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:502:in `load_missing_constant'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:190:in `each'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:192:in `block in const_missing'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:190:in `const_missing'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/inflector/methods.rb:229:in `block in constantize'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/inflector/methods.rb:228:in `each'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/inflector/methods.rb:228:in `constantize'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/inflector/methods.rb:259:in `safe_constantize'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/core_ext/string/inflections.rb:66:in `safe_constantize'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/params_wrapper.rb:152:in `_default_wrap_model'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/params_wrapper.rb:169:in `_set_wrapper_defaults'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/params_wrapper.rb:133:in `inherited'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/abstract_controller/railties/routes_helpers.rb:7:in `block (2 levels) in with'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/railties/paths.rb:7:in `block (2 levels) in with'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:359:in `require_or_load'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/app/controllers/projects_controller.rb:1:in `<top (required)>'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:313:in `depend_on'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/engine.rb:438:in `each'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/engine.rb:436:in `eager_load!'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/engine.rb:438:in `block in eager_load!'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/engine.rb:436:in `each'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:225:in `require_dependency'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `each'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `run'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/application.rb:136:in `initialize!'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/config.ru:4:in `block in <main>'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/config.ru:4:in `require'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/config.ru:1:in `new'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/config.ru:1:in `<main>'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/commands/server.rb:46:in `app'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/commands/server.rb:70:in `start'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:50:in `tap'
2012-08-28T05:57:27+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:50:in `<top (required)>'
2012-08-28T05:57:27+00:00 app[web.1]: from script/rails:6:in `<main>'
2012-08-28T05:57:27+00:00 app[web.1]: from script/rails:6:in `require'
2012-08-28T05:57:28+00:00 heroku[web.1]: Process exited with status 1
2012-08-28T05:57:28+00:00 heroku[web.1]: State changed from starting to crashed
2012-08-28T05:57:38+00:00 heroku[router]: Error H10 (App crashed) -> GET floating-sierra-9248.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-08-28T05:57:38+00:00 heroku[router]: Error H10 (App crashed) -> GET floating-sierra- 9248.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
I had to remove part of the logs for it to format right and be readable, its a deprecation warning
2012-08-28T05:57:24+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
(called from at /app/config/environment.rb:5)
Environment.rb
# Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
Blog::Application.initialize!
I believe the problem is in this line of the log:
2012-08-28T05:57:27+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/active_record/dynamic_matchers.rb:50:in `method_missing': undefined method `has_attached_file' for #<Class:0x00000003d3b3e8> (NoMethodError)
Maybe the gem that you use to manipulate uploads and files is not installed. And remember that you can't use this gem without uploading your files to another server.

Heroku app crashed, receiving "Invalid DATABASE URL" when attempting heroku rake db:migrate

I'm new to Programming and was following the Rails Tutorial by Michael Hartl when I ran into this while attempting heroku rake db:migrate
(in /app)
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:10: warning: already initialized constant RUBY
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:84: warning: already initialized constant LN_SUPPORTED
rake aborted!
Invalid DATABASE_URL
(erb):9:in `rescue in <main>'
(erb):6:in `<main>'
/usr/ruby1.9.2/lib/ruby/1.9.1/erb.rb:753:in `eval'
/usr/ruby1.9.2/lib/ruby/1.9.1/erb.rb:753:in `result'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/application/configuration.rb:86:in `database_configuration'
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/railtie.rb:58:in `block (2 levels) in <class:Railtie>'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/base.rb:1867:in `<top (required)>'
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/migration.rb:486:in `initialize'
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/migration.rb:433:in `new'
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/migration.rb:433:in `up'
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/migration.rb:415:in `migrate'
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/railties/databases.rake:142:in `block (2 levels) in <top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `call'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:581:in `invoke'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1992:in `run'
/usr/ruby1.9.2/bin/rake:31:in `<main>'
The application works perfectly on localserver but has crashed completely saying
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 get this error in logs
2011-06-13T20:20:47+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/initializable.rb:25:in `instance_exec'
2011-06-13T20:20:47+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/initializable.rb:25:in `run'
2011-06-13T20:20:47+00:00 heroku[web.1]: Process exited
2011-06-13T20:20:48+00:00 heroku[web.1]: State changed from starting to crashed
2011-06-13T20:21:29+00:00 heroku[router]: Error H10 (App crashed) -> GET deep-beach-590.heroku.com/ dyno= queue= wait= service= bytes=
2011-06-13T13:21:30-07:00 heroku[nginx]: GET / HTTP/1.1 | 86.44.102.112 | 796 | http | 503
2011-06-13T20:24:25+00:00 heroku[web.1]: State changed from crashed to created
2011-06-13T20:24:25+00:00 heroku[web.1]: State changed from created to starting
2011-06-13T20:24:31+00:00 heroku[web.1]: Starting process with command: `thin -p 16433 -e production -R /home/heroku_rack/heroku.ru start`
Anyone think they know what's causing the app to crash?
edit: with more logs after restart
2011-06-14T12:22:46+00:00 heroku[web.1]: State changed from starting to crashed
2011-06-14T12:32:32+00:00 heroku[web.1]: State changed from crashed to created
2011-06-14T12:32:32+00:00 heroku[web.1]: State changed from created to starting
2011-06-14T12:32:42+00:00 heroku[web.1]: Starting process with command: `thin -p 14587 -e production -R /home/heroku_rack/heroku.ru start`
2011-06-14T12:32:45+00:00 app[web.1]: (erb):9:in `rescue in <main>': Invalid DATABASE_URL (RuntimeError)
2011-06-14T12:32:45+00:00 app[web.1]: from (erb):6:in `<main>'
2011-06-14T12:32:45+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/1.9.1/erb.rb:753:in `eval'
2011-06-14T12:32:45+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/1.9.1/erb.rb:753:in `result'
2011-06-14T12:32:45+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/application/configuration.rb:86:in `database_configuration'
2011-06-14T12:32:45+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/railtie.rb:58:in `block (2 levels) in <class:Railtie>'
2011-06-14T12:32:45+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
2011-06-14T12:32:45+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
2011-06-14T12:32:45+00:00 heroku[web.1]: Process exited
2011-06-14T12:32:46+00:00 heroku[web.1]: State changed from starting to crashed
2011-06-14T12:45:03+00:00 heroku[web.1]: State changed from crashed to created
2011-06-14T12:45:03+00:00 heroku[web.1]: State changed from created to starting
2011-06-14T12:45:08+00:00 heroku[web.1]: Starting process with command: `thin -p 15727 -e production -R /home/heroku_rack/heroku.ru start`
2011-06-14T12:45:11+00:00 app[web.1]: (erb):9:in `rescue in <main>': Invalid DATABASE_URL (RuntimeError)
2011-06-14T12:45:11+00:00 app[web.1]: from (erb):6:in `<main>'
2011-06-14T12:45:11+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/1.9.1/erb.rb:753:in `eval'
2011-06-14T12:45:11+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/1.9.1/erb.rb:753:in `result'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/application/configuration.rb:86:in `database_configuration'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/railtie.rb:58:in `block (2 levels) in <class:Railtie>'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/base.rb:1867:in `<top (required)>'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/app/models/user.rb:14:in `<top (required)>'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `block in require'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:227:in `load_dependency'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:346:in `require_or_load'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:300:in `depend_on'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:216:in `require_dependency'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/engine.rb:138:in `block (2 levels) in eager_load!'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/engine.rb:137:in `each'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/engine.rb:137:in `block in eager_load!'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/engine.rb:135:in `each'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/engine.rb:135:in `eager_load!'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/application.rb:108:in `eager_load!'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/application/finisher.rb:41:in `block in <module:Finisher>'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/initializable.rb:25:in `instance_exec'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/initializable.rb:25:in `run'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/initializable.rb:50:in `block in run_initializers'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/initializable.rb:49:in `each'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/initializable.rb:49:in `run_initializers'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/application.rb:134:in `initialize!'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/application.rb:77:in `method_missing'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2011-06-14T12:45:11+00:00 app[web.1]: from <internal:lib/rubygems/custom_require>:29:in `require'
2011-06-14T12:45:11+00:00 app[web.1]: from <internal:lib/rubygems/custom_require>:29:in `require'
2011-06-14T12:45:11+00:00 app[web.1]: from config.ru:3:in `block (3 levels) in <main>'
2011-06-14T12:45:11+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `eval'
2011-06-14T12:45:11+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `block (3 levels) in <main>'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:63:in `new'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:63:in `map'
2011-06-14T12:45:11+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:18:in `block (2 levels) in <main>'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
2011-06-14T12:45:11+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `block in <main>'
2011-06-14T12:45:11+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
2011-06-14T12:45:11+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new'
2011-06-14T12:45:11+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/runner.rb:143:in `run!'
2011-06-14T12:45:11+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `load'
2011-06-14T12:45:11+00:00 heroku[web.1]: Process exited
2011-06-14T12:45:11+00:00 heroku[web.1]: State changed from starting to crashed
2011-06-14T12:45:11+00:00 heroku[web.1]: State changed from crashed to created
2011-06-14T12:45:11+00:00 heroku[web.1]: State changed from created to starting
2011-06-14T12:45:16+00:00 heroku[web.1]: Starting process with command: `thin -p 46054 -e production -R /home/heroku_rack/heroku.ru start`
2011-06-14T12:45:20+00:00 app[web.1]: (erb):9:in `rescue in <main>': Invalid DATABASE_URL (RuntimeError)
2011-06-14T12:45:20+00:00 app[web.1]: from (erb):6:in `<main>'
2011-06-14T12:45:20+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/1.9.1/erb.rb:753:in `eval'
2011-06-14T12:45:20+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/1.9.1/erb.rb:753:in `result'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/application/configuration.rb:86:in `database_configuration'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/railtie.rb:58:in `block (2 levels) in <class:Railtie>'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/base.rb:1867:in `<top (required)>'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/app/models/user.rb:14:in `<top (required)>'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `block in require'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:227:in `load_dependency'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:346:in `require_or_load'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:300:in `depend_on'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:216:in `require_dependency'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/engine.rb:138:in `block (2 levels) in eager_load!'
2011-06-14T12:45:20+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/engine.rb:137:in `each'
2011-06-14T12:45:20+00:00 heroku[web.1]: Process exited
2011-06-14T12:45:21+00:00 heroku[web.1]: State changed from starting to crashed
2011-06-14T12:45:21+00:00 heroku[router]: Error H10 (App crashed) -> GET deep-beach-590.heroku.com/ dyno= queue= wait= service= bytes=
2011-06-14T05:45:21-07:00 heroku[nginx]: GET / HTTP/1.1 | 86.44.102.112 | 796 | http | 503
2011-06-14T12:45:21+00:00 heroku[router]: Error H10 (App crashed) -> GET deep-beach-590.heroku.com/favicon.ico dyno= queue= wait= service= bytes=
I think the simpler solution here might be to destroy the app and start again.
Most likely you are missing the shared-database addon.
heroku addons:add shared-database
See https://devcenter.heroku.com/articles/database#troubleshooting
Make sure your DB URL is correctly formated, see this answer:
How to connect to postgresql using url
Try heroku db:push postgres://username:password#localhost/myrailsdb.
I ran into this error, I had one database on dev plan called "HEROKU_POSTGRESQL_COLOR". It looked right when I ran heroku pg:info, but my rails app was crashing with an "Invalid Database URL" error.
To fix it I ran C:\Users\Matt\heroku_apps\langural>heroku pg:promote HEROKU_POSTGRESQL_COLOR_URL, which promotes the dev database to "production" status, making it the database at DATABASE_URL (as well as at HEROKU_POSTGRESQL_COLOR).

Resources