Setting Up A Simple Site With Heroku
I’ve been easing my way into the Ruby on Rails environment over the past couple of years. It’s a wonderful framework that can allow an independent developer or small team of developers get pretty robust apps with elegant code going quickly. It also comes with a rather steep learning curve. Once you’ve worked out the basics though there’s nothing I’ve found that allows for quicker development and more impressively, more efficient maintenance.
So, you’ve developed an elegant app with RoR. Great, now you’ve got to get it out there in the wilds of the internet. You’ll run into problems here. You can’t just toss your RoR app/site up on any shared web host out there like with a php backed site. Cheap, shared hosting is frightened of Ruby for whatever reason. In steps Heroku offering free RoR centered hosting.
Maybe the free version isn't ready for the next Twitter or whatever brilliance you’ve gotten ready to launch but it’ll get your foot in the door and it’s scalable. So you can use some of your first million to scale up when you’re app’s taken over the internet and you’re living the good life.
What follows is a very simplified description of the process of getting a simple Rails app using the sinatra gem up on Heroku. It is in no way a tutorial. It’s more like a group of links to direct one where to go if they’re so inclined.
Assume you’ve completed the rather steep RoR learning curve. There’s this lovely gem named sinatra, as in Frank Sinatra. It’s wonderful for prototyping Rails apps or bits and pieces of apps. The following link will get you going with it http://www.sinatrarb.com/intro.
You’ve visited and registered at heroku.com. This link will get you going there, http://devcenter.heroku.com/articles/quickstart. You’re ssh public keys are all set up between heroku, github and your local machine. You’ve initialized a git repository on your local machine with your files in it. Commit the files and push it all up to heroku. Brilliant!