Ruby on Rails Tutorials

Jan 05, 2009

There has been a few occasions over the previous months when various people I meet have asked me to point them in the right direction to get started with ruby on rails. I remember when I started, it was a pretty easy question to answer...; everyone just got pointed in the general direction of why_'s poignant guide, the pickaxe book, and agile web development with rails. But things have come a long way since then. There is not only a veritable cornucopia of options now out there, but for somebody who isn't already engrossed in the community it's almost impossible to tell which ones are still relevant and useful and which ones are so dated that they'll make your attempts to learning markedly more difficult.

So with that in mind, I've attempted to compile a list of resources which are still (at least for the most part) still relevant at the time of posting. Some will have some minor inconsistencies either in implementation or current convention but I've made a genuine effort to review and ensure they are not way out of line. If you find in errors on that front, please let me know in the comments.

So without any further ado, here are the ruby on rails tutorials I've found broken into various categories (a couple are listed in more than one):

Ruby on Rails Tutorials

Getting Started and Example Applications

Getting started with Rails

A great guide on building your first rails app and understanding the framework.

Ruby On Rails Tutorial : The Basics

A two-part tutorial to getting up and running on rails by Huw Collingbourne.

Building a blog have have this guide for Rails 2.1 which runs you through the classic "15-minute blog" project.

Starting a rails project using Komodo

For those of you using Komodo this is a great guide to show you how to develop within Komodo and run the tests within your IDE.

Building a bookmark manager

A quick introductory guide to rails and an example app to manage your bookmarks.

Building a contact manager

A ruby on rails tutorial on how to get acquainted with the framework by building a contact list manager.

A simple product catalog

A tutorial from Oracle on how to create a comics catalog on top of an Oracle back-end.

The official 15-min blog screencast

A rather high paced run-through of how to get a blog up and running in 15mins.

The ultimate guide to ruby & rails

Quite a detailed and useful tutorial from Patrick Lenz which not only goes through rails but is a pretty decent intro to the ruby you should get your head around first too.

What I wish I knew

A bit of a retrospective from someone after they got their first few rails applications under their belt.

Sending Instant Messages in Rails

How to use XMPP and BackgroundRB to send messages to GMail and other Jabber based clients.

Programming Conventions

A discussion on what exactly DRY means, why you should stick to conventions, and when you should look at optimization.


Bulk Insert into ActiveRecord with Rails

How to quickly insert multiple records at once with ActiveRecord.

Using Oracle

A tutorial from Oracle on how to create a comics catalog on top of an Oracle back-end.

Rails email validation

Check that a provided email address really is legit, by doing a DNS/MX lookup on the domain.

Rail Migrations for beginners

This tutorial is a little dated, but thankfully the examples all still work in Rails 2.x. What I particularly like, is that they actually cover how to add an index to a column which most don't cover and thus many don't bother to do.

Rails Guide to Migrations

A very detailed guide on what you can and can't do in migrations. Even I learnt a few new tricks from reading through it.

ActiveRecord Validations and Callbacks

All the various validation options you have, and what method callbacks you can hook into when modifying an instance of a model.

ActiveRecord Associations

How to link up the associations between the models in your applications.

Finding records in your database

A tutorial on all the various ways you can find either a single record, or a collection of records, using ActiveRecord. The built in finders, and how to pass your own custom conditions in are all handled.


Simplify Ruby on Rails controllers with make_resourceful

Take advantage of the DRY approach by quickly implementing common controller actions in just a few lines of code.

Controlling Information Access

A quick explanation of the why/when you should make methods in your controllers private or protected.

Displaying Useful Flash Messages

How to provide more useful feedback on errors or actions to your users within your application.

Consistent and sexy rails forms

How to both DRY up your code and ensure your users get a consistent experience by using a Rails Custom Form Builder.

ActionController Basics

How to use filters, disabling the session, cookies, authentication, and protecting against forgery. It's called basics, but it covers quite a lot.

Catching rails error messages

An easy example of how to use the 2.x approach to catching errors in your rails applications.


Introduction to form helpers

A quick tutorial on when you should use the object/model based form helpers in rails, and when you should use the standard ones.

Rendering layouts and views

How to render a response to the web browser within your rails app. Also goes into providing only a HEAD response, nesting layouts, using partials, redirects, and using yield.

Implementing unobtrusive javascript in rails

How to stop using the built-in javascript helpers and instead use lowpro to keep your views and code clean.


Nested Resources in Rails 2.x

A guide to bring you up to speed on the changes between the way resources work in 1.x and the 2.x releases.

Rails Routing from the Outside-In

A very comprehensive guide on how to configure and use the routing options in rails.


Stop Rails from sending email

A useful way to check that mail is getting sent, without actually sending it.


Test Rails XML Output with rspec

How to easily test XML output using rspec.

Testing webservices using rspec

A guide on testing the old style SOAP/XML webservices with rspec.

Using rspec have_tag

How to test anything you need to in a view with rspec have_tag

Performance, Administration, and Debugging

Improve Rails Performance with Thin

A tutorial on replacing mongrel or webrick with the event driven thin web server.

Let nginx automatically become aware of your Rails apps

How to configure nginx to automatically become aware of any new apps you deploy and start serving them without any additional configuration.

Monitoring your Rails app with god

How to use the god monitoring tool to manage, start, stop, and restart your rails app.

Monitoring BackgroundRB with god

Another tutorial on using god, this one for monitoring BackgroundRB.

Improving Bulk Data Insertion with ActiveRecord

Reduce the number of round-trips to the database by batch inserting records into ActiveRecord.

Background Processing with Starling

How to off-load long running tasks to a queue so that you don't tie up your webserver processes requests needlessly.

Ruby on Rails Caching Tutorial

Another two-part tutorial. This one, by Gregg from RailsEnvy, runs through the various ruby on rails caching options and how to implement them to improve the performance of your site.

Ruby on Rails Rake Tutorial

Gregg from RailsEnvy again running through how to make the most of rake. If you're not already writing your own custom tasks in rake you should definitely take a look because there is probably a handful of things your could (and should) be doing in it.

Debug your app with ruby-debug

I don't know how I ever diagnosed problems in development before I learnt how

to use ruby-debug. If you've got applications even just staring to come together, you really need to get your head around this tutorial.

19 Rails Tricks Most Rails Coders Don't Know

Not a tutorial per se, but a good collection of handy tips on how to benchmark performance, test various aspects of your app, improve it's performance, and more.

Reading a stack trace

You're inevitably going to see a few when your developing, you better learn how to make sense of them.

Ruby on Rails Security Guide

Storing and protecting the session, user management, projecting from injection, and more.

Debugging Rails Applications

How to use views to help you debug your app, detecting memory leaks, and using the logger.

Benchmarking and Profiling Rails

The why and how of benchmarking and profiling. Still a work in progress.


Define your own base rails framework with templates

Stop manually importing and installing all the same plugins in all of your applications, define a template in just a few lines and let rails know what it should start with.

Integrate an IM Bot into your Rails App

How to make an Instant Messaging BOT and use it in your rails application.

Creating Plugins

How to create a plugin for use in your rails app.

Working with Rails Timezones

How to use the 2.x enhancements to easily switch between timezones or display dates/times in a users local zone.

Super extra special mention

Ryan Bates is simply tireless in providing useful screencasts showing various bits of functionality and tips within rails. If I was to list each of the ones I thought would be useful here, then the list would probably be 3 times longer than it already is. Instead, make sure you check out Railscasts and scan through the archive.

Hi, I'm Glenn! 👋 I'm currently Director of Product @ HashiCorp, and we're hiring! If you'd like to come and work with me and help make Terraform Cloud even more amazing we have multiple positions opening in Product ManagementDesign, and Engineering & Engineering Management across a range of levels (i.e., junior through to senior). Please send in an application ASAP so we can get in touch.