The Book of Ruby
A Hands-On Guide for the Adventurous
Publisher: No Starch Press
Final Release Date: June 2011
Pages: 400

Ruby is famous for being easy to learn, but most users only scratch the surface of what it can do. While other books focus on Ruby's trendier features, The Book of Ruby reveals the secret inner workings of one of the world's most popular programming languages, teaching you to write clear, maintainable code.

You'll start with the basics—types, data structures, and control flows—and progress to advanced features like blocks, mixins, metaclasses, and beyond. Rather than bog you down with a lot of theory, The Book of Ruby takes a hands-on approach and focuses on making you productive from day one. As you follow along, you'll learn to:

  • Leverage Ruby's succinct and flexible syntax to maximize your productivity
  • Balance Ruby's functional, imperative, and object-oriented features
  • Write self-modifying programs using dynamic programming techniques
  • Create new fibers and threads to manage independent processes concurrently
  • Catch and recover from execution errors with robust exception handling
  • Develop powerful web applications with the Ruby on Rails framework

Each chapter includes a "Digging Deeper" section that shows you how Ruby works under the hood, so you'll never be caught off guard by its deceptively simple scoping, multithreading features, or precedence rules.

Whether you're new to programming or just new Ruby, The Book of Ruby is your guide to rapid, real-world software development with this unique and elegant language.

Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews


by PowerReviews
oreillyThe Book of Ruby

(based on 4 reviews)

Ratings Distribution

  • 5 Stars



  • 4 Stars



  • 3 Stars



  • 2 Stars



  • 1 Stars




of respondents would recommend this to a friend.

Reviewed by 4 customers

Displaying reviews 1-4

Back to top

(4 of 4 customers found this review helpful)


This Book Considered Harmful

By apotheon

from Fort Collins, CO

About Me Developer, It Consultant, Open Source Contributor, Writer


  • Organized


  • Difficult to understand
  • Harmful
  • Too many errors

Best Uses

  • Doorstop

Comments about oreilly The Book of Ruby:

I'm frankly shocked to see that, as of now, three people have reviewed this book and they all gave it three stars. It is a terrible book, where Ruby books on average are among some of the best programming books available.

The author is perversely insistent on using his own "consistent" code style, apparently in every single language he uses, no matter how badly it might clash with the syntax, semantics, or community preferred style of the language. This teaches new Rubyists to write code in a manner that is likely to get them ridiculed or at least ignored by other programmers, it makes source code harder to read due to unexpected weirdness of style that seems to have essentially no focus on clarifying the parts of the language used, and interferes with the ability to collaborate. Even worse, his claims of consistency are grossly exaggerated, as skipping from one example to the next yields differences in style that should be obvious (and frustrating) to any experienced coder. He even manages to fail to use any consistent variable naming conventions, using both camelCase and runtogether styles with no discernible pattern to the choice.

The author's explanations of language semantics are quite often incorrect, which can have dangerous consequences for readers who take him at his word about how the features of the language work. His explanations of syntax misidentify significant factors, which (if one "learns" it how he "teaches" it) can lead to a misconstructed understanding of how to write Ruby code, resulting in incorrect code dismayingly often. His suggestions for how to accomplish various tasks are at times either sprawlingly over-verbose for no gain or cryptically brief, making clarity of code difficult; examples often demonstrate the wrong way to do things without any attention on a good way to do them (though there are usually several good ways to accomplish something); and his approach to coding in Ruby tends to produce inefficient, non-idiomatic, unmodular, and frankly unmaintainable source code.

There are surprising moments where the author actually gets fine technical details of language concepts and implementation correct where other books might fail to mention such details or get them wrong, as in the case of a casual mention of closures that manages to define them quite precisely and more accurately than most experienced coders, but these positive aspects of the text are not the norm and do not appear in any systematic or predictable fashion so that the reader who does not already know such things is unlikely to be able to discern the wheat from the chaff.

Everything about the book largely falls into one or more of three categories:

* dull, conventional, uninsightful, plodding writing that addresses nothing of particular interest beyond what can be found in online tutorials that are much quicker to read (and cheaper)

* superficial perversity of style and conceptual presentation that can only confuse or frustrated many readers, incorrect explanation, and sloppy thinking

* self-congratulation on being smarter than everyone else (not all that common in the book, but strangely prominent where it appears), perhaps a touch polished up by obviously insincere modesty

In short, avoid this book like the plague. You can find a number of much better books about Ruby for various purposes quite easily, and (contrary to what other reviewers have said) it is only useful as a reference if you want your reference to be full of hidden mistakes. It might be well-organized, weirdly enough, but that hardly seems very useful for this book. Perhaps the author is of some use in helping other people organize the outlines of their own books, though.

I can only assume that the other three reviewers on O'Reilly, at the time of this writing, are new to Ruby and unaware of the depth of problems with this book due to unfamiliarity with the language.

Plucking a Ruby book at random from amongst the offerings of O'Reilly, Addison-Wesley, and the Pragmatic Bookshelf is just about guaranteed to give you something at least an order of magnitude better.

(1 of 1 customers found this review helpful)


Ruby reference–sometimes hard to follow

By Michal Konrad Owsiak

from Poland

Verified Reviewer



    • Not comprehensive enough
    • Too basic

    Best Uses

    • Intermediate

    Comments about oreilly The Book of Ruby:

    I think Book of Ruby was aimed as elementary for the Ruby language however, Huw didn't achieved his goal at 100%. If you take a look at table of contents you can see that most of the basics of the language are covered. And this is certainly true, but the devil lies in detail – like always.

    Book is very well organized, it contains well defined chapters and sections, but at some point is hard to follow. When I was reading it, I found myself getting confused regarding particular topics. Point is – some topics are "under simplified". This way, you can think that everybody will follow but in fact, people get confused. I know that sometimes it is tempting to tell people "just enough", in order to make them do, at least, something. But this is a tricky way to teach.

    This book should be addressed to people who are in the middle of the road with Ruby programming. It is to complex for beginners – they won't be attracted by simple examples that don't lead to anything "fancy". On the other hand it is too simple for advanced users. I think it should be treated as some sort of companion book for other books – covering Rails.


    Decent Ruby Book

    By Rob

    from Brisbane, Australia

    About Me Developer

    Verified Reviewer


    • Concise
    • Easy to understand
    • Helpful examples


      Best Uses

      • Novice

      Comments about oreilly The Book of Ruby:

      The Book of Ruby constantly had me torn. I love the simple and clear examples. The explanation of the core of the ruby language is very solid and well done. It's a readable book.... but the code isn't as clear as I would hope. In trying to point the reader to what the author views as the important things to learn, he often deliberately goes against the normal ruby coding style.

      The code is simple and clear,yet there are too many times where it grates against me. There is perhaps a case to saying that it is simply my own personal biases that are getting in the way, and I can live with that, but I like to think that I've built up these biases and thought from experience, and that they count for something.

      So in reviewing this book, I am, as I said torn. It is quite clear. It's well written with quite good coding examples. I did manage to read it from end to end, which speaks of it's readability. It's sold as a gentler introduction than the classic pick-axe, but I don't know who I'd recommend it to over the pick-axe. I give this book a 3 out of 5. It's faults won't let me rate it higher, but aren't significant enough to rate it any lower.


      Great Reference Book

      By Wayne

      from Arkansas

      About Me Designer

      Verified Reviewer


      • Accurate
      • Concise
      • Helpful examples


      • Not entertaining

      Best Uses

      • Expert
      • Intermediate
      • Reference material

      Comments about oreilly The Book of Ruby:

      The Book of Ruby, by Huw Collingbourne, is an interesting introduction to the language of Ruby and a great choice for the advanced programmer who wants to pick up Ruby.

      If you check out the Table of Contents you can see that after the introduction to Ruby, the author provides plenty of instruction on how Ruby deals with classes, and then moves to strings and other common data types. After discussing data types, The Book of Ruby goes on to present different flows (loops, if-else statements) and grouping (blocks, methods) and then drops into a fairly powerful Ruby construct called Symbols. You'll also find information on marshaling data, and storing it to disk either by marshaling or YAML data.

      Overall this was an interesting book - I liked having several small programs to work with, which let you focus on a single concept. That definitely helps pick up the specific ways you can program in Ruby. However, from a learning perspective, my issue with The Book of Ruby is jumping straight from an introductory "Hello World!" program into classes. For the novice programmer, this approach is probably like jumping in the deep end. I would highly recommend picking up a different book if you want to learn how to program. When reading The Book of Ruby you won't be entertained or bored, merely informed. I'd say this book is best suited for reference material, and would be a great addition to your reference library.

      Displaying reviews 1-4

      Back to top

      Buy 2 Get 1 Free Free Shipping Guarantee
      Buying Options
      Immediate Access - Go Digital what's this?
      Ebook:  $31.95
      Formats:  ePub, Mobi, PDF
      Print & Ebook:  $43.95
      Print:  $39.95