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.
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.
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.
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’.
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.