News for hackers. Stuff that matters.

Ask HN: I want to learn Ruby

Hi HN,

I want to learn Ruby, and after I gain some experience or find it interesting, I want to do Rails. What's the best way to learn Ruby? Kindly suggest some good books or manuals.

( 8 comments | 4 points | on HN )
Re:Ask HN: I want to learn Ruby by evdawg on Thursday September 24, 2009 @03:52PM (#842023)
The Well-Grounded Rubyist is an introduction that will take you through to a Ruby pro in no time. http://www.manning.com/black2/

The official Rails guides are rough but a good resource. http://guides.rubyonrails.org/

I wouldn't bother with the official Rails book.

Re:Ask HN: I want to learn Ruby by boggles on Thursday September 24, 2009 @03:28PM (#841967)
You can't go wrong by picking up a copy of "The Ruby Programming Language" and "Agile Web Development with Rails". Between those two books you should be a master in no time.
Re:Ask HN: I want to learn Ruby by jhancock on Thursday September 24, 2009 @03:40PM (#842002)
"The Ruby Programming Language" highly recommended. http://www.amazon.com/Ruby-Programming-Language-David-Flanag...
Re:Ask HN: I want to learn Ruby by apotheon on Thursday September 24, 2009 @04:43PM (#842140)
The "best way" depends on your current skills, really. Ordered by increasing levels of programming skill, I'd say you should start with one of the following:

1. Learn to Program by Chris Pine

2. Everyday Scripting with Ruby by Brian Marick

3. Programming Ruby: The Pragmatic Programmer's Guide by David Thomas and Andrew Hunt

An excellent book to build your skills and internalize the common Ruby idioms is The Ruby Way by Hal Fulton.

As others have mentioned, Agile Web Development with Rails is The Book to use for learning Rails.

Of the above, the only book I don't have in one form or another is Chris Pine's (because it is, frankly, well below my skill level). There's an online tutorial by the same name, by the same guy, that can perhaps serve as a substitute -- but the book is much more complete, so if that's suitable to your skill level, I recommend getting the book.

Best o' luck! Ruby is a lot of fun.

Re:Ask HN: I want to learn Ruby by ApolloRising on Thursday September 24, 2009 @08:12PM (#842560)
Chris Pine wrote a great book for non programmers to step into Ruby, it really is well done.
Re:Ask HN: I want to learn Ruby by ryanfitz on Thursday September 24, 2009 @06:14PM (#842346)
If you're already comfortable with another object oriented language then picking up ruby is pretty straight forward, but I'll tell you what worked the best for me. I started out reading some of the above mentioned books, but when it came to sitting down and programming I still felt a bit lost. So I simple started with writing tests for very very simple things. Like test_print_hello_ten_times to teach me how to create an array and loop over it. I basically test drove how to work with the basic building blocks of the language and literally in an hour or two I felt very comfortable working in ruby.

Now I come from a background of doing TDD in java, so your milage my vary, but this was a very natural and easy approach to learning the language.

Re:Ask HN: I want to learn Ruby by apotheon on Friday September 25, 2009 @04:20AM (#843122)
Testing is one reason I think Everyday Scripting with Ruby is such a great book: while it's for someone with a casual acquaintance with programming, it still manages to teach TDD with Ruby in a clear, helpful manner that actually helps the reader internalize it such that the knowledge doesn't just evaporate when the book is done.
Re:Ask HN: I want to learn Ruby by bgnm2000 on Thursday September 24, 2009 @03:38PM (#841993)
I was in your exact situation a couple of months ago. I recently built my first app, by the guidance from this post.

http://news.ycombinator.com/item?id=679959