Skip to content

Instantly share code, notes, and snippets.

@waseem
Last active December 14, 2015 09:50
Show Gist options
  • Select an option

  • Save waseem/5068050 to your computer and use it in GitHub Desktop.

Select an option

Save waseem/5068050 to your computer and use it in GitHub Desktop.
How one should start learning Ruby and Rails.

If you're just starting with Rails, I will suggest you to learn Ruby first. If you know how its object model, inheritance and mixins work, you're good to start creating web application with it. This is very important. A lot of people dive into Rails without learning basic Ruby first (that's how I did) and get frustrated because they don't understand how it works. I will highly recommend The Well Grounded Rubyist by David Black to start learning Ruby. You can also get a good introduction of Ruby by working your way through interactive tutorials on Codeacademy. You don't need to understand metaprogramming in the beginning. But if you decide to do so, I will suggest book Metaprogramming Ruby by Paolo Perrotta. It's best in covering the subject matter. It's a little bit old though but still good nonetheless. Also see third point in comment made by Spaceghost below.

Once you're comfortable with Ruby, I will suggest you to work through free Rails Tutorial by Michael Hartl. When you get stuck, come over to #RubyOnRails IRC channel on freenode and ask questions there, people are friendly there. Once you've worked your way through tutorial, I'd suggest you to read on different section of Rails Guides to understand how different parts of Rails work in detail.

For screencasts, Railscasts is the best. It should be noted that while Railscasts primarily addresses Rails and Ruby, it often addresses topics covering web development in general.

If you want to understand rails deeply, you will have to dive deeper in the Rails source. Rails source is huge and can not be understood in a short time span. On top of that, it changes rapidly as well. If you want to start reading and contributing to source, I will suggest you to start from railties/lib/rails/all.rb and railties/lib/rails/commands.rb. If you want to follow how rails boots, you might want to read the initialization guide and railties/bin/rails

@Spaceghost
Copy link

  1. The third sentence is a bit awkward.
  2. Here's the link for Metaprogramming Ruby.
  3. I'd note that the main reason for suggesting Metaprogramming Ruby isn't the metaprogramming, it's the excellent explanation of the ruby object model that happens in the first half of the book.
  4. "ask questions their" should be "ask questions there". You can also use a comma instead of a period on that sentence since the two are nearly one thought, but that's just a preference. It's perfectly fine English how it is.
  5. "I will suggest you to read on different..." should be, "I'd suggest that you read the different"
  6. "in short time span" should be "in a short time span"
  7. "On top of that it changes rapidly as well." should be "On top of that, it changes rapidly as well." but I'm not 100% on it.
  8. Perhaps mention that railties/bin/rails is the starting point for booting an application if they want to follow initialization. Link the Initialization guide as well.

I think this is a really good write up. 👍

@waseem
Copy link
Author

waseem commented Mar 2, 2013

@Spaceghost Thanks for your time. I really appreciate this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment