Skip to content

Deploy the demo application to Heroku



1.Rails Application
3.Heroku Account
4.Heroku gem

1.Rails application:

2. Install git:


$sudo apt-get install git-core

step3:Now enter into your project directory

$cd sample

step4:Now Initialize empty Git repository to add your application

$git init

Git will reply

Initialised empty Git repository in .git/

and also create .git/ folder in your project

step5:Add your project files in to the empty Git repository

$git add .                        # (.specify current directory)

step6:Now you can commit your project

$git commit -m “Initial repository”               #”commited comment    “

Now git installed and add initial repository successfully


To add your application from local git repository to github repo

create an account in

to add application to github need to create remote between local repo and github repo

$ sudo apt-get install ssh

if already ssh installed means you generate a new key using following commands

$ ssh-keygen -t rsa -C  “” # your mail id

it reply

to add ur ssh key to github site

$cd ~/.ssh


to copy the whole content

and open your account and go account settings=>ssh publc keys=>add another public key=> to paste your key in the key field
and create a repository in dashboard

configure  git with the ur system and git account at  first time only

$ cd project_dir # go to ur project directory

$ git config –global “sanmugam”

$ git config –global

above two steps are first time paring only

now create new repository in GitHub

after created it shows like


$ git remote add origin

$ git push origin master

successfully upload local git repo to github repo..

3.Create a Heroku account:


4.Now we create heroku application

step1:install heroku through gem

$sudo gem install heroku

step2:It upload SSH public key

$heroku keys:add

it reply

Uploading ssh public key /home/sanmugam/.ssh/

step3:Now create our application with heroku

$heroku create sample     #Enter name of your application

step4: Deploy to Heroku

to deploy heroku by git push

$git push heroku master

step5:Migrate heroku database

$heroku rake db:migrate

step6:start your project in heroku

$heroku open

It deployed successfully


From → Rails

  1. raj kumar permalink

    nice posts

  2. Good post…..really nice one

  3. Thanks, good stuff …. 🙂

  4. Good Post

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: