I'm sorry I know that lots of people had asked similar questions but in all the different answers I've seen there were no working ones. I'am curently following this tutorial : http://ruby.railstutorial.org/ruby-on-rails-tutorial-book. Here is my app : https://github.com/melki/first_app Here is my Gemfile :
# A sample Gemfile
source "https://rubygems.org"
# gem "rails"
ruby '1.9.3'
gem "heroku"
gem 'rails', '3.2.13'
group :development do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'thin'
end
that's a simple one...
Here are my logs from Heroku :
2013-04-13T17:37:27.600820+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-13T17:37:27.600820+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2013-04-13T17:37:27.600820+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2013-04-13T17:37:28.895845+00:00 heroku[web.1]: Process exited with status 1
2013-04-13T17:37:28.909457+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-13T17:47:24.873811+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-13T17:47:26.701802+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 37586`
2013-04-13T17:47:28.040408+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2013-04-13T17:47:28.039667+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:32:in `read': No such file or directory - config.ru (Errno::ENOENT)
2013-04-13T17:47:28.039914+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-13T17:47:28.040065+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-13T17:47:28.039990+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-13T17:47:28.040166+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-13T17:47:28.039836+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:32:in `load'
2013-04-13T17:47:28.040332+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2013-04-13T17:47:28.040244+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-13T17:47:29.402379+00:00 heroku[web.1]: Process exited with status 1
2013-04-13T17:47:29.416139+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-13T17:48:34.162437+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by melchior.toldi@gmail.com
2013-04-13T17:48:36.892769+00:00 heroku[run.2268]: Awaiting client
2013-04-13T17:48:36.892769+00:00 heroku[run.2268]: Starting process with command `bundle exec rake db:migrate`
2013-04-13T17:48:37.791304+00:00 heroku[run.2268]: State changed from starting to up
2013-04-13T17:48:40.807677+00:00 heroku[run.2268]: Process exited with status 1
2013-04-13T17:48:40.842046+00:00 heroku[run.2268]: State changed from up to complete
2013-04-13T17:49:37.705672+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=radiant-river-7942.herokuapp.com fwd="82.247.99.235" dyno= connect= service= status=503 bytes=
2013-04-13T17:49:38.049712+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=radiant-river-7942.herokuapp.com fwd="82.247.99.235" dyno= connect= service= status=503 bytes=
2013-04-13T17:57:36.956393+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 8234`
2013-04-13T17:57:34.713361+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-13T17:57:38.537721+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-13T17:57:38.537721+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-13T17:57:38.537721+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2013-04-13T17:57:38.537721+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:32:in `load'
2013-04-13T17:57:38.537721+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-13T17:57:38.537721+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:32:in `read': No such file or directory - config.ru (Errno::ENOENT)
2013-04-13T17:57:38.537721+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-13T17:57:38.537721+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2013-04-13T17:57:38.537721+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-13T17:57:39.927361+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-13T17:57:43.593400+00:00 heroku[web.1]: Process exited with status 1
2013-04-13T18:07:55.320873+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-13T18:07:58.034529+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 4633`
2013-04-13T18:07:59.616225+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:32:in `read': No such file or directory - config.ru (Errno::ENOENT)
2013-04-13T18:07:59.616225+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:32:in `load'
2013-04-13T18:07:59.616225+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-13T18:07:59.616225+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-13T18:07:59.616225+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-13T18:07:59.616225+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-13T18:07:59.616225+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2013-04-13T18:07:59.616225+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2013-04-13T18:07:59.616225+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-13T18:08:01.041217+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-13T18:08:01.026363+00:00 heroku[web.1]: Process exited with status 1
2013-04-13T18:08:15.278264+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=radiant-river-7942.herokuapp.com fwd="188.167.200.167" dyno= connect= service= status=503 bytes=
2013-04-13T18:08:16.189360+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=radiant-river-7942.herokuapp.com fwd="188.167.200.167" dyno= connect= service= status=503 bytes=
2013-04-13T18:08:16.328385+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=radiant-river-7942.herokuapp.com fwd="188.167.200.167" dyno= connect= service= status=503 bytes=
2013-04-13T18:10:14.449584+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=radiant-river-7942.herokuapp.com fwd="64.237.39.250" dyno= connect= service= status=503 bytes=
2013-04-13T18:18:27.461322+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-13T18:18:29.173061+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 33230`
2013-04-13T18:18:30.386288+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:32:in `load'
2013-04-13T18:18:30.386381+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-13T18:18:30.386562+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-13T18:18:30.386957+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2013-04-13T18:18:30.386476+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-13T18:18:30.386866+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2013-04-13T18:18:30.386765+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-13T18:18:30.386129+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:32:in `read': No such file or directory - config.ru (Errno::ENOENT)
2013-04-13T18:18:30.386674+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-13T18:18:31.676857+00:00 heroku[web.1]: Process exited with status 1
2013-04-13T18:18:31.684586+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-13T18:29:07.524843+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-13T18:29:09.507194+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 26133`
2013-04-13T18:29:11.221741+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-13T18:29:11.221817+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-13T18:29:11.221566+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:32:in `load'
2013-04-13T18:29:11.221968+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-13T18:29:11.221373+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:32:in `read': No such file or directory - config.ru (Errno::ENOENT)
2013-04-13T18:29:11.221892+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-13T18:29:11.221662+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-13T18:29:11.222059+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2013-04-13T18:29:11.222137+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2013-04-13T18:29:12.554083+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-13T18:29:12.547227+00:00 heroku[web.1]: Process exited with status 1
2013-04-13T18:29:35.422394+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=radiant-river-7942.herokuapp.com fwd="82.247.99.235" dyno= connect= service= status=503 bytes=
2013-04-13T18:29:35.704799+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=radiant-river-7942.herokuapp.com fwd="82.247.99.235" dyno= connect= service= status=503 bytes=
2013-04-13T18:29:39.570979+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=radiant-river-7942.herokuapp.com fwd="82.247.99.235" dyno= connect= service= status=503 bytes=
2013-04-13T18:29:39.851899+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=radiant-river-7942.herokuapp.com fwd="82.247.99.235" dyno= connect= service= status=503 bytes=
2013-04-13T18:39:46.195056+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-13T18:39:47.796625+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 34436`
2013-04-13T18:39:48.942222+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-13T18:39:48.942148+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-13T18:39:48.941907+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:32:in `read': No such file or directory - config.ru (Errno::ENOENT)
2013-04-13T18:39:48.942636+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2013-04-13T18:39:50.103490+00:00 heroku[web.1]: Process exited with status 1
2013-04-13T18:39:48.942560+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2013-04-13T18:39:50.115132+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-13T18:39:48.942473+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-13T18:39:48.942070+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:32:in `load'
2013-04-13T18:39:48.942380+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-13T18:39:48.942306+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-13T18:40:30.990826+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=radiant-river-7942.herokuapp.com fwd="82.247.99.235" dyno= connect= service= status=503 bytes=
2013-04-13T18:40:31.347409+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=radiant-river-7942.herokuapp.com fwd="82.247.99.235" dyno= connect= service= status=503 bytes=
When I type : Heroku ps
melki@melkunix:~/rails_projects/first_app$ heroku ps
=== web: `bundle exec rails server -p $PORT`
web.1: crashed 2013/04/13 18:46:03 (~ 5m ago)
And when I do :
heroku run rake db:migrate
I get :
melki@melkunix:~/rails_projects/first_app$ heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.9445
rake aborted!
can't activate rails (= 2.3.14), already activated rails-3.2.13. Make sure all dependencies are added to Gemfile.
/app/vendor/bundle/ruby/1.9.1/gems/bundler- 1.3.2/lib/bundler/rubygems_integration.rb:224:in `block in replace_gem'
/app/config/boot.rb:60:in `load_rails_gem'
/app/config/boot.rb:54:in `load_initializer'
/app/config/boot.rb:38:in `run'
/app/config/boot.rb:11:in `boot!'
/app/config/boot.rb:114:in `<top (required)>'
/app/Rakefile:4:in `require'
/app/Rakefile:4:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
(See full trace by running task with --trace)
And here is the app whith the error message : http://radiant-river-7942.herokuapp.com/
I stay at your disposition for any other file if that could help you. Excuse my english.
Problem is with your Gem file. delete Gemfile.lock and run bundle install and push the code and run migrations.
You have already installed rails 2 and just added rails 3 to Gem file without
bundle update