Posted by: danielharan | June 5, 2007

Learning ruby on rails – advice for beginners

After over a year of working with rails, I finally feel safe publishing advice for beginners.

Learning RoR is worth it. It took me a long time, and I wasted much of it figuring out what books to read and what plugins and features to use. This entry is meant to let you avoid those pitfalls and increase your productivity as fast as possible. I’ll break it down in 3 stages.

1 – Basics. Read these books:

You can be productive with Rails without knowing much Ruby. You’ll eventually want to learn Ruby to get the most power out of your new framework and to have more fun. It’s a beautiful language, much of the reason Rails is great. (You couldn’t write Rails in a lesser language like Java).

2 – Write a couple small apps. Chances are you already wrote a couple toy apps in step 1, but you should now try something meatier.

  • Put everything in SVN right away
  • rake db:migrate beats SQL, use it right away too
  • If you want users and authentication, start with Restful Authentication.
  • For scaffolding, get used to script/generate scaffold_resource
  • Unit and functional tests will save your bacon. Often.

REST is the way of the future, and all the cool kids are doing it. I get asked what it’s about and why it’s important, but Mike Clark expressed it better than I could:

[D]on’t feel bad if you’re not up to speed on what it means to build RESTful Rails apps. In truth, we’re all still learning what that means, and I suspect we have a long way to go.

I’ve enjoyed the conventions that fall out of the REST style of design. Things like the named routes and the Simply Helpful plugin tend to give an application a good consistent feel to it. Converting my traditional Rails apps to the REST style has largely been an exercise in removing code, and refactoring for the better what’s left. (What’s On Your RADAR?)

3 – Keep Learning. These are essential resources:

I hope all this saves you some time. If you know of other resources you found really helpful while learning, feel free to share in the comments.



  1. Thank you for the advice!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: