Ruby is a general purpose, scripting, structured, flexible, fully object-oriented programming language with a focus on simplicity and productivity. Ruby is a very conservative language. It’s equipped with very carefully chosen features that have been fully tested.
Ruby possesses a high portability running a large number of platforms including Linux, Windows, Mac OS X, Cygwin, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, Tru64 UNIX, and HP-UX. The TIOBE Programming Community index currently ranks Ruby in 13th place.
Ruby’s popularity was enhanced by the Ruby on Rails framework, a full-stack web framework which has been used to create many popular applications including Basecamp, GitHub, Shopify, Airbnb, Twitch, SoundCloud, Hulu, Zendesk, Square, and Highrise.
I recommend 20 free books which will teach you the basics of Ruby. Many of the books are open source. All of them can be read without requiring payment although some of them are available to purchase in paperback or electronic versions. Never underestimate the benefits of buying a printed copy of a programming book, as well as compensating the author for his work.
1. Learn Ruby the Hard Way by Zed A. Shaw
The full title of the book Learn Ruby the Hard Way: A Simple and Idiomatic Introduction to the Imaginative World Of Computational Thinking with Code is a bit of a mouthful.
Don’t be misled by the title of the book. The book is designed for beginners to programming that are looking to learn Ruby. It shows you at a gentle pace how to build basic skills in Ruby programming. It’s a very good introductory text.
Now in its 3rd edition, Learn Ruby the Hard Way Learn Ruby the Hard Way is available to read for free. The video lectures are not included. You can also purchase paper versions of the book.
2. Book of Ruby – A Hands-on Guide for the Adventurous by Huw Collingbourne
The Book of Ruby describes the secret inner workings of Ruby, helping you learn 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.
The Book of Ruby takes a hands-on approach. It contains 425 pages in 20 chapters. It is provided in the form of a PDF.
The author of the book is a co-developer of the Ruby In Steel IDE.
3. Ruby Best Practices by Gregory T Brown
Ruby Best Practices aims to help Ruby developers from a wide range of skill levels improve their fundamental understanding of the language via exposure to the common practices and idioms that many seasoned Rubyists take for granted. With a strong emphasis on exploring real codebases, and an understanding that beautiful solutions depend heavily on context, this book lays out a clear road map to Ruby mastery for those who wish to pursue it.
Written by the developer of the Ruby project Prawn, this concise book explains how to design beautiful APIs and domain-specific languages with Ruby, as well as how to work with functional programming ideas and techniques that can simplify your code and make you more productive. You’ll learn how to write code that’s readable, expressive, and much more.
The book’s website has been down for years. But a PDF copy is available. Definitely one to download.
4. Ruby Hacking Guide by Aoki-san
Ruby Hacking Guide is a book intended for advanced programmers. The book explains how the Ruby 1.7.x-1.8.x interpreter (the official C implementation of the Ruby language) works internally.
This book was originally written in Japanese, and has been translated into English. Some chapters are previews.
5. I Love Ruby by A.K. Karthikeyan
I love Ruby: Get started with the greatest programming language made for humans is suitable for anyone interested in learning Ruby.
Its examples are designed for Ruby 2.5.
You can grab this book from https://i-love-ruby.gitlab.io/. And the complete book with source code is available from the author’s GitLab repository. There’s also paperback and Kindle version available to purchase.
Pages in this article:
Page 1 – My Strongest Recommendations
Page 2 – Programming Ruby – The Pragmatic Programmer’s Guide and more books
Page 3 – Learn to Program and more books
Page 4 – Developing Games With Ruby and more books
All books in this series:
|Free Programming Books|
|Java||General-purpose, concurrent, class-based, object-oriented, high-level language|
|C||General-purpose, procedural, portable, high-level language|
|Python||General-purpose, structured, powerful language|
|C++||General-purpose, portable, free-form, multi-paradigm language|
|C#||Combines the power and flexibility of C++ with the simplicity of Visual Basic|
|PHP||PHP has been at the helm of the web for many years|
|HTML||HyperText Markup Language|
|SQL||Access and manipulate data held in a relational database management system|
|Ruby||General purpose, scripting, structured, flexible, fully object-oriented language|
|Assembly||As close to writing machine code without writing in pure hexadecimal|
|Swift||Powerful and intuitive general-purpose programming language|
|Groovy||Powerful, optionally typed and dynamic language|
|Go||Compiled, statically typed programming language|
|Pascal||Imperative and procedural language designed in the late 1960s|
|Perl||High-level, general-purpose, interpreted, scripting, dynamic language|
|R||De facto standard among statisticians and data analysts|
|COBOL||Common Business-Oriented Language|
|Scala||Modern, object-functional, multi-paradigm, Java-based language|
|Fortran||The first high-level language, using the first compiler|
|Scratch||Visual programming language designed for 8-16 year-old children|
|Lua||Designed as an embeddable scripting language|
|Logo||Dialect of Lisp that features interactivity, modularity, extensibility|
|Rust||Ideal for systems, embedded, and other performance critical code|
|Lisp||Unique features - excellent to study programming constructs|
|Ada||ALGOL-like programming language, extended from Pascal and other languages|
|Haskell||Standardized, general-purpose, polymorphically, statically typed language|
|Scheme||A general-purpose, functional language descended from Lisp and Algol|
|Prolog||A general purpose, declarative, logic programming language|
|Forth||Imperative stack-based programming language|
|Clojure||Dialect of the Lisp programming language|
|Julia||High-level, high-performance language for technical computing|
|Awk||Versatile language designed for pattern scanning and processing language|
|BASIC||Beginner’s All-purpose Symbolic Instruction Code|
|Erlang||General-purpose, concurrent, declarative, functional language|
|VimL||Powerful scripting language of the Vim editor|
|OCaml||The main implementation of the Caml language|
|ECMAScript||Best known as the language embedded in web browsers|
|Bash||Shell and command language; popular both as a shell and a scripting language|
|LaTeX||Professional document preparation system and document markup language|
|TeX||Markup and programming language - create professional quality typeset text|
|Arduino||Inexpensive, flexible, open source microcontroller platform|
|Elixir||Relatively new functional language running on the Erlang virtual machine|
|F#||Uses functional, imperative, and object-oriented programming methods|
|Tcl||Dynamic language based on concepts of Lisp, C, and Unix shells|
|Factor||Dynamic stack-based programming language|
|Eiffel||Object-oriented language designed by Bertrand Meyer|
|Agda||Dependently typed functional language based on intuitionistic Type Theory|
|Icon||Wide variety of features for processing and presenting symbolic data|
|XML||Rules for defining semantic tags describing structure ad meaning|
|Vala||Object-oriented language, syntactically similar to C#|
|Standard ML||General-purpose functional language characterized as "Lisp with types"|
|D||General-purpose systems programming language with a C-like syntax|
|Dart||Client-optimized language for fast apps on multiple platforms|
|Markdown||Plain text formatting syntax designed to be easy-to-read and easy-to-write|
|Kotlin||More modern version of Java|
|Objective-C||Object-oriented language that adds Smalltalk-style messaging to C|
|VHDL||Hardware description language used in electronic design automation|
|J||Array programming language based primarily on APL|
|LabVIEW||Designed to enable domain experts to build power systems quickly|