Wednesday, April 28, 2010

Install gitGenerate RSA public and Private keys in your systemRequired GemsHerokoTaps - By default heroku uses postgreSQL as the database, so use this gem to convert your database from mysql to postgresql.

First create an account in heroku.com website.Open terminal and CD to the application you want to deploy#git init#git add .#git commit -m 'First submit'Till now one empty git repository (.git) created in your local application folder and save the changes in the local repository.

#heroku create appnameIt will ask you the email and password which you have already signup in heroku.com and create the appname in heroku as subdomain. i.e appname.heroku.com

#git push heroku masterThis command will transfer all your files from local repo to the heroku application.

Process for Database Push and Pull#heroku rake db:migrateThis will migrate all your local db to heroku, Make sure to maintain migrations clearly#heroku rake db:push

Sometimes you may face many problems in db migrations, so take care of db migrations. If you face problems, just us heroku db:push without heroku rake db:migrate.