Rails Migration to Heroku.,

Some steps that I had to remember to migrate the rails application to Heroku., First thing that I had to keep in mind was the database migration. Postgres was the preferred database in Heroku. Currently am just using their free node for this application. God knows how special this app is going to be in the future.,

Here is the first change for Heroku Migration., Add the Postgres support to database.yml file. Here is the updated new file

DB Config

Update the Gem file for Postgres configuration

Screen Shot 2013-02-17 at 10.53.41 PM.png

Now that we have database configured., Here are some of the Heroku commands from Mac for deployment. First make sure you have GIT installed and configured for the system,

The most important command for Heroku installs are:

  • heroku create --stack cedar


  • gem install foreman heroku


Invoke the command, this should start pulling code from your Git account to the Heroku system.

git push heroku master

Sometimes you might be getting a Permission denied error. If there are problems with Permissions, that might because the SSH key information exchanged is not setup correctly, invoke the command

ssh-keygen -t rsa

Follow instructions in screen after this command., you will be asked to enter a pass phrase to proceed., once the key image are comes up in ur terminal invoke the command

heroku keys:add

One should see a message something like this

Uploading SSH public key /Users/sathishjayapal/.ssh/id_rsa.pub... done

Now invoke the command.,

git push heroku master

Finally to migrate the database invoke command

heroku rake db:migrate

That should do it. Your application is good to go, you can call the application that I put together using my application