Learning Ruby on Rails

How should I learn Ruby on Rails?

I'd definitely recommend using Michael Hartl's Ruby on Rails Tutorial book. I've also found Daniel Kehoe's Learn Ruby on Rails e-book super helpful as well.

On a personal level, finding a project I actually wanted to build, as opposed to just pacing through a tutorial, is what really helped get me off the ground though.

Learning Ruby on Rails

I've been moving from C# in my professional career to looking at Ruby and RoR in my personal life, and I've found linux to be slightly more appealing personally for development. Particularly now that I've started using git, the implementation is cleaner on linux.

Currently I'm dual booting and getting closer to running Ubuntu full time. I'm using gedit with various plugins for the development environment. And as of late 2010, I'm making the push to use Vim for development, even over Textmate on OS X.

A large amount of the Rails developers are using (gasp) Macs, which has actually got me thinking in that direction.

Although I haven't tried it, Ruby in Steel gives you a Ruby IDE inside the Visual Studio world, and IronRuby is the .NET flavor of Ruby, if you're interested.

As far as books are concerned, the Programming Ruby (also known as the Pickaxe) book from the Pragmatic Programmers is the de-facto for learning Ruby. I bit the bullet and purchased that book and Agile Web Development with Rails; both books have been excellent.

Peepcode screencasts and PDF books have also been great for getting started; at $9 per screencast it's hard to go wrong. I actually bought a 5-pack.

Also check out the following:

  • Official Rails Guides
  • Railscasts
  • railsapi.com or Ruby on Rails - APIdock
  • The Ruby Show
  • Rails for Zombies
  • Softies on Rails - Ruby on Rails for .NET Developers
  • Rails Podcast
  • Rails Best Practices

I've burned through the backlog of Rails and Rails Envy podcasts in the past month and they have provided wonderful insight into lots of topics, even regarding software development in general.

Learning Ruby and Ruby on Rails

To learn Ruby itself, I'd recommend Beginning Ruby by Peter Cooper. It covers the essentials of the language and tools with small practical projects. The chapter on Rails does use Rails 2, so it will give you the concepts but you shouldn't rely on the detail there.

Beyond that, I would suggest either Design Patterns in Ruby or the newly released Eloquent Ruby, both by Russ Olsen. The Design Patterns book is excellent at explaining the standard patterns and demonstrating a Ruby way to approach them. I haven't read Eloquent Ruby yet, but it is getting very positive reviews.

Designer learning Ruby on Rails?

I'm also interested in learning Ruby on Rails. I haven't yet started - I've preferred to put it on hold until I have a little more experience with css and html. Actually I think I'll learn javascript too, before diving into ruby on rails.

But anyway... while I was on the search for the best way to learn ruby on rails, Michael Hart's tutorial or guide (whatever) came up very often as the best resource for the beginning programmer. Here's the link if you're interested > http://ruby.railstutorial.org/ .

I remember an article, too, by net tuts, which suggested a path for learning ruby... I'll go see if I can still find it...

...

Yup! Here it is > http://net.tutsplus.com/tutorials/ruby/the-best-way-to-learn-ruby-on-rails/

Hope this helps a little!

Learning Ruby on Rails in terms of Flask

Learning Rails in terms of Flask is like trying to fit a large truck inside a small sports car. Rails is a large framework full of powerful features and Flask is a micro framework with limited features designed to build simple sites fast. You are best off learning Rails on its own and then comparing the few features Flask has from Rails.

If you are finding Rails to be too much to learn at once, perhaps try Sinatra first. It's a Ruby micro-framework from which Flask was cloned. Those two will have a lot in common. After mastering Sinatra, Rails is a relatively easy step.

Do I need to know Ruby in order to learn Ruby on Rails?

Well, given that Ruby on Rails is just Ruby written in a particular fashion (read: framework) yes you will need to learn Ruby.

You will need to learn these things about Ruby (amongst other things):

  • Everything Is An Object. Everything. Yes, even 2 and "foo"
  • Class Inheritance and What It Does(tm)
  • How to tell the difference between class and instance methods
  • Modules and how to use them correctly (class_eval Is Your Friend)
  • People write gems. Use them. Re-inventing the wheel is fine and dandy for learning but re-inventing it because you think your method is better is not.

And these things about Rails:

  • Do not fight conventions.
  • Do not fight conventions.
  • Model code goes in the model.
  • Controller code goes in the controller.
  • View code goes in the view.
  • Helper code goes in the helper.
  • Ask yourself "Does Rails have a helper for it?". If the answer is "No" ask somebody else. The answer is likely to be "Yes".

And these things in general about learning:

  • Google it.
  • Google it again.
  • If the answer you seek is not within Googling distance, formulate it in a way that is kind to those who may know the answer (such as you've done with this question!)
  • Appeal to people's greater motives. How can helping you, help them?
  • Try not to be too much of a help vampire.
  • If asking in an IRC channel, use a pastebin service such as http://pastebin.com, http://pastie.org or http://gist.github.com
  • Second rule about asking in IRC: Don't ask "any ideas?" after your question. Your question should already ask this by itself.

And finally: Love what you do.

(temporarily)using and learning ruby on rails without internet

Theoretically, yes, practically, no. Sure, you can fire up a local web server and write code, but you obviously don't want to write everything yourself, you want to take advantage of ruby's gem package system. This will, obviously require an internet connection.

Learning Ruby on Rails

I've been moving from C# in my professional career to looking at Ruby and RoR in my personal life, and I've found linux to be slightly more appealing personally for development. Particularly now that I've started using git, the implementation is cleaner on linux.

Currently I'm dual booting and getting closer to running Ubuntu full time. I'm using gedit with various plugins for the development environment. And as of late 2010, I'm making the push to use Vim for development, even over Textmate on OS X.

A large amount of the Rails developers are using (gasp) Macs, which has actually got me thinking in that direction.

Although I haven't tried it, Ruby in Steel gives you a Ruby IDE inside the Visual Studio world, and IronRuby is the .NET flavor of Ruby, if you're interested.

As far as books are concerned, the Programming Ruby (also known as the Pickaxe) book from the Pragmatic Programmers is the de-facto for learning Ruby. I bit the bullet and purchased that book and Agile Web Development with Rails; both books have been excellent.

Peepcode screencasts and PDF books have also been great for getting started; at $9 per screencast it's hard to go wrong. I actually bought a 5-pack.

Also check out the following:

  • Official Rails Guides
  • Railscasts
  • railsapi.com or Ruby on Rails - APIdock
  • The Ruby Show
  • Rails for Zombies
  • Softies on Rails - Ruby on Rails for .NET Developers
  • Rails Podcast
  • Rails Best Practices

I've burned through the backlog of Rails and Rails Envy podcasts in the past month and they have provided wonderful insight into lots of topics, even regarding software development in general.



Related Topics



Leave a reply



Submit