Rails Tutorial Help

Welcome to the Rails Tutorial Help page. Here are links to some useful resources:

My natural inclination is to try help anyone who reaches out to me, and this worked fine in the early days of the book when there were only a few hundred readers, but (un)fortunately the Rails Tutorial has such a broad readership at this point that I don't have the resources to offer individual help.* I still gratefully accept reports of errors in the text (including typos!), but at this point the book's source code has been thoroughly debugged by thousands of readers, so problems getting the source examples to work should not be posted to the Rails Tutorial feedback page or emailed to me directly. Instead, I suggest comparing your code to the official sample application code (or the first edition code) to see if that helps track down the problem. If you still have trouble, please post your question at Stack Overflow using the tag railstutorial.org. (Click here to see questions labeled with that tag.) Update: The creators of the Learn_Rails subreddit have graciously offered to answer questions as well.

Debugging tips

While it's impossible to anticipate every potential problem, here are some debugging tips that might help:

  • Are you using the exact gem versions (including Rails) used in the tutorial?
  • Are you using the right Ruby version and gemset?
  • Did you restart the web server?
  • Did you restart Spork?
  • Did you re-run bundle install?
  • Have you tried running rake db:test:prepare?
  • Did you compare your code to the Rails 4.0 reference code or the second edition (Rails 3.2) code on GitHub?

If your problem is of a general nature, such as having issues installing Rails or configuring RSpec, I suggest posting to Stack Overflow (again using the tags ruby-on-rails and tutorials), sending a message to the Ruby on Rails Talk mailing list, or posting to the Learn_Rails subreddit. This will allow other people running into your issue (and not just those following the Rails Tutorial) to benefit from the discussion. You can also try asking your question on the Rails IRC channel (#rubyonrails) or the Rails Hotline to get live assistance from other Rails programmers. If you have issues specific to RVM, you can often find its creator, Wayne E. Seguin, on the RVM IRC channel. For issues deploying to Heroku, please contact Heroku technical support.

When asking your question on any mailing list or forum, be sure to include as much relevant information as possible. It's sometimes tempting to ask a question like, "I tried installing RSpec and it didn't work. Can anyone tell me what the problem is?" Unfortunately, there is no way to tell from this description what the problem is. On some forums, a few responders will even be rude in this context, since not only is there not enough information to solve the problem, there is no evidence that the asker has made any attempt to solve it himself. If you want further details about common conventions when asking questions on forums, including how to maximize your chances of a helpful reply, I highly recommend the article How To Ask Questions The Smart Way by Eric Raymond.

*I've considered (on many occasions) setting up a Rails Tutorial forum, but experience shows that creating, maintaining, and moderating a discussion forum is almost as big a time-sink as one-on-one tech support. (This is what Stack Overflow is for.)

Errors in the tutorial can be reported by email, but please triple-check before emailing me; at this point the overwhelming majority of reported issues are not actual errors in the text. (Note: I no longer monitor the Rails Tutorial Get Satisfaction page, where bugs used to be reported, but some community members still answer questions posted there.)

Because individual systems vary so much, and because the Rails ecosystem changes so fast, it is impractical to cover even a tiny subset of the things that can go wrong (though I certainly tried). The life of a Rails developer, and of a programmer in general, is one of learning how to power through problems through sheer force of will (and Google-fu). Plus, you'd be amazed how often people will swear that they've copied the code exactly as it appears in the book, only to admit after half a dozen email exchanges that they found a typo in their code after all.

Michael Hartl is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.