

Ask HN: I want to learn Ruby  - diptanu

Hi HN,<p>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.
======
evdawg
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.

------
boggles
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.

~~~
jhancock
"The Ruby Programming Language" highly recommended.
[http://www.amazon.com/Ruby-Programming-Language-David-
Flanag...](http://www.amazon.com/Ruby-Programming-Language-David-
Flanagan/dp/0596516177)

------
apotheon
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.

~~~
ApolloRising
Chris Pine wrote a great book for non programmers to step into Ruby, it really
is well done.

------
ryanfitz
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.

~~~
apotheon
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.

------
bgnm2000
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>

