I am trying to push a rails application to heroku.
When I get to the last step:
git push heroku master
It doesn\'t work and gives m
I encountered the same errors working through Chapter 1 of Michael Hartl's Rails Tutorial. They were eventually resolved by issuing another git commit command after opening a Heroku account and configuring the SSH keys: git commit -a -m "Heroku recommit"
git push heroku master then succeeded.
Also, if you're on Rails 3.0 make sure you use the cedar stack
heroku create --stack cedar
When you created your Rails application, did you change directory into the directory of the application? You have to perform all the commands from within the application's directory.
rails myapp
cd myapp
I just had the same problem trying to push my app to heroku and none of the above answers fixed it.
I solved the issue by emptying my RVM Gemset with rvm gemset empty
, deleting my Gemfile.lock (probably best to just rename it) and reinstalling my gems. Pushing worked fine after this.
Here's the answer I got from Heroku and it worked for me (after trying different pg gems, adapters, and everything else on the 10 other posts about this)
1) add the line: gem 'pg' to your Gemfile.
2) Run the command bundle install
to install the gem into your bundle.
3) Stage the Gemfile and Gemfile.lock changes: git add Gemfile Gemfile.lock
4) Commit the changes: git commit -m "Install the pg gem"
5) Redeploy to heroku: git push heroku master
Got the same problem under windows following one of the guides on ror site. After making everything like here http://devcenter.heroku.com/articles/quickstart it was solved.
Seems like problem was because of missing two lines.
cd myapp
git init