Last active
August 29, 2015 14:01
-
-
Save coreypnorris/0a32d8edc968c907a3df to your computer and use it in GitHub Desktop.
Deploying an app 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
| Deploying an app to Heroku | |
| Add the rails_12factor gem | |
| group :production do | |
| gem 'rails_12factor' | |
| end | |
| $ bundle install --without production. | |
| This will configure Bundler not to install the 12factor gem locally. (Bundler will remember that setting for your project, so you can just run $ bundle after that time.) | |
| $ brew install heroku-toolbelt | |
| if you don't have it installed. | |
| $ heroku login | |
| $ heroku create --stack cedar | |
| $ git push heroku master | |
| Now your url should appear at the bottom of the terminal. | |
| $ heroku run rake db:migrate db:test:prepare | |
| $ heroku run rake db:seed | |
| Troubleshooting | |
| ----- | |
| $ heroku pg:reset DATABASE | |
| Use to drop heroku database | |
| $ heroku run console | |
| To bring up a console | |
| $ heroku ps | |
| This command shows you all of the remote processes | |
| $ heroku logs --tail | |
| This command will show the remote logs | |
| Renaming an app | |
| ----- | |
| git remote rm heroku | |
| git remote add heroku [email protected]:yourappname.git | |
| precompiling assets | |
| ----- | |
| heroku run rake assets:precompile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment