Deploying Rails App to Heroku
My first experience installing a Rails app on Heroku. A pretty easy way to deploy Rails apps.
If you made any changes to your gemfile, make sure to run
bundle install –without production
Even if you already have all of the gems installed. This updates Gemfile.lock, which will be used by Heroku.
If you are on Windows, make sure to remove “.exe” from bundle, rails, and rake inside of your bin folder:
Create a free account on Heroku if you don’t have one yet. Download the Heroku Toolbelt.
From the command line:
This will create a new Heroku application and set up the remote Git repo. You can optionally specify a name for your app in “heroku create” command, or you can rename it later.
Now, lets push the code to Heroku and run all the DB commands if necessary:
git push heroku master
heroku run rake db:migrate
heroku run rake db:seed
To update you app, just push to heroku master.
To get information about your Heroku apps:
heroku run console
The last command will launch a remote Rails console session.
To rename your app:
heroku rename new_name
To destroy your app:
heroku destroy app_name