If you though getting started with Rails seemed easy from my first post, you haven’t tried out Heroku yet. Heroku is a hosted solution for Rails that comes with a browser based IDE. There’s nothing to install. It is so easy that it’s almost ridiculous. To me, this is the future of application hosting.
One of the remarkable things about Rails is that it lets you get up and running very quickly. Here is what you need to do to get your first application up and running on Heroku.
- Apply for an account on heroku (or mail me for an invitation)
- When you have gotten your account set up, go to the heroku page for your applications and log in.
- Press the big button labeled “Create New App”
- Click the button that look like a gear in the lower left hand corner and choose “generate” from the pop-up menu.
scaffold article title:string author:string content:textand click “run”
- Press the yellow text labeled “Migrate now” to create the articles table in the database
- (Optional) Select “rake” from the gear pop-up menu and type
- (Optional) In the “rake” window, type
db:fixtures:loadto populate the database with test data
- Press the button with two right arrows (“>>”) on the top right corner and you will be taken to your application, done being installed on the heroku server. Add
/articlesto the url to see your newly generated application
- You can now play around with creating, retrieving, updating and deleting articles
- Click the button with two left arrows (“< <") on the bottom of the screen to return to the IDE
- (Optional) Make the application publicly available. Click the name of the application (“unnamed-xxxx” on the top left corner). Pick a name for your application, select “Public” to have it deployed to the net, and press rename
You now have a fully working, running, deployed Rails application. It requires no installation on your part. From here, you can follow the rest of my articles on Rails pretty much straightforward. Welcome aboard.
Copyright © 2008 Johannes Brodwall. All Rights Reserved.