tags:

views:

1065

answers:

13

What's a good book for learning Ruby?

+18  A: 

The Ruby Programming Language

Its a great book which i used to learn Ruby. It´s written similiar to K&R´s classic "The C Programming Language" and starts with everything you need to know, then goes into the deep end. It helps you understand the language structure, the idioms and everthing you will ever need to know. Metaprogramming is covered pretty deeply at the end too. Although Metaprogramming is such an integral part of ruby that it really is everywhere.

Other then that its a nice refrence book too and i guess you heard about its co-author Yukihiro Matsumoto who created the language in the first palce:)

Also have a look at Apidock which is a really great way to look through the Ruby/Rails api with comments and tips. I always have it open in a second Firefox window.

Oh and if you want to you can read it at Safari which is only around 10$ per month for 5 books...

LDomagala
+1 This book has the best pedagogical layout for learning a language. At first, I was a little annoyed, but then I realized I was learning the language faster and better than through any other method - mind you, this is also do to Ruby's 'Principle of Least Surprise'.
bias
I've found this book singularly brutal as a way to learn the language. I'm slightly more than halfway through, and I still don't feel I could actually acheieve anythign at all in the language.
lil_cain
i agree with lil_cain. +1 for it
jest
+4  A: 

In addition to "The Ruby Programming Language", it's useful to get a copy of the Ruby Cookbook for all kinds of practical examples.

SquareCog
+4  A: 

I've heard a lot of good things about Why's (Poignant) Guide To Ruby also.

Note: probably not the best choice if you can only pick one book, but certainly as a supplement to one or more of the other books mentioned in other answers :-)

Jay
Doh! I was posting this answer when S/O decided to stop responding. Disclaimer: I've never written a line of ruby, but if I were to, it would be because of this book.
I Have the Hat
i like why´s guide, but as the name says, it´s just a guide and you´ll need a book to go with it/read after it.
LDomagala
+3  A: 

+1 for the Ruby Programming Language - you can't really go wrong when one of the authors is Matx himself!

The Ruby Way is also a good book, loads of examples for pretty much everything, from metaprogramming to reading RSS feeds etc.

The Pickaxe book is ok, but I found the examples a bit tedious and the ongoing karaoke "project" just didn't grab my attention. Still explains a lot though.

marktucks
+10  A: 

The Pickaxe book is a must-have, and the Poignant Guide is perhaps the best technical book ever written, but I would also include David Black's Ruby for Rails, especially for understanding Ruby's metaprogramming capabilities. It's really misnamed, as it's quite valuable whether you use Rails or not.

jcrossley3
poignant guide has moved http://mislav.uniqpath.com/poignant-guide/
Comptrol
+1  A: 

In addition to all the good suggestions above, I would recommend checking out the Ruby Quiz

It's well moderated, and has lots of code examples and snippets.

DasBoot
A: 

In the context of learning Ruby in a web application, I'd look at Agile Web Development with Rails. I found that I was able to pick up Ruby pretty easily in the context of their examples. I also zipped over to the Ruby Documentation web site pretty frequently to look up stuff (just like I do with MSDN).

tvanfosson
+1  A: 

It is not a book but a site: RubyLearning

kwicher
A: 

Hi,

I suggest "Teach Yourself Ruby In 21 Days"... very good book that teach you all the basics!

Regards,

Lennie

+1  A: 

There's quite a comprehensive list at http://blog.mrneighborly.com/2007/10/ruby-and-rails-bibliography-of-sorts.html.

Ryan Bigg
+2  A: 

I highly recommend this book, Beginning Ruby: From Novice to Professional.

alamodey
+2  A: 

It depends what you already know. I've been doing Java heavily for some years now, and knew a little Ruby. I was looking for a short primer, just enough to get me started, figuring to learn the rest along the way. Design Patterns in Ruby was helpful for me. It consists of two basic parts, both of which were very useful. The first part is the primer, and it goes through features pretty quickly, which is what I wanted. The next part is the design patterns part. There, it goes through several common patterns one at a time. For each pattern, it codes it in Ruby, but as though thinking in Java, then it shows how to do the pattern "the Ruby way." This was very, very helpful. It exposes the nooks and crannies of ruby objects, and shows how to leverage the special features of Ruby, and in the process, teaches how thinking in Ruby is different from thinking in Java.

Don Branson
+1  A: 

The Pragmatic Programmer's collection contains a lot of great books on Ruby, including the previously mentioned "Pickaxe book".

-John

John T