Buy new:
-74% $12.77$12.77
$3.99 delivery May 28 - June 2
Ships from: Shakespeare Book House Sold by: Shakespeare Book House
Save with Used - Good
$3.29$3.29
$3.98 delivery Saturday, May 31
Ships from: glenthebookseller Sold by: glenthebookseller

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the authors
OK
Ruby Cookbook 1st Edition
Purchase options and add-ons
Do you want to push Ruby to its limits? The Ruby Cookbook is the most comprehensive problem-solving guide to today's hottest programming language. It gives you hundreds of solutions to real-world problems, with clear explanations and thousands of lines of code you can use in your own projects.
From data structures and algorithms, to integration with cutting-edge technologies, the Ruby Cookbook has something for every programmer. Beginners and advanced Rubyists alike will learn how to program with:
- Strings and numbers
- Arrays and hashes
- Classes, modules, and namespaces
- Reflection and metaprogramming
- XML and HTML processing
- Ruby on Rails (including Ajax integration)
- Databases
- Graphics
- Internet services like email, SSH, and BitTorrent
- Web services
- Multitasking
- Graphical and terminal interfaces
If you need to write a web application, this book shows you how to get started with Rails. If you're a system administrator who needs to rename thousands of files, you'll see how to use Ruby for this and other everyday tasks. You'll learn how to read and write Excel spreadsheets, classify text with Bayesian filters, and create PDF files. We've even included a few silly tricks that were too cool to leave out, like how to blink the lights on your keyboard.
The Ruby Cookbook is the most useful book yet written about Ruby. When you need to solve a problem, don't reinvent the wheel: look it up in the Cookbook.
- ISBN-100596523696
- ISBN-13978-0596523695
- Edition1st
- PublisherO'Reilly Media
- Publication dateAugust 22, 2006
- LanguageEnglish
- Dimensions7 x 1.7 x 9.19 inches
- Print length906 pages
There is a newer edition of this item:
$22.58
(23)
Only 3 left in stock (more on the way).
Frequently purchased items with fast delivery
From the brand

-
Sharing the knowledge of experts
O'Reilly's mission is to change the world by sharing the knowledge of innovators. For over 40 years, we've inspired companies and individuals to do new things (and do them better) by providing the skills and understanding that are necessary for success.
Our customers are hungry to build the innovations that propel the world forward. And we help them do just that.
-
Your partner in learning
-
Bestsellers
-
Software Development
-
Programming Languages
-
AI / Machine Learning
-
Data Science
-
Data, Databases and more
-
Cloud Services
-
Business
-
Finance
-
Blockchain / Cryptocurrency
-
Security
-
Cookbooks
-
Head First series
-
97 Things series
-
Lean series
Editorial Reviews
About the Author
Leonard Richardson has been programming since he was eight years old. Recently, the quality of his code has improved somewhat. He is responsible for libraries in many languages, including Rubyful Soup. A California native, he now works in New York and maintains a website at crummy.com
Product details
- Publisher : O'Reilly Media
- Publication date : August 22, 2006
- Edition : 1st
- Language : English
- Print length : 906 pages
- ISBN-10 : 0596523696
- ISBN-13 : 978-0596523695
- Item Weight : 2.85 pounds
- Dimensions : 7 x 1.7 x 9.19 inches
- Customer Reviews:
About the authors
Lucas Carlson is a bestselling novelist. He takes his first-hand experiences as an entrepreneur and computer programmer, and turns them into thrillers that pack a punch and are hard to put down.
His writing has often been compared to Michael Crichton, Joseph Finder, Harlan Coben and Blake Crouch. They deal with technology and business themes and how they affect society.
Carlson lives in San Diego with his family.
Twitter: @cardmagic
Facebook: https://www.facebook.com/LucasCarlsonOfficial
Discover more of the author’s books, see similar authors, read book recommendations and more.
Customer reviews
- 5 star4 star3 star2 star1 star5 star71%15%14%0%0%71%
- 5 star4 star3 star2 star1 star4 star71%15%14%0%0%15%
- 5 star4 star3 star2 star1 star3 star71%15%14%0%0%14%
- 5 star4 star3 star2 star1 star2 star71%15%14%0%0%0%
- 5 star4 star3 star2 star1 star1 star71%15%14%0%0%0%
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Customers find the cookbook's content valuable. They appreciate its learning value, with one customer noting how it provides real code examples and serves as a hands-on learning experience.
AI-generated from the text of customer reviews
Select to learn more
Customers find the cookbook's content helpful.
"...This book is no exception...." Read more
"I'm a complete beginner to Ruby, but I still found this book very helpful...." Read more
"Great book when you need to get something done and don't know which of the myriad ways is best." Read more
"...The book really has some great content." Read more
Customers find the cookbook valuable for learning, with one mentioning it serves as an excellent way to see real code examples, while another describes it as an amazing lookup tool.
"Cookbooks are an excellent way to see real code examples to real life problems. This book is no exception...." Read more
"As others already said, this book is all about immediate, hands-on learning experience with some real, live and working code, delivered by *you*..." Read more
"* Very accurate, fast & clever. * Amazing lookup tool - sometimes finding an answer in the book is faster than google! Just read it!" Read more
Top reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on June 9, 2014Cookbooks are an excellent way to see real code examples to real life problems. This book is no exception. I have been programming in ruby for 2-3 years and find this book useful as seeing other professionals code always help build my confidence and understanding.
I would recommend any real ruby enthusiast buy this book as it walks through basic examples to very complex ideas on how to solve common and interesting problems.
- Reviewed in the United States on July 15, 2007As others already said, this book is all about immediate, hands-on learning experience with some real, live and working code, delivered by *you* quickly. This book by itself may not be enough to gain a deeper understanding of Ruby, and its philosophical background, but should be certainly enough to get you going with a new language, and get a "feel" for it: not only it covers the language (more or less), and the standard library, but it also offers you a quick "preview" of some most popular 3rd party libraries. Just keep in mind that there are many others, and sometiems I disagree with author's selections of what to include. (ImageMagic is one, for example)
Personally, for almost everything I learn, I prefer to have two kinds of manuals: a) deep and concise, and b) quick&dirty. This one fits the second role just perfectly, therefore I recommend it.
For more depth, go ang get "Programming Ruby" as well.
- Reviewed in the United States on August 29, 2006I have a confession to make. Over more than twenty years as a programmer I'd never really had my head around object-oriented programming. I started out using C and then tried PHP and Perl and treated both as purely procedural languages (indeed, one Perl guru looked at my code and said "you were a C programmer weren't you"; humbling). Java, JavaScript, C++ and even Objective C had their turn at getting me to convert but none took (though I do code JavaScript under sufferance) until Ruby. A few month ago I started using Rails and became hooked on it and the underlying language. My Rails and Ruby skills have progressed in leaps and bounds. I've already had a good read of "Programming Ruby" and "Agile Web Development with Rails" and enjoyed and learnt from both.
I also have to admit to loving the O'Reilly "Cookbook" series. Several, particularly the "Perl Cookbook", have pride of place on the bookshelf closest to my computer. So the "Ruby Cookbook" by Lucas Carlson and Leonard Richardson was eagerly awaited. The "Cookbook" series are designed to provide you with a plethora of code examples to guide you in writing your own code. I'm definitely a hands-on style of learner and the Cookbook series suits my style - I can start getting my hands dirty with complex problems knowing I have help to code my way of out of the tight spots. This one covers a wide range of tasks from simple, such as walking a directory tree or manipulating text and numbers, through to more complex such as working with AJAX in Ruby on Rails. If you have't previously come across a book in this style then each chapter is broken up into a number of 'recipes' with a problem, a solution and then discussion of the solution.
This sort of book lives and dies by two criteria - the quality of the code and the usefulness of the recipe selection. "Ruby Cookbook" wins on both. The topics covered are wide and leave little, if any, part of the language unexplained. They start with data and structures such as strings and hashes before moving on to code blocks, objects, classes and modules. There is then an intriguing chapter on reflection and metaprogramming that I am still puzzling through before the book moves on to more internet based topics such as XML, HTML, web and internet services and, of course, Rails. The book then proceeds with chapters on the necessary housekeeping of development such as testing, packaging and automating tasks with Rake before finishing with extending Ruby with other languages and system administration tasks. The code is well written; clear and well commented, easily understandable by a virtual newb like me. The discussion is fairly clear, seemingly concise while allowing you to understand the code and how it might be changed for particular purposes.
I'm not going to go into more details as to the contents but instead point you to the <a href="[...]">book's page at O'Reilly</a> which includes a link to the contents, listnig all the recipes in the book, and two example chapters; Chapter 7 on code blocks and iteration and Chapter 15 devoted to Rails. Together they will give you a good feel for the style and contents of the book.
The book is well written and well edited. I've already tried over a dozen of the recipes and haven't found a single code error, so my faith in the other 300 or so has risen considerably. The discussion that accompanies each recipe is a marvelous way of learning just that little bit more about the language. I found them quite good, though the odd one could do with further explanation if the book is to stand on its own - for example the discussion accompanying the recipe to iterate over a hash was not perfectly clear on the difference between Hash#each and Hash#each_pair.
At more than 800 pages this is a large and extensive volume, though the price may make you wince. Usually programming books this large have at least part of their size dedicated to something I refer to as pseudo-padding, some sort of reference or simple language explanation - this one has neither, all of it is devoted to the recipes.
With Ruby use, thanks in no part to the popularity of Rails, growing by leaps and bounds I'm sure this volume will be a well deserved bestseller. I give it four stars and recommend it to all but the most expert Ruby programmers. For beginners who, like me, appreciate hands on learning it is a must.
- Reviewed in the United States on June 20, 2015This book is really old. Everything changed
- Reviewed in the United States on February 21, 2016I'm a complete beginner to Ruby, but I still found this book very helpful. It's got a lot of information to help both beginner users like me, as well as people with more advanced knowledge. I would recommend it.
- Reviewed in the United States on November 11, 2014Great book when you need to get something done and don't know which of the myriad ways is best.
- Reviewed in the United States on March 3, 2013* Very accurate, fast & clever.
* Amazing lookup tool - sometimes finding an answer in the book is faster than google!
Just read it!
- Reviewed in the United States on May 1, 2013The services was excellent. The book was in better shape that I thought. The writing of the book was as good as the other cookbooks Perl.
Top reviews from other countries
- Amazon CustomerReviewed in the United Kingdom on November 2, 2013
5.0 out of 5 stars My Favourite Ruby Book
I've been using Ruby now for around 12 years and already have quite a few Ruby tutorial and reference books, but this is my favourite because it contains many practical examples. Unlike the reference books, this book can be read from cover to cover like a novel.
I originally bought the Kindle version, but followed up with a proper paper copy because I like to flick forward and back through the book. It's so good, I bought it twice!
I recommend this book to anyone programming in Ruby, from beginner to expert.