Hosting In A Hurry With Heroku

Trying to launch Virally in under 3 weeks was no mean feat and to get it done we needed a no hassle hosting solution. With Virally not generating any income yet, cost was also an issue and we couldn’t afford to go dropping lots of cash on dedicated servers, not to mention the time to get them up and running.

We’d decided to build Virally in Rails and since this was our first Ruby application finding a dependable host in a new environment was a potential pitfall of choosing an unfamiliar technology.¬† We’ve used Pagoda Box, a scalable cloud solution for PHP, and knew the model was based on Heroku’s. This and free first instance made it a¬†sensible first place to look.

The basic principle is you create an “app” which gives you a git repository, you add said repository to your git remotes and can deploy new code by pushing changes to it. Its a great workflow and makes deploying changes easy as git push heroku master.

If you already have a rails app running locally with git, deploying it to Heroku is as simple as:

  1. Sign up
  2. Install the Heroku Toolbelt
  3. cd /path/to/your/rails_app
  4. heroku login
  5. heroku create --stack cedar
  6. git push heroku master

And that is it

There is a tonne more to the heroku command and you can find out more from the heroku dev centre.