The 24 best Ruby books of all time

A data-backed answer

💎

Methodology

There are countless lists on the internet claiming to be the list of must-read Ruby books and it seemed that all those lists always recommended that same books minus two or three odd choices.

Finding good resources for learning programming is always tricky. Every-one has its own opinion about what book is the best to learn, and as we say in french, “Color and tastes should not be argued about”.

However I though it would be interesting to trust the wisdom of the crown and to find the books that appeared the most in those “Best Ruby Book” lists.

If you want to jump right on the results go take a look below at the full results. If you want to learn about the methodology, bear with me.

I’ve simply asked Google for a few queries like “Best Ruby Books” and its variations of. I have then scrapped all those pages (using ScrapingBee, a web scraping API I’m working on).

I’ve deduplicated the links and ended up with nearly 38 links. Using the title of the pages I was also able to quickly discards:

I ended up with almost 34 HTML files. I went on opening all the files on my browser, open my chrome inspector, found and wrote the CSS selector matching book titles in the article. This took me around 1hours, almost 30 seconds per page.

This also allowed me to discard even more nonrelevant pages, and I discarded a lot. In the end I compiled around 20 lists into this one.

Book titles were then extracted with manuel extraction and some web scraping.

I ended up with a huge list of books, not usable without some post-processing.

To find the most quoted Ruby books I needed to normalize my results.

I had to play with all the different variation like “{title} by {author}” or “{title} - {author}”.

Or “{title}:{subtitle}” and “{title}”, or even all the one containing edition number.

And afterquite a bit of manual cleaning.

My list now looked like this:

From there it was easy to compute the most recommended books. You can find all the data used to process this list on this repo. Now let’s take a look at the list:

I've also recently used some data from different book sellers in order to not forget important books and try to give more weight to books with incredible reviews.

Results

24
)

The Little Book Of Ruby Programming: Learn To Program Ruby For Beginners

by
Huw Collingbourne
6.5
% recommend
🛒   Buy
THE LITTLE BOOK OF RUBY The fastest, easiest way to learn to program Ruby. This book will teach you to program the Ruby language from the ground up.

You will learn about Object Orientation, classes, methods, modules and mixins, file operations and exception-handling. Whether you are a new programmer or an experienced programmer who wants to learn the Ruby language quickly and easily, this is the book for you! This book explains...

Getting Started with Ruby Object Orientation Classes & Superclasses Modules & Mixins Methods & Arguments Class & Instance Variables Operators & Tests Arrays & Hashes File Operations Exception-handling ...and much more Huw Collingbourne has been a programmer for more than 30 years. He is an online programming instructor who has taught tens of thousands of students to code in languages such as Ruby, C, C#, Java and Object Pascal.

He had written programming columns for numerous computer magazines such as PC Plus and Computer Shopper. He is Technical Director of the independent development company, SapphireSteel Software.

He is the author of a number of programming books including The Little Book Of C, The Little Book Of C #, The Little Book Of Pointers and The Little Book of Recursion. The Little Book Of Ruby gives you just the stuff you really need to get straight to the heart of Ruby programming without all the fluff and padding.
Amazon.com
23
)

Refactoring: Ruby Edition: Ruby Edition (Addison-Wesley Professional Ruby Series)

by
Jay Fields & Shane Harvie & Martin Fowler & Kent Beck
6.5
% recommend
🛒   Buy
The Definitive Refactoring Guide, Fully Revamped for Ruby With refactoring, programmers can transform even the most chaotic software into well-designed systems that are far easier to evolve and maintain. What’s more, they can do it one step at a time, through a series of simple, proven steps.

Now, there’s an authoritative and extensively updated version of Martin Fowler’s classic refactoring book that utilizes Ruby examples and idioms throughout–not code adapted from Java or any other environment. The authors introduce a detailed catalog of more than 70 proven Ruby refactorings, with specific guidance on when to apply each of them, step-by-step instructions for using them, and example code illustrating how they work.

Many of the authors’ refactorings use powerful Ruby-specific features, and all code samples are available for download. Leveraging Fowler’s original concepts, the authors show how to perform refactoring in a controlled, efficient, incremental manner, so you methodically improve your code’s structure without introducing new bugs.

Whatever your role in writing or maintaining Ruby code, this book will be an indispensable resource. This book will help you •    Understand the core principles of refactoring and the reasons for doing it •    Recognize “bad smells” in your Ruby code •    Rework bad designs into well-designed code, one step at a time •    Build tests to make sure your refactorings work properly •    Understand the challenges of refactoring and how they can be overcome •    Compose methods to package code properly •    Move features between objects to place responsibilities where they fit best •    Organize data to make it easier to work with •    Simplify conditional expressions and make more effective use of polymorphism •    Create interfaces that are easier to understand and use •    Generalize more effectively •    Perform larger refactorings that transform entire software systems and may take months or years •    Successfully refactor Ruby on Rails code
Amazon.com
22
)

Ruby on Rails Tutorial (Addison-Wesley Professional Ruby Series)

by
Michael Hartl
6.5
% recommend
🛒   Buy
“Ruby on Rails™ Tutorial by Michael Hartl has become a must-read for developers learning how to build Rails apps.” ―Peter Cooper, Editor of Ruby Inside Used by sites as varied as Disney, GitHub, Shopify, and Airbnb, Ruby on Rails is one of the most popular frameworks for developing web applications, but it can be challenging to learn and use. Whether you’re new to web development or new only to Rails, Ruby on Rails™ Tutorial, Sixth Edition , is the solution.

Best-selling author and leading Rails developer Michael Hartl teaches Rails by guiding you through the development of three example applications of increasing sophistication. The tutorial’s examples focus on the general principles of web development needed for virtually any kind of website.

The updates to this edition include full compatibility with Rails 6. This indispensable guide provides integrated tutorials not only for Rails, but also for the essential Ruby, HTML, CSS, and SQL skills you need when developing web applications.

Hartl explains how each new technique solves a real-world problem, and then he demonstrates it with bite-sized code that’s simple enough to understand while still being useful. Whatever your previous web development experience, this book will guide you to true Rails mastery.

This book will help you Install and set up your Rails development environment, including a pre-installed integrated development environment (IDE) in the cloud Go beyond generated code to truly understand how to build Rails applications from scratch Learn testing and test-driven development (TDD) Effectively use the Model-View-Controller (MVC) pattern Structure applications using the REST architecture Build static pages and transform them into dynamic ones Master the Ruby programming skills all Rails developers need Create high-quality site layouts and data models Implement registration and authentication systems, including validation and secure passwords Update, display, and delete users Upload images in production using a cloud storage service Implement account activation and password reset, including sending email with Rails Add social features and microblogging, including an introduction to Ajax Record version changes with Git and create a secure remote repository at GitHub Deploy your applications early and often with Heroku Register your book for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details.
Amazon.com
21
)

Learn Ruby On Rails For Web Development: Learn Rails The Fast And Easy Way!

by
John Elder
6.6
% recommend
🛒   Buy
Learning Ruby on Rails has never been this fast and easy, or fun! Veteran Codemy.com programmer John Elder walks you step by step through the ins and outs of Rails for Web Development. Written for the absolute beginner, you don't need any programming experience to dive in and get started with this book.

Follow along as John builds a Pinterest-style website from start to finish that allows people to sign up, log in and out, edit their profile, upload images to the database and style those images on the screen. By the end, you'll be well on your way to becoming a professional Ruby on Rails coder!*AUTHOR UPDTE: C9, the development environment we used in the book, was purchased by Amazon and is no longer accepting new users unless you sign up through my education account at Codemy.com/c9
Amazon.com
20
)

Rails AntiPatterns: Best Practice Ruby on Rails Refactoring (Addison-Wesley Professional Ruby) (Addison-Wesley Professional Ruby Series)

by
Chad Pytel / Tammer Saleh Pytel / Saleh
6.7
% recommend
🛒   Buy
The Complete Guide to Avoiding and Fixing Common Rails 3 Code and Design Problems As developers worldwide have adopted the powerful Ruby on Rails web framework, many have fallen victim to common mistakes that reduce code quality, performance, reliability, stability, scalability, and maintainability. Rails™ AntiPatterns identifies these widespread Rails code and design problems, explains why they’re bad and why they happen—and shows exactly what to do instead.

The book is organized into concise, modular chapters—each outlines a single common AntiPattern and offers detailed, cookbook-style code solutions that were previously difficult or impossible to find. Leading Rails developers Chad Pytel and Tammer Saleh also offer specific guidance for refactoring existing bad code or design to reflect sound object-oriented principles and established Rails best practices.

With their help, developers, architects, and testers can dramatically improve new and existing applications, avoid future problems, and establish superior Rails coding standards throughout their organizations. This book will help you understand, avoid, and solve problems with Model layer code, from general object-oriented programming violations to complex SQL and excessive redundancy Domain modeling, including schema and database issues such as normalization and serialization View layer tools and conventions Controller-layer code, including RESTful code Service-related APIs, including timeouts, exceptions, backgrounding, and response codes Third-party code, including plug-ins and gems Testing, from test suites to test-driven development processes Scaling and deployment Database issues, including migrations and validations System design for “graceful degradation” in the real world
Amazon.com
19
)

Intro To Ruby Programming: Beginners Guide Series

by
John Elder
6.8
% recommend
🛒   Buy
Learning Ruby has never been this fast and easy, or fun!Veteran Codemy.com programmer John Elder walks you step by step through the ins and outs of Ruby Programming. Written for the absolute beginner, you don't need any programming experience to dive in and get started with this book.

Follow along as John teaches you to set up a development environment and write your first program. You'll learn about Variables, Math, IF/THEN Statements, Array, Hashes, Loops, Methods and much more.By the end, you'll be well on your way to becoming a professional Ruby coder!Build on your skills with practice exercises at the end of each chapter and build a math flashcard game using all the skills you've learned throughout the book
Amazon.com
18
)

Ruby Way, The: Solutions and Techniques in Ruby Programming (Addison-Wesley Professional Ruby Series)

by
Hal Fulton & André Arko
6.9
% recommend
🛒   Buy
For more than a decade, Ruby developers have turned to The Ruby Way for reliable “how-to” guidance on effective Ruby programming. Now, Hal Fulton and André Arko have thoroughly updated this classic guide to cover new language enhancements and developers’ experiences through Ruby 2.1.

The new edition illuminates Ruby 2.1 through 400+ examples, each answering the question: “How do I do this in Ruby?” For each example, they present both a task description and realistic technical constraints. Next, they walk step-by-step through presenting one good solution, offering detailed explanations to promote deeper understanding.

Conveniently organized by topic, The Ruby Way, Third Edition makes it easier than ever to find the specific solution you want―and to write better code by reflecting Ruby’s unique philosophy and spirit. Coverage includes Ruby 2.1 overview: terminology, philosophy, and basic principles Best practices for strings and regular expressions Efficiently internationalizing your code Performing calculations (including trigonometry, calculus, statistics, and time/date calculations) Working with “Rubyesque” objects such as symbols and ranges Using arrays, hashes, stacks, queues, trees, graphs, and other data structures Efficiently storing data with YAML, JSON, and SQLite3 Leveraging object-oriented and dynamic features, from multiple constructors to program inspection Building GUIs with Shoes 4, Ruby/Tk, Ruby/GTK3, QtRuby, and other toolkits Improving thread performance by understanding Ruby’s synchronization methods and avoiding its pitfalls Automating system administration with Ruby Data formats: JSON, XML, RSS, Atom, RMagick, PDF, and more Testing and debugging with RSpec, Minitest, Cucumber, byebug, and pry Measuring Ruby program performance Packaging and distributing code, and managing dependencies with Bundler Network programming: clients, time servers, POP, SMTP, IMAP, Open-URI Web applications: HTTP servers, Rails, Sinatra, HTML generation, and more Writing distributed Ruby software with drb Choosing modern development tools that maximize your productivity All source code for this book may be downloaded at www.rubyhacker.com
Amazon.com
17
)

Ruby Under a Microscope: An Illustrated Guide to Ruby Internals

by
Pat Shaughnessy
6.9
% recommend
🛒   Buy
Ruby is a powerful programming language with a focus on simplicity, but beneath its elegant syntax it performs countless unseen tasks. Ruby Under a Microscope gives you a hands-on look at Ruby's core, using extensive diagrams and thorough explanations to show you how Ruby is implemented (no C skills required).

Author Pat Shaughnessy takes a scientific approach, laying out a series of experiments with Ruby code to take you behind the scenes of how programming languages work. You'll even find information on JRuby and Rubinius (two alternative implementations of Ruby), as well as in-depth explorations of Ruby's garbage collection algorithm.

Ruby Under a Microscope will teach you: How a few computer science concepts underpin Ruby's complex implementation How Ruby executes your code using a virtual machine How classes and modules are the same inside Ruby How Ruby employs algorithms originally developed for Lisp How Ruby uses grammar rules to parse and understand your code How your Ruby code is translated into a different language by a compiler No programming language needs to be a black box. Whether you're already intrigued by language implementation or just want to dig deeper into Ruby, you'll find Ruby Under a Microscope a fascinating way to become a better programmer
Amazon.com
16
)

Agile Web Development with Rails 6

by
Sam Ruby & David B. Copeland & Dave Thomas
7.0
% recommend
🛒   Buy
Learn Rails the way the Rails core team recommends it, along with the tens of thousands of developers who have used this broad, far-reaching tutorial and reference. If you're new to Rails, you'll get step-by-step guidance.

If you're an experienced developer, get the comprehensive, insider information you need for the latest version of Ruby on Rails. The new edition of this award-winning classic is completely updated for Rails 6 and Ruby 2.6, with information on system testing, Webpack, and advanced JavaScript.

Ruby on Rails helps you produce high-quality, beautiful-looking web applications quickly - you concentrate on creating the application, and Rails takes care of the details. Rails 6 brings many improvements, and this edition is updated to cover the new features and changes in best practices.

We start with a step-by-step walkthrough of building a real application, and in-depth chapters look at the built-in Rails features. Follow along with an extended tutorial as you write a web-based store application.

Eliminate tedious configuration and housekeeping, seamlessly incorporate Ajax and JavaScript, send and receive emails, manage background jobs with ActiveJob, and build real-time features using WebSockets and ActionCable. Test your applications as you write them using the built-in unit, integration, and system testing frameworks, internationalize your applications, and deploy your applications easily and securely.

New in this edition is coverage of Action Mailer, which allows you to receive emails in your app as well as ActionText, a zero-configuration rich text editing feature. Rails 1.0 was released in December 2005.

This book was there from the start, and didn't just evolve alongside Rails, it evolved with Rails. It has been developed in consultation with the Rails core team.

In fact, Rails itself is tested against the code in this book. What You Need: All you need is a Windows, Mac OS X, or Linux machine to do development on.

This book will take you through the steps to install Rails and its dependencies. If you aren't familiar with the Ruby programming language, this book contains a chapter that covers the basics necessary to understand the material in the book.
Amazon.com
15
)

Ruby Pocket Reference: Instant Help for Ruby Programmers

by
Michael Fitzgerald
7.1
% recommend
🛒   Buy
Updated for Ruby 2.2, this handy reference offers brief yet clear explanations of Ruby’s core elements—from operators to blocks to documentation creation—and highlights the key features you may work with every day. Need to know the correct syntax for a conditional? Forgot the name of that String method? This book is organized to help you find the facts fast.

Ruby Pocket Reference, 2nd Edition is ideal for experienced programmers who are new to Ruby. Whether you’ve come to Ruby because of Rails, or you want to take advantage of this clean, powerful, and expressive language for other applications, this reference will help you easily pinpoint the information you need
Amazon.com
14
)

Metaprogramming Ruby 2: Program Like the Ruby Pros (Facets of Ruby)

by
Paolo Perrotta
7.2
% recommend
🛒   Buy
Write powerful Ruby code that is easy to maintain and change. With metaprogramming, you can produce elegant, clean, and beautiful programs.

Once the domain of expert Rubyists, metaprogramming is now accessible to programmers of all levels. This thoroughly revised and updated second edition of the bestselling Metaprogramming Ruby explains metaprogramming in a down-to-earth style and arms you with a practical toolbox that will help you write your best Ruby code ever.

Dig under the surface and explore Ruby's most advanced feature: a collection of techniques and tricks known as metaprogramming. In this book, you'll learn metaprogramming as an essential component of Ruby and discover the deep, non-obvious details of the language.

Once you understand the tenets of Ruby, including the object model, scopes, and singleton classes, you're on your way to applying metaprogramming both in your daily work assignments and in your fun, after-hours projects. Metaprogramming Ruby, Second Edition makes mastering the language enjoyable.

The book is packed with: Pragmatic examples of metaprogramming in action, many of which come straight from real-life gems such as Rails. Programming challenges that let you experiment and play with some of the most out-there metaprogramming concepts.

Metaprogramming "spells"--33 practical recipes and idioms that you can study and apply right now, to write code that is sure to impress. This completely revised new edition covers the new features in Ruby 2.0 and 2.1, and contains code from the latest Ruby libraries, including Rails 4.

Most examples are new, "from the wild," with more recent libraries. And the book reflects current ideas of when and how much metaprogramming you should use.

Whether you're a Ruby apprentice on the path to mastering the language or a Ruby wiz in search of new tips, this book is for you. What You Need: Ruby 2.x, Ruby 1.9, or a recent version of JRuby.
Amazon.com
13
)

Effective Testing with RSpec 3: Build Ruby Apps with Confidence

by
Myron Marston & Ian Dees
7.7
% recommend
🛒   Buy
"Our tests are broken again!" "Why does the suite take so long to run?" "What value are we getting from these tests anyway?" Solve your testing problems by building and maintaining quality software with RSpec - the popular BDD-flavored Ruby testing framework. This definitive guide from RSpec's lead developer shows you how to use RSpec to drive more maintainable designs, specify and document expected behavior, and prevent regressions during refactoring.

Build a project using RSpec to design, describe, and test the behavior of your code. Whether you're new to automated tests or have been using them for years, this book will help you write more effective tests.

RSpec has been downloaded more than 100 million times and has inspired countless test frameworks in other languages. Use this influential Ruby testing framework to iteratively develop a project with the confidence that comes from well-tested code.

This book guides you through creating a Ruby project with RSpec, and explores the individual components in detail. Start by learning the basics of installing and using RSpec.

Then build a real-world JSON API, using RSpec throughout the process to drive a BDD-style outside-in workflow. Apply an effective test strategy to write fast, robust tests that support evolutionary design through refactoring.

The rest of the book provides the definitive guide to RSpec's components. Use rspec-core's metadata to slice and dice your spec suite.

Dig into rspec-expectations' matchers: compose them in flexible ways, specify expected outcomes with precision, and diagnose problems quickly with the help of good failure messages. Write fast, isolated tests with rspec-mocks' test doubles while pushing your code toward simpler interfaces.

The authors, with a combined 20 years of automated testing experience, share testing wisdom that will lead to a fun, productive testing experience. What You Need: To follow along with the book, you'll need Ruby 2.2+
Amazon.com
12
)

Beginning Ruby: From Novice to Professional (Expert's Voice in Open Source)

by
Peter Cooper
8.0
% recommend
🛒   Buy
Based on the bestselling first edition, Beginning Ruby: From Novice to Professional, Second Edition is the leading guide for every type of reader who wants to learn Ruby from the ground up. The new edition of this book provides the same excellent introduction to Ruby as the first edition plus updates for the newest version of Ruby, including the addition of the Sinatra and Ramaze web application frameworks and a chapter on GUI development so developers can take advantage of these new trends.

Beginning Ruby starts by explaining the principles behind object-oriented programming and within a few chapters builds toward creating a full Ruby application. By the end of the book, in addition to in-depth knowledge of Ruby, you'll also have basic understanding of many ancillary technologies such as SQL, XML, web frameworks, and networking
Amazon.com
11
)

Learn Ruby the Hard Way: A Simple and Idiomatic Introduction to the Imaginative World Of Computational Thinking with Code (Zed Shaw's Hard Way Series)

by
Zed Shaw
8.1
% recommend
🛒   Buy
You Will Learn Ruby! Zed Shaw has perfected the world’s best system for learning Ruby. Follow it and you will succeed–just like the hundreds of thousands of beginners Zed has taught to date! You bring the discipline, commitment, and persistence; the author supplies everything else.

In Learn Ruby the Hard Way, Third Edition , you’ll learn Ruby by working through 52 brilliantly crafted exercises. Read them.

Type their code precisely. (No copying and pasting!) Fix your mistakes.

Watch the programs run. As you do, you’ll learn how software works; what good programs look like; how to read, write, and think about code; and how to find and fix your mistakes using tricks professional programmers use.

Most importantly, you’ll learn the following, which you need to start writing excellent Ruby software of your own: • Installing your Ruby environment • Organizing and writing code • Ruby symbols and keywords • Basic mathematics • Variables and printing • Strings and text • Interacting with users • Working with files • Using and creating functions • Looping and logic • Arrays and elements • Hashmaps • Program design • Object-oriented programming • Inheritance and composition • Modules, classes, and objects • Project “skeleton” directories • Debugging and automated testing • Advanced user input • Text processing • Basic game development • Basic web development It’ll Be Hard At First. But Soon, You’ll Just Get It–And That Will Feel Great! This tutorial will reward you for every minute you put into it.

Soon, you’ll know one of the world’s most powerful, popular programming languages. You’ll be a Ruby programmer.

Watch Zed, too! The accompanying DVD contains 5+ hours of passionate, powerful teaching: a complete Ruby video course! Zed Shaw is an avid guitar player, programmer, and writer whose books teach people all over the world how to write software. His book Learn Python the Hard Way has been read by millions of people around the world.

His software has been used by many large and small companies. His essays are often quoted and read by members of many geek communities
Amazon.com
10
)

The Well-Grounded Rubyist

by
David A. Black & Joseph Leo III
8.2
% recommend
🛒   Buy
Summary The Well-Grounded Rubyist, Third Edition is a beautifully written tutorial that begins with your first Ruby program and takes you all the way to sophisticated topics like reflection, threading, and recursion. Ruby masters David A.

Black and Joe Leo distill their years of knowledge for you, concentrating on the language and its uses so you can use Ruby in any way you choose. Updated for Ruby 2.5.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Technology Designed for developer productivity, Ruby is an easy-to-learn dynamic language perfect for creating virtually any kind of software.

Its famously friendly development community, countless libraries, and amazing tools, like the Rails framework, have established it as the language of choice for high-profile companies, including GitHub, SlideShare, and Shopify. The future is bright for the well-grounded Rubyist! About the Book In The Well-Grounded Rubyist, Third Edition, expert authors David A.

Black and Joseph Leo III deliver Ruby mastery in an easy-to-read, casual style. You'll lock in core principles as you write your first Ruby programs.

Then, you'll progressively build up to topics like reflection, threading, and recursion, cementing your knowledge with high-value exercises to practice your skills along the way. What's Inside Basic Ruby syntax Running Ruby extensions FP concepts like currying, side-effect-free code, and recursion Ruby 2.5 updates About the Reader For readers with beginner-level programming skills, as well as more advanced programmers interested in Ruby and experienced Rubyists looking to review the foundations of their practice.

About the Authors David A. Black is an internationally known Ruby developer and author, and a cofounder of Ruby Central.

Ruby teacher and advocate Joseph Leo III is the founder of Def Method and lead organizer of the Gotham Ruby Conference. Table of Contents PART 1 RUBY FOUNDATIONS Bootstrapping your Ruby literacy Objects, methods, and local variables Organizing objects with classes Modules and program organization The default object (self), scope, and visibility Control-flow techniques PART 2 BUILT-IN CLASSES AND MODULES Built-in essentials Strings, symbols, and other scalar objects Collection and container objects Collections central: Enumerable and Enumerator Regular expressions and regexp-based string operations File and I/O operations PART 3 RUBY DYNAMICS Object individuation Callable and runnable objects Callbacks, hooks, and runtime introspection Ruby and functional programming
Amazon.com
9
)

Metaprogramming Ruby: Program Like the Ruby Pros

by
Paolo Perrotta
8.4
% recommend
🛒   Buy
Everyone in the Ruby world seems to be talking about metaprogramming--how you can use it to remove duplication in your code and write elegant, beautiful programs. Now you can get in on the action as well.

This book describes metaprogramming as an essential component of Ruby. Once you understand the principles of Ruby, including the object model, scopes, and eigenclasses, you're on your way to applying metaprogramming both in your daily work and in your fun, after-hours projects.

Learning metaprogramming doesn't have to be difficult or boring. By taking you on a Monday-through-Friday workweek adventure with a pair of programmers, Paolo Perrotta helps make mastering the art of metaprogramming both straightforward and entertaining.

The book is packed with: Pragmatic examples of metaprogramming in action, many of which come straight from popular libraries or frameworks, such as Rails. Programming challenges that let you experiment and play with some of the most fun, "out-there" metaprogramming concepts.

Metaprogramming spells --34 practical recipes and idioms that you can study and apply right now, to write code that is sure to impress. Whether you're a Ruby apprentice on the path to mastering the language or a Ruby wiz in search of new tips, this book is for you.
Amazon.com
8
)

Programming Ruby 1.9 & 2.0: The Pragmatic Programmers' Guide (The Facets of Ruby)

by
Dave Thomas & Andy Hunt & Chad Fowler
9.4
% recommend
🛒   Buy
Ruby is the fastest growing and most exciting dynamic language out there. If you need to get working programs delivered fast, you should add Ruby to your toolbox.

This book is the only complete reference for both Ruby 1.9 and Ruby 2.0, the very latest version of Ruby. 2013 marks the 20th anniversary of the Ruby language.

We're proud that throughout its history, we've continued to cover the latest version of Ruby. Would you like to go from first idea to working code much, much faster? Do you currently spend more time satisfying the compiler instead of your clients or end users? Are you frustrated with demanding languages that seem to get in your way, instead of getting the work done? Are you using Rails, and want to dig deeper into the underlying Ruby language? If so, then we've got a language and book for you! Ruby is a fully object-oriented language, much like the classic object-oriented language, Smalltalk.

Like Smalltalk, it is dynamically typed (as opposed to Java or C++), but unlike Smalltalk, Ruby features the same conveniences found in modern scripting languages such as Perl and Python. The combination of the power of a pure object-oriented language with the convenience of a scripting language makes Ruby a favorite tool of intelligent, forward-thinking programmers.

The Pickaxe contains four major sections: An acclaimed tutorial on using Ruby. The definitive reference to the language.

Complete documentation of all built-in classes, modules, and methods. Complete descriptions of all 97 standard libraries.

This is the reference manual for Ruby, including a description of all the standard library modules, a complete reference to all built-in classes and modules (including all the new and changed methods introduced by Ruby 1.9, 1.9.2, 1.9.3, and 2.0). It also includes all the new and changed syntax and semantics introduced since Ruby 1.8.

Learn about the new parameter passing rules, local variable scoping in blocks, fibers, and the new block declaration syntax, among other exciting new features. About Ruby 2.0 Ruby 2.0 is a minor update to Ruby 1.9, unlike the more major updates from Ruby 1.8 to Ruby 1.9.

The major language changes in Ruby 2.0 are the addition of keyword arguments and the change to use UTF-8 as the default source file encoding. There are a number of additions to the standard library, including: @Enumerator::Lazy@, which adds support for lazy access to potentially infinite lists.

Refinements allow you to encapsulate changes to third-party classes, and scope their application to individual source files, preventing your changes from polluting the global application. You'll also find that Ruby 2 is faster, and has memory management improvements that make it more server-friendly.

All told, there are over 110 sections of the book that have been flagged and cross-linked to indicate 2.0 content. What You Need This book assumes you have a basic understanding of object-oriented programming.

In general, Ruby programmers tend to favor the the command line for running their code, and they tend to use text editors rather than IDEs. * Ruby runs on Windows, Linux, and Macs.
Amazon.com
7
)

Head First Ruby: A Brain-Friendly Guide

by
Jay McGavren
9.7
% recommend
🛒   Buy
What will you learn from this book? What’s all the buzz about this Ruby language? Is it right for you? Well, ask yourself: are you tired of all those extra declarations, keywords, and compilation steps in your other language? Do you want to be a more productive programmer? Then you’ll love Ruby. With this unique hands-on learning experience, you’ll discover how Ruby takes care of all the details for you, so you can simply have fun and get more done with less code.

Why does this book look so different? Based on the latest research in cognitive science and learning theory, Head First Ruby uses a visually rich format to engage your mind, rather than a text-heavy approach to put you to sleep. Why waste your time struggling with new concepts? This multi-sensory learning experience is designed for the way your brain really works.
Amazon.com
6
)

Practical Object-Oriented Design: An Agile Primer Using Ruby

by
Sandi Metz
10.4
% recommend
🛒   Buy
The Complete Guide to Writing Maintainable, Manageable, Pleasing, and Powerful Object-Oriented Applications Object-oriented programming languages exist to help you create beautiful, straightforward applications that are easy to change and simple to extend. Unfortunately, the world is awash with object-oriented (OO) applications that are difficult to understand and expensive to change.

Practical Object-Oriented Design, Second Edition, immerses you in an OO mindset and teaches you powerful, real-world, object-oriented design techniques with simple and practical examples. Sandi Metz demonstrates how to build new applications that can “survive success” and repair existing applications that have become impossible to change.

Each technique is illustrated with extended examples in the easy-to-understand Ruby programming language, all downloadable from the companion website, poodr.com. Fully updated for Ruby 2.5, this guide shows how to Decide what belongs in a single class Avoid entangling objects that should be kept separate Define flexible interfaces among objects Reduce programming overhead costs with duck typing Successfully apply inheritance Build objects via composition Whatever your previous object-oriented experience, this concise guide will help you achieve the superior outcomes you’re looking for.

Register your book for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details.
Amazon.com
5
)

Design Patterns in Ruby

by
Russ Olsen
10.6
% recommend
🛒   Buy
Praise for Design Patterns in Ruby " Design Patterns in Ruby documents smart ways to resolve many problems that Ruby developers commonly encounter. Russ Olsen has done a great job of selecting classic patterns and augmenting these with newer patterns that have special relevance for Ruby.

He clearly explains each idea, making a wealth of experience available to Ruby developers for their own daily work." ―Steve Metsker, Managing Consultant with Dominion Digital, Inc. "This book provides a great demonstration of the key 'Gang of Four' design patterns without resorting to overly technical explanations.

Written in a precise, yet almost informal style, this book covers enough ground that even those without prior exposure to design patterns will soon feel confident applying them using Ruby. Olsen has done a great job to make a book about a classically 'dry' subject into such an engaging and even occasionally humorous read." ―Peter Cooper "This book renewed my interest in understanding patterns after a decade of good intentions.

Russ picked the most useful patterns for Ruby and introduced them in a straightforward and logical manner, going beyond the GoF's patterns. This book has improved my use of Ruby, and encouraged me to blow off the dust covering the GoF book." ―Mike Stok " Design Patterns in Ruby is a great way for programmers from statically typed objectoriented languages to learn how design patterns appear in a more dynamic, flexible language like Ruby." ―Rob Sanheim, Ruby Ninja, Relevance Most design pattern books are based on C++ and Java.

But Ruby is different―and the language's unique qualities make design patterns easier to implement and use. In this book, Russ Olsen demonstrates how to combine Ruby's power and elegance with patterns, and write more sophisticated, effective software with far fewer lines of code.

After reviewing the history, concepts, and goals of design patterns, Olsen offers a quick tour of the Ruby language―enough to allow any experienced software developer to immediately utilize patterns with Ruby. The book especially calls attention to Ruby features that simplify the use of patterns, including dynamic typing, code closures, and "mixins" for easier code reuse.

Fourteen of the classic "Gang of Four" patterns are considered from the Ruby point of view, explaining what problems each pattern solves, discussing whether traditional implementations make sense in the Ruby environment, and introducing Ruby-specific improvements. You'll discover opportunities to implement patterns in just one or two lines of code, instead of the endlessly repeated boilerplate that conventional languages often require.

Design Patterns in Ruby also identifies innovative new patterns that have emerged from the Ruby community. These include ways to create custom objects with metaprogramming, as well as the ambitious Rails-based "Convention Over Configuration" pattern, designed to help integrate entire applications and frameworks
Amazon.com
4
)

Ruby on Rails Tutorial: Learn Web Development with Rails (Addison-Wesley Professional Ruby Series)

by
Michael Hartl
12.9
% recommend
🛒   Buy
“ Ruby on Rails™ Tutorial by Michael Hartl has become a must-read for developers learning how to build Rails apps.” ― Peter Cooper, Editor of Ruby Inside Used by sites as varied as Twitter, GitHub, Disney, and Airbnb, Ruby on Rails is one of the most popular frameworks for developing web applications, but it can be challenging to learn and use. Whether you’re new to web development or new only to Rails, Ruby on Rails™ Tutorial, Fourth Edition, is the solution.

Best-selling author and leading Rails developer Michael Hartl teaches Rails by guiding you through the development of three example applications of increasing sophistication. The tutorial’s examples focus on the general principles of web development needed for virtually any kind of website.

The updates to this edition include full compatibility with Rails 5, a division of the largest chapters into more manageable units, and a huge number of new exercises interspersed in each chapter for maximum reinforcement of the material. This indispensable guide provides integrated tutorials not only for Rails, but also for the essential Ruby, HTML, CSS, and SQL skills you need when developing web applications.

Hartl explains how each new technique solves a real-world problem, and then he demonstrates it with bite-sized code that’s simple enough to understand, yet novel enough to be useful. Whatever your previous web development experience, this book will guide you to true Rails mastery
Amazon.com
3
)

Eloquent Ruby (Addison-Wesley Professional Ruby Series)

by
Russ Olsen
15.1
% recommend
🛒   Buy
It’s easy to write correct Ruby code, but to gain the fluency needed to write great Ruby code, you must go beyond syntax and absorb the “Ruby way” of thinking and problem solving. In Eloquent Ruby, Russ Olsen helps you write Ruby like true Rubyists do–so you can leverage its immense, surprising power.

Olsen draws on years of experience internalizing the Ruby culture and teaching Ruby to other programmers. He guides you to the “Ah Ha!” moments when it suddenly becomes clear why Ruby works the way it does, and how you can take advantage of this language’s elegance and expressiveness.

Eloquent Ruby starts small, answering tactical questions focused on a single statement, method, test, or bug. You’ll learn how to write code that actually looks like Ruby (not Java or C#); why Ruby has so many control structures; how to use strings, expressions, and symbols; and what dynamic typing is really good for.

Next, the book addresses bigger questions related to building methods and classes. You’ll discover why Ruby classes contain so many tiny methods, when to use operator overloading, and when to avoid it.

Olsen explains how to write Ruby code that writes its own code–and why you’ll want to. He concludes with powerful project-level features and techniques ranging from gems to Domain Specific Languages
Amazon.com
2
)

The Ruby Programming Language: Everything You Need to Know

by
David Flanagan & Yukihiro Matsumoto
16.6
% recommend
🛒   Buy
The Ruby Programming Language is the authoritative guide to Ruby and provides comprehensive coverage of versions 1.8 and 1.9 of the language. It was written (and illustrated!) by an all-star team: David Flanagan, bestselling author of programming language "bibles" (including JavaScript: The Definitive Guide and Java in a Nutshell) and committer to the Ruby Subversion repository.

Yukihiro "Matz" Matsumoto, creator, designer and lead developer of Ruby and author of Ruby in a Nutshell, which has been expanded and revised to become this book. why the lucky stiff, artist and Ruby programmer extraordinaire.

This book begins with a quick-start tutorial to the language, and then explains the language in detail from the bottom up: from lexical and syntactic structure to datatypes to expressions and statements and on through methods, blocks, lambdas, closures, classes and modules. The book also includes a long and thorough introduction to the rich API of the Ruby platform, demonstrating -- with heavily-commented example code -- Ruby's facilities for text processing, numeric manipulation, collections, input/output, networking, and concurrency.

An entire chapter is devoted to Ruby's metaprogramming capabilities. The Ruby Programming Language documents the Ruby language definitively but without the formality of a language specification
Amazon.com
1
)

Practical Object-Oriented Design in Ruby: An Agile Primer (Addison-Wesley Professional Ruby Series)

by
Sandi Metz
22.4
% recommend
🛒   Buy
The Complete Guide to Writing More Maintainable, Manageable, Pleasing, and Powerful Ruby Applications Ruby’s widely admired ease of use has a downside: Too many Ruby and Rails applications have been created without concern for their long-term maintenance or evolution. The Web is awash in Ruby code that is now virtually impossible to change or extend.

This text helps you solve that problem by using powerful real-world object-oriented design techniques, which it thoroughly explains using simple and practical Ruby examples. Sandi Metz has distilled a lifetime of conversations and presentations about object-oriented design into a set of Ruby-focused practices for crafting manageable, extensible, and pleasing code.

She shows you how to build new applications that can survive success and repair existing applications that have become impossible to change. Each technique is illustrated with extended examples, all downloadable from the companion Web site, poodr.info.

The first title to focus squarely on object-oriented Ruby application design, Practical Object-Oriented Design in Ruby will guide you to superior outcomes, whatever your previous Ruby experience. Novice Ruby programmers will find specific rules to live by; intermediate Ruby programmers will find valuable principles they can flexibly interpret and apply; and advanced Ruby programmers will find a common language they can use to lead development and guide their colleagues
Amazon.com

Conclusion

I hope that you liked this list. Please do not hesitate to check out the other ones I've published.

Keep me updated!

Receive weekly update about best programming books!
Just that, no spam, no bs.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.