- About this book
- Ruby
- What is Ruby?
- Philosophy and Principles
- Practical Characteristics
- Installing Ruby
- Ubuntu
- OSX
- Windows
- RVM
- Installing a Ruby interpreter
- Language Basics
- Dynamic typing
- Strong typing
- Basic types
- Integers
- Fixnums
- Bignums
- Floating point
- BigDecimals
- Dates
- Times
- Rationals
- Booleans
- Nil
- Strings
- Substrings
- Concatenating Strings
- Encodings
- Variables are references in memory
- Freezing objects explicitly
- Some String methods and tricks
- Symbols
- The philosophy of symbols
- Regular expressions
- Groups
- Named groups
- Accented characters
- Timeout
- Arrays
- Duck Typing
- Sets
- Ranges
- Hashes
- Code blocks
- Type conversions
- Base conversions
- Exception handling
- Raising exceptions
- Discovering the previous exception
- Creating our own exceptions
- Comparing exceptions
- Using catch and throw
- Integers
- Control structures
- Conditionals
- if
- unless
- case
- Pattern matching
- Loops
- Magic comments
- while
- for
- until
- Operators
- Arithmetic operators
- Assignment operators
- Unary operators
- Logical operators
- Splat
- Bitwise operators
- Conditionals
- Procs and lambdas
- Iterators
- Selecting elements
- Selecting elements that do not meet a condition
- Processing and modifying elements
- Detecting a condition in all elements
- Detecting if any element meets a condition
- Detecting and returning the first element that meets a condition
- Detecting maximum and minimum values
- Accumulating elements
- Splitting the collection into two Arrays based on a condition
- Traversing elements with their indices
- Sorting a collection
- Combining elements
- Traversing values upward and downward
- Filtering with grep
- Chaining iterators
- Random numbers
- Methods
- Returning values
- Sending values
- Sending and processing blocks and Procs
- Values are passed by reference
- Intercepting exceptions directly in the method
- Destructive and predicate methods
- Sending options on the command line
- Classes and objects
- Open classes
- Aliases
- Inserting and removing methods
- Inheritance
- Shallow and deep copying
- Metaclasses
- Class variables
- Fluent interfaces
- DSLs
- Class instance variables
- Playing with dynamic methods and hooks
- Delegation
- Operator-like methods
- Closures
- Static typing support
- Generating the RBS file
- Checking the types
- Prism
- Modules
- Mixins
- Composition versus inheritance
- Where methods are inserted
- Modules extending themselves
- Implementing singletons
- Refinements
- Namespaces
- TracePoint
- Ruby::Box
- Mixins
- RubyGems
- Installing manually
- Commands
- Using the installed gem
- Using memoization with the gem
- Managing with a Gemfile
- Tail call optimization
- Threads
- Threads
- Sending Procs
- Mutexes
- Queues
- Canceling
- Intercepting signals
- Fibers
- Continuations
- Parallel processes
- Benchmarks
- Measuring time
- Seeing where time is spent
- Ractors
- Understanding the Actor Model
- Getting to know Ractor::Port
- Reusing Ports
- Isolation
- Waiting
- Copying and moving
- Creating pools
- Checking parallelism
- Sharing Procs and lambdas
- Error handling
- Recommendations
- Choosing between Threads, Fibers and Ractors
- Threads
- JIT
- MJIT
- RJIT
- Enabling YJIT
- ZJIT
- Input and output
- Files
- FileUtils
- Zip files
- CSV
- Creating
- Reading
- XML
- XSLT
- JSON
- YAML
- Network protocols
- TCP
- UDP
- SMTP
- POP3
- FTP
- HTTP
- HTTPS
- SSH
- Operating system processes
- Backticks
- System
- Exec
- IO.popen
- Open3
- XML-RPC
- Python
- PHP
- Java
- Files
- JRuby
- Using Java classes from inside Ruby
- Using Ruby classes inside Java
- Databases
- Installing the necessary gems
- Opening the connection
- Executing queries
- Queries that do not return data
- Updating a record
- Deleting a record
- Queries that return data
- Prepared statements
- Metadata
- ActiveRecord
- C extensions
- Using external libs
- Writing the C code of the lib
- Using the shared lib
- Using external libs
- Garbage collector
- Phase 1: Initial State
- Phase 2: Unreachable Object
- Phase 3: Mark Phase
- Phase 4: Sweep Phase
- Heap Structure
- Young Space
- Old Space
- Types of collection
- Minor GC
- Major GC
- Object promotion
- This is not a C book, but ...
- This is still not a C book, but ...
- A small detail: not every String uses malloc/free
- Testing
- Starting with the classic API
- Failing
- Pending
- Omitted
- Notifications
- Assertions
- Modernizing the tests
- Randomizing the tests
- Testing with specs
- Benchmarks
- Mocks
- Stubs
- Expectations
- Different output formats
- Debugging
- Continuous testing
- Running tests automatically
- Running only selected tests
- Building gems
- Creating the gem
- Testing the gem
- Building the gem
- Publishing the gem
- Publishing locally
- Publishing to the official repository
- Extracting a gem
- Signing a gem
- Creating a certificate
- Adapting the gem to use the certificate
- Building and publishing the signed gem
- Using the signed gem
- Always using signed gems
- Rake
- Defining a task
- Namespaces
- Dependent tasks
- Running tasks in other programs
- Different files
- Tasks with file names
- Tasks with file lists
- Rules
- Extending
- AI
- The RubyLLM gem
- Creating a chat
- Text chat
- Interpreting an image
- Interpreting a video
- Interpreting a document
- Interpreting code
- Interpreting audio
- Using static methods
- Creating images
- Creating a chat
- The RubyLLM gem
- Generating documentation
- Rdoc
- YARD
- Challenges
- Challenge 1
- Challenge 2
- Challenge 3
- Challenge 4
- Challenge 5
- Challenge 6
- Companies
Meet Ruby
The Ruby book that never gets old — updated with every major release, free forever for everyone who buys it. Written by the author of the first Ruby book ever published in Brazil, and believed to be the first book worldwide to cover RubyLLM. Now in English for the first time.
Minimum price
$29.00
$29.00
You pay
Author earns
About
About the Book
Meet Ruby — The book that grows with the language.
For over 20 years, this book has been the definitive Ruby reference for thousands of Brazilian developers. Written, maintained and updated since the early days of Ruby in Brazil — when almost nothing existed in Portuguese — it became the foundation for a generation of Ruby developers in the country.
Now, for the first time, it's available in English.
This isn't a snapshot. It's a living book.
Most technical books are written once and slowly become obsolete. Meet Ruby works differently. Every major Ruby release brings a new updated edition — and everyone who bought it receives the new version automatically, at no extra cost. No subscriptions. No upgrade fees. No hunting for the latest version. Buy once, stay current forever.
Beyond the annual updates, smaller revisions, corrections and new content are added throughout the year as the language evolves and the community grows.
What's inside
At more than 600 pages, Meet Ruby covers Ruby in depth — from the fundamentals to advanced topics that most books haven't touched yet:
- Believed to be the first book worldwide to cover RubyLLM, still adding more content!
- Among the first books covering Ractors, Ruby's modern concurrency model
This is a book written by someone who has been using, teaching and writing about Ruby for over two decades — not assembled from documentation.
A commitment you can count on
I've maintained this book in Portuguese for over 20 years without abandoning it. That track record isn't accidental — it reflects how seriously I take the responsibility of being someone's primary Ruby reference.
For the English edition, I'm formally committing to at least 5 years of active maintenance and updates, conditioned on my health and well-being. If circumstances ever change, you'll be informed transparently and promptly. No surprises.
About the author
I'm the author of the first Ruby book ever published in Brazil. I've been writing, teaching and working with Ruby since the early 2000s — through every major version, every shift in the ecosystem, and every wave of new tooling. Meet Ruby is the distillation of all of that experience.
Author
About the Author
I've been working with Ruby since the early 2000s — before it was fashionable, before Rails made it mainstream, and long before most of the ecosystem we know today existed.
Over the past 20+ years I've trained developers across dozens of companies, delivered talks in the Ruby community, contributed to open source projects, and built production systems across a wide range of industries. The kind of experience that doesn't come from reading documentation — it comes from being in the trenches when things break, when requirements change, and when the language itself evolves under your feet.
I'm also the author of the first Ruby book ever published in Brazil, which I've maintained and updated continuously since it launched — not as a side project, but as a professional commitment to the community that trusted me.
Translations
Translations
Languages
Contents
Table of Contents
Get the free sample chapters
Click the buttons to get the free sample in PDF or EPUB, or read the sample online here
Other books by this author
Other books by this author
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.