Rails Crash Course

After way too many nights and weekends, and way too much iced coffee, it’s finally done…

Rails Crash Course Cover

Rails Crash Course is my new book on the Ruby on Rails web framework. This book is based on the curriculum I’ve used in the past to teach Ruby on Rails to both new programmers and experienced web developers.

The first section teaches the fundamentals of both Ruby and Rails. It covers the model-view-controller pattern used by Ruby on Rails in detail. At the end of the first section you learn how to set up a git repository for your application and deploy it Heroku.

The second section covers more advanced topics such as authentication, testing, performance optimization, security, and debugging. These concepts are explained as you build a simple social network app. It also covers creating your own Web API. The book concludes with a chapter on setting up your own Amazon EC2 server and deploying your application using Capistrano.

The book should ship around the middle of October (I already have my copies). You can preorder the book directly from No Starch Press or from Amazon.

12 thoughts on “Rails Crash Course”

  1. Anthony, I’ve gone through your book. Ok – I skimmed through some of the parts dealing with security and APIs, but other than that, I was pretty thorough. I picked up on some concepts that I have been struggling with for several weeks. They way you described many of these concepts is was excellent. I worked through the social networking app in Chapters 8 and following.

    I may have missed it, but did you include any methods for a user to ‘unfollow’ someone? I couldn’t find any code that addressed that.

  2. Thanks for the kind words Paul. You’re correct I didn’t cover how to ‘unfollow’ a user in the book.

    You’ll probably want to add an unfollow! method to the User model similar to the follow! method from the book. Then add an unfollow action to UsersController, again similar to the follow action.

    I’ll add a blog post in the next couple of days covering this.

  3. Just wanted to say THANK YOU. This is, by far, the most helpful resource I’ve used in learning to develop using Rails. I graduated from Dev Bootcamp last July and needed something to help me make sense of everything we covered. Your book explained and covered all the little things that I had always wondered about but no one ever explained intelligibly to me. Thanks for making a positive difference in my pursuit to be a web developer !

  4. Hi Anthony, great book, has really helped me put the pieces together learning Rails.

    Would just like to know if you ever got the time to put an ‘unfollow’ post together, or anymore hints at to how to do this correctly.

  5. Hi Larry, I didn’t add a post about unfollow. Paul actually did it himself, so I never got back to it.

    I’m off next week for Spring Break. I plan to add a branch with the unfollow action and the comment destroy action that Mark is asking about above.

    Check back Monday. Thanks again for the kind words. Tell all your friends 🙂

  6. Hi Anthony, I just bought your book through Amazon and downloaded it to my Nexus 7 tablet to read it using the Kindle App. Unfortunately, the book can’t be read properly. I’m on the Ruby fundamentals section and basically everything in bold (the commands you write in the IRB) are not readable, I mean you can read the irb response but not what you typed, and it is a bit frustrating to read it like this. I thought the ebook wasn’t generated correctly, but if I go to the Kindle cloud read, I can read it correctly. I guess this could be an Amazon Kindle Android App specific error, but still I thought I’d let you know. Do you think I should contact them? I really prefer to read in my tablet rather than in a browser….


  7. Hi Anthony,
    I want to thank you for an outstanding book. I’m reading and enjoying it. The approach you took is really effective and I was exactly looking for something like this. Most of the books or tutorials just spoon feed you from the beginning and don’t tell you the basics or the big picture. They don’t teach you how to think before you start making a rails app.
    Just one small suggestion. On chapter 3 (I guess) you left an exercise to use :email as a validation for comment. But later on chapter 5 when you create comment form .. you just have :author and :body there. So after posting, comments were disappearing. Later I figured out that in the form there should be a field for email too . Then it worked. May be you could put a note about that in the next version if you think it’s important. But it was a good exercise for me. 😛
    Thank you!

  8. About the second part of my earlier comment : I guess i myself added the email validation part although you didn’t ask for it in the exercise. My bad 😛

  9. Hi Anthony,

    I don’t think that the instructions regarding bootstrap in Chapter 9 are compatible with the latest version(s) of bootstrap. In that Chapter, you don’t specify that a version should be specified in the Gemfile, so I didn’t include one initially, and got an error (when trying to view the posts page in my browser) that says “couldn’t find file ‘bootstrap’ with type ‘text/css'”. When I looked at your repository for “social” on GitHub, I saw that you explicitly include a version, and it is not the most recent version. If I specify the version that you do, everything works fine.

    I suspect that it has to do with what they discuss in “Installation > a. Ruby on Rails” in the readme for Bootstrap for Sass. I started to change things according to what they say there, but then it started to sound like I was going to need to list out every stylesheet individually via @import, rather using “require_tree .” and “require_self” (in the brief search I did, I couldn’t find equivalent options for @import).

    Do you have a recommendation for what I should do here / is there something that I am missing?


  10. Hi Anthony. Working my way through the book, slowly but slowly. I’ve followed all the steps thus far, but when I get to p. 71, and the book says my label should have a red background and the field outlined in red – that’s not happening. Also, my error_explanation div does not look like the picture. Any ideas what I may have missed? I see the definitions for the divs in appassetsstylesheetsscaffolds.scss. The output on the console seems as if the app is looking for default.css and default.js – which do not exist. I’m using Windows if that makes any difference.



Comments are closed.