push rails app to heroku

后端 未结 8 1542
慢半拍i
慢半拍i 2020-12-15 05:54

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

相关标签:
8条回答
  • 2020-12-15 06:28

    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.

    0 讨论(0)
  • 2020-12-15 06:30

    Also, if you're on Rails 3.0 make sure you use the cedar stack

    heroku create --stack cedar
    
    0 讨论(0)
  • 2020-12-15 06:33

    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
    
    0 讨论(0)
  • 2020-12-15 06:34

    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.

    0 讨论(0)
  • 2020-12-15 06:40

    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

    0 讨论(0)
  • 2020-12-15 06:47

    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

    0 讨论(0)
提交回复
热议问题