Created
January 30, 2014 20:41
-
-
Save hzla/8718235 to your computer and use it in GitHub Desktop.
Deploying to Heroku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. cd into root directory of app you want to push | |
| 2. add a Procfile if you haven't already, it tells heroku how to run your app | |
| 2. initialize a new git repsitory ( git init) | |
| 3. add the files in the git repository ( git add .) | |
| 4. commit the files in the git repository (git commit ) | |
| 5. login to heroku if you haven't already (heroku login) | |
| 6. create a new heroku app (heroku create) | |
| 7. push from your current branch to heroku (git push heroku YOUR_BRANCH) | |
| 8. run any necessary app migrations (heroku run rake MIGRATION_NAME) | |
| 9. if anything fails, look in the heroku logs, google the errors and try again | |
| common errors: | |
| Problem: cannot find remote repository heroku | |
| Solution: make sure you initialized a new respositroy with git init, and | |
| created a heroku app with heroku create | |
| _________________________________________________________ | |
| Problem: Permission denied (public key) | |
| Solution: try generating a new ssh key with 'ssh-keygen', then enter the command "heroku keys:add", add the key you just generating, try pushing again | |
| __________________________________________________________ | |
| Problem: Cannot run migrations with 'heroku run rake' | |
| Solution: make sure all your gems are accessible in the gemfile like 'rspec' | |
| ___________________________________________________________ | |
| Problem: App was pushed and deployed but is showing an application error | |
| Solution: makue sure you are specifying "ruby '1.9.3'" in the gemfile | |
| ___________________________________________________________ | |
| Problem: Anything else | |
| Solution: look in heroku logs, fine where it crashed, google the error or go on stack overflow | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment