Ruby on Rails application Deploying in Heroku

Deploying ROR application in heroku is not a rocket science  now but some developer is having some confusion with this thing so only this blog post , So this post not for experienced developers 🙂

The first thing you need to understand heroku uses git for deployment , so that you need to have git repository in your ROR application first .

Then you need to install heroku toolbelt go here to get tool-belt for your OS , then install heroku gem

gem install heroku

If you don’t have heroku account create one https://id.heroku.com/login, then on your terminal type

heroku login

It will asks your credentials give them, then go to your application directory by terminal and type

heroku create optional-app-name

If you give application name it will create DNS same like that otherwise it will generate one for you.Then type

git push heroku master

It will push your code to heroku , It uses SSH to access , This is first time in your system to connect with heroku and using SSH means , type

ssh-keygen -t rsa

heroku keys:add

note: Heroku uses pg as default data base, so please ensure you have included gem ‘pg’ in your gem file.

If you have any problem with ssh see https://devcenter.heroku.com/articles/keys

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

w

Connecting to %s