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 .
gem install heroku
If you don’t have heroku account create one https://id.heroku.com/login, then on your terminal type
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
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