Rails deployment at Heroku
Contact me at LinkedIn  RailsZilla at Facebook  RailsZilla at twitter   google +1  Contact me at Xing  connect me at github

Rails deployment at Heroku

Posted in Rails

rails deployment at heroku
This time I show you how to deploy your application at Heroku. Heroku is a cloud platform as a service (PaaS) supporting several programming languages. Heroku claims to offer the most NoSQL add-on solutions in the market today and that it introduced the ‘polyglot platform’.

Let’s start:
After signing up for a Heroku account, you have to install the Heroku gem as any other gem in Rails:

gem install heroku

GIT and SSH keys

As with GitHub, when using Heroku you will need to create SSH keys. After that we tell Heroku our public key, so that you can use Git to push the sample application repository up to the servers of Heroku:

heroku keys:add

Now we can use the heroku commands which can be shown in our terminal. To create a place on the Heroku servers for our application, we so the following:

heroku create --stack cedar
Created http://YOUR_APP.herokuapp.com/ |
Git remote heroku added

Yes, that’s it.
The heroku command creates automagically a new subdomain for our application. Our Subdomain is now available for immediate viewing and working, so let’s rock.

Heroku deployment, step one

To deploy to Heroku, the first step is to use Git to push the application to Heroku. Open your terminal/console and enter

git push heroku master

Heroku deployment, step two

There is no step two! We’re already done ;-)
Now let’s see our deployed application and visit the address that we saw when we ran heroku create. You can also use an argument to the heroku command that automatically opens your browser with the right address to your application:

heroku open

Panic – the Heroku Error

Because of the details of the Heroku setup, the “About your application’s environment” link doesn’t work on Heroku. Don’t panic, this is normal. The error will be fixed when we remove our default Rails page.

Once we’ve deployed our application, Heroku provides a beautiful interface for administering and configuring our application.

Have a peaceful day ;-)

Tags: , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

Please enter a secure code to see if you are a spammer ;-)


Copyright © 2011-2018  - RailsZilla – Ruby on Rails tutorials, tips and tricks All rights reserved. | Imprint | Privacy