O'Reilly logo

Learning Rails: Live Edition by Edd Dumbill, Simon St. Laurent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What You’ll Learn

Building a Ruby on Rails application requires mastering a complicated set of skills. You may find that—depending on how you’re working with it, and who you’re working with—you only need part of this tour. That’s fine. Just go as far as you think you’ll need.

At the beginning, you’ll need to install Ruby on Rails. We’ll explore different ways of doing this, with an emphasis on easier approaches to getting Ruby and Rails operational.

Next, we’ll create a very simple Ruby on Rails application, with only a basic view and then a controller that does a very few things. From this foundation we’ll explore ways to create a more sophisticated layout using a variety of tools, learning more about Ruby along the way.

Once we’ve learned how to present information, we’ll take a closer look at controllers and what they can do. Forms processing is critical to most web applications, so we’ll build a few forms and process their results, moving from the simple to the complex.

Forms can do interesting things without storing data, but after a while it’s a lot more fun to have data that lasts for more than just a few moments. The next step is setting up a database to store information and figuring out how the magic of Rails’ ActiveRecord makes it easy to create code that maps directly to database structures—without having to think too hard about database structures or SQL.

Once we have ActiveRecord up and running, we’ll explore scaffolding and its possibilities. Rails scaffolding not only helps you build applications quickly, it helps you learn to build them well. The RESTful approach that Rails 2.0 chose to emphasize will make it simpler for you to create applications that are both attractive and maintainable. For purposes of illustration, using scaffolding also makes it easier to demonstrate one task at a time, which we hope will make it easier for you to understand what’s happening.

Ideally, at this point you’ll feel comfortable with slightly more complicated data models, and we’ll take a look at applications that need to combine data in multiple tables. Mixing and matching data is at the heart of most web applications.

We’ll also take a look at testing and debugging Rails code, a key factor in the framework’s success. Migrations, which make it easy to modify your underlying data structures (and even roll back those changes if necessary), are another key part of Rails’ approach to application maintainability.

The next step will be to add some common web applications elements like sessions and cookies, as well as authentication. Rails (sometimes with the help of plug-ins) can manage a lot of this work for you.

We’ll also let Rails stretch its legs a bit, building more exciting Ajax applications and sending email messages. Finally, we’ll show you one approach to bringing your Rails application to a wider public, deploying it with MySQL and Phusion Passenger, as well as exploring some other possibilities.

By the end of this tour, you should be comfortable with working in Ruby on Rails. You may not be a Rails guru yet, but you’ll be ready to take advantage of all of the other resources out there for becoming one.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required