How To Get Started with Ruby on Rails — Where should you start?

A friend of mine is beginning an effort to learn Ruby on Rails. He asked me where to start and I sent him a few links that I felt covered some of the key components of Rails that were critical to learn first. Not everyone will agree with my choices, but nevertheless this is what I thought.

I figured I’d share them here since there may be other people around asking the same questions.

These links are references to the ‘guides’ that were developed as documentation by the Rails community. They’re ‘reference guides’, so they’re deeper in places than you’ll need. But I think they’re useful and I refer to them often.

1. Getting Started. To get started, the first thing is to just build a simple app and get it running. This, if nothing else, verifies that you have everything installed correctly and introduces you to the basics of building a rails application.

link: Getting Started with Ruby on Rails.

2. ActiveRecord. The first thing you need to understand with Ruby and Rails is how ActiveRecord works. It’s more than just the interface layer to the database, it’s the foundation of all your ‘Model’ code including data validation and relationships between objects.

Link: Active Record Query Interface

3. Rails routing. Understanding the routing in Rails is something that a lot of beginners miss — and it makes their first applications sub-optimal. Also, understanding the routing rules makes things so much easier. And it’s core to understanding the ‘restful’ concepts behind rails.

Link: Rails: Routing from the outside in.

4. Rendering views. A lot of the magic in rails happens in how easy and flexible it is to build, change and rearrange the actual pages you’re building — the ‘view’ part of the Mode-View-Controller model that Rails is based on. This guide gives you an introduction to how all that works and what the options are. Notice also how it builds on what you learned in ‘Rails Routing’.

Link: Rails Views: Layouts and Rendering.

Don’t get discouraged and don’t underestimate — this is a bit of work. But the value is great.

These guides are build to some extent as ‘reference guides’, so don’t worry about understanding every line. But scan and read some portions deeply — and you’ll come away with a great foundation in what Ruby on Rails is and how it works its magic.

This entry was posted in agile, open source, rails, ruby on rails. Bookmark the permalink.
  • http://twitter.com/gdaniels Glen Daniels

    Good list, Kevin.  (incidentally, typo – it’s “routing from the outside in”, not the other way around :) )  These are where I got started too, with a couple of additions:

    * I read http://pragprog.com/titles/rails4/agile-web-development-with-rails which was a good read and covers methodology as well as code

    * Michael Hartl’s tutorial at http://ruby.railstutorial.org/ is invaluable, and goes way deeper and broader than the one at rubyonrails.org.  His focus on TDD is great and it’s a terrific free resource.

    * Huge amount of useful info on http://railscasts.com

    Current score: 0
  • http://twitter.com/kbedell Kevin

    Thanks Glen! I appreciate the note and I fixed the typo!

    And I second the other resources you have listed as well — I started with that same rails book almost 5 years ago, and I use railscasts all the time. Both are great. I haven’t seen Michael Hartl’s tutorial and I’ll definitely check it out!

    Current score: 0