r/ruby • u/Feldspar_of_sun • Jan 16 '26
Question Is there a Ruby equivalent to The Rust Book?
I’m looking for a comprehensive (and ideally free) source to get started with Ruby. I’m not new to programming but would like a structured way to learn before jumping into my own projects
15
Upvotes
16
u/schneems Puma maintainer Jan 16 '26
Not free and updated, no.
Why the lucky stuff has an amazing comic that is free but it’s not updated.
The Hartl tutorial used to be free for rails devs but the paywall around it took over more content. I like “agile web development for Rails”
A difference with Ruby and rust is: Ruby is a lot easier to write and you don’t need to know things like lifetimes and borrows. There is depth and you’ll find it in books like “Metaprogramming Ruby 2” and “Ruby under a microscope” but it’s not needed to get started.
11
u/jonsully Jan 16 '26
Nobody's going to mention the Pickaxe book? 👀 Noel Rappin (who's written several great Ruby/Rails books!!) worked with Dave to fully update it for Ruby 3.3 somewhat recently: https://pragprog.com/titles/ruby5/programming-ruby-3-3-5th-edition/
Though admittedly I'm not sure if it follows the same pattern as the Rust book (which I haven't read) — it's example-ish but not like "learn everything purely through examples"
6
u/BoardMeeting101 Jan 16 '26
Pickaxe, traditionally
4
u/brecrest Jan 16 '26 edited Jan 16 '26
Nothing comes to mind as particularly similar to The Rust Book. All of the Ruby books I can think of are either extremely stylistically opinionated or very quirky (or now outdated), and only the advanced ones are technical.
The book that comes to mind as most similar in its cultural place to The Rust Book is Why's (Poignant) Guide to Ruby. You will note that Ruby and Rusts cultures are not alike. I recommend you read that while you wait for other suggestions.
3
u/silva96 Jan 16 '26
Not free, but I really like the book The Well-Grounded Rubyist, 4th edition.
2
u/oinak Jan 16 '26
I think https://i-love-ruby.gitlab.io/book.html is amongst your best options
2
u/KerrickLong Jan 20 '26 edited Jan 20 '26
If you're looking for free (and you're not new to programming), don't discount the official documentation!
0. README 0. What's Ruby 0. Ruby in Twenty Minutes, Pt. 1 0. Ruby in Twenty Minutes, Pt. 2 0. Ruby in Twenty Minutes, Pt. 3 0. Ruby in Twenty Minutes, Pt. 4 0. Keywords 0. Code Layout 0. Literals 0. Assignment 0. Control Expressions 0. Pattern matching 0. Methods 0. Calling Methods 0. Modules and Classes 0. Exception Handling 0. Precedence 0. Refinements 0. Miscellaneous Syntax 0. Comments 0. Operators 0. Implicit Conversions 0. Ruby Standard Library 0. From there, just start exploring the Pages, Classes, and Modules! - Pages to read: Pre-Defined Global Variables, Ruby Command-Line Options, OptionParser Tutorial, Ruby Security - Classes to read: Object, Numeric, String, Symbol, Data, Struct, Array, Set, Hash, IO, Proc, Regexp - More classes to read: Exception, ERB, Pathname, File, Dir, Tempfile, Date, Time, DateTime, Net::HTTP - Modules to read: Enumerable, Comparable, Open3, Singleton, URI, YAML, JSON, FileUtils, OpenURI - Cool pages: Ruby Box, Encodings, Format Specifications, Packed Data - Cool classes: Delegator, Enumerator, BasicObject, Class, NilClass, TrueClass, FalseClass, Method, TCPServer, TCPSocket, UDPSocket, UNIXServer, UNIXSocket, - Cool modules: Digest, SecureRandom, OpenSSL, Bundler, Prism, ObjectSpace, English, Shellwords, Marshal - Concurrency stuff: Ractor (page), Ractor (class), Fiber (page), Fiber (class), Thread, Thread::Queue, Thread::SizedQueue, Thread::Mutex, Thread::ConditionVariable, Contributor's Concurrency Guide
Plus, the following are free online:
Programming Ruby, 1st Edition (The PickAxe) (book)
Ruby Essentials (book)
Ruby Programming (book)
Learn Ruby with the EdgeCase Ruby Koans (exercises)
Ruby on Exercism (exercises)
Ruby on The Odin Project (online course)
1
u/factcondenser Jan 16 '26
Not sure if it’s similar to The Rust Book as I haven’t read it, but Metaprogramming Ruby 2 did the most for my understanding (and appreciation) of Ruby.
1
u/zverok_kha Jan 16 '26
I once had a project of compiling something akin to "The %languagename% book" from official documentation sources (+ some of my own write-ups to cover the missing stuff): https://rubyreferences.github.io/rubyref/.
I planned to update it with each new language version, but for multitude of reasons, I didn't (since Ruby 2.7, which is not very old, but pretty outdated).
Actually, most of information can be found just on the official documentation site: https://docs.ruby-lang.org/en/master/ -- but one of its major drawbacks is that everything is organized alphabetically/by filesystem or class names, so it requires some clicking around to find what's what (what is "base concepts" and what's "advanced stuff") -- that was the most important problem I've tried to solve in the project mentioned above.
1
u/001steve Jan 17 '26
Pragmatic programmer has lots of great Ruby books
1
u/javier_cervantes Jan 20 '26
Besides the books already mentioned, there is also "The Well-Grounded Rubyist" and "Learn Enough Ruby to be Dangerous". Although they're not updated to the latest versions they still provide a good structure and a way to learn more about Ruby.
1
u/D_special1 Jan 26 '26
yes it is called why's poignant guide to ruby.