CINXE.COM
Documentation
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Documentation</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta itemprop="image" content="https://www.ruby-lang.org/images/header-ruby-logo@2x.png"> <meta name="description" content=""> <link rel="stylesheet" type="text/css" href="/stylesheets/normalize.css"> <link rel="stylesheet" type="text/css" href="/stylesheets/main.css"> <link rel="stylesheet" type="text/css" href="/stylesheets/pygments.css"> <link rel="stylesheet" type="text/css" href="/stylesheets/mobile.css"> <link rel="stylesheet" type="text/css" href="/stylesheets/print.css"> <link href='https://fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic,700italic&subset=latin,cyrillic,greek,vietnamese' rel='stylesheet' type='text/css'> <link rel="canonical" href="https://www.ruby-lang.org/en/documentation/"> <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"> <link href="/en/feeds/news.rss" rel="alternate" title="Recent News (RSS)" type="application/rss+xml"> <script type="text/javascript" src="/javascripts/jquery.min.js"></script> <script type="text/javascript" src="/javascripts/page.js"></script> </head> <body> <div id="header"> <div id="header_content" class="container"> <a href="/en/"> <h1>Ruby</h1> <h2>A Programmer's Best Friend</h2> </a> <div class="site-links"> <a href="/en/" class="home">Home</a> <a href="/en/downloads/">Downloads</a> <a href="/en/documentation/">Documentation</a> <a href="/en/libraries/">Libraries</a> <a href="/en/community/">Community</a> <a href="/en/news/">News</a> <a href="/en/security/">Security</a> <a href="/en/about/">About Ruby</a> <a href="#" class="menu selected">Menu</a> </div> <div id="search-box"> <form id="search-form" action="https://www.google.com/cse"> <table class="fieldset"> <tr> <td> <input class="field" type="text" name="q" size="31" style="background: white url(//www.google.com/coop/intl/en/images/google_custom_search_watermark.gif) left no-repeat" onfocus="this.style.background='white'" onblur="if (/^\s*$/.test(this.value)) this.style.background='white url(//www.google.com/coop/intl/en/images/google_custom_search_watermark.gif) left no-repeat'"/> </td> <td> <input type="hidden" name="cx" value="013598269713424429640:g5orptiw95w" /> <input type="hidden" name="ie" value="UTF-8" /> <input class="button" type="submit" name="sa" value="Search" /> </td> </tr> </table> </form> </div> </div> </div> <div id="page"> <div id="main-wrapper" class="container"> <div id="main"> <div id="content-wrapper"> <h1>Documentation</h1> <div id="content"> <p class="summary">Guides, tutorials, and reference material to help you learn more about Ruby</p> <h3>Installing Ruby</h3> <p>Although you can easily <a href="https://try.ruby-lang.org/">try Ruby in your browser</a>, you can also read the <a href="installation/">installation guide</a> for help on installing Ruby.</p> <h3>Ruby Language Documentation</h3> <p>The authoritative Ruby language documentation at <a href="https://docs.ruby-lang.org/en/">docs.ruby-lang.org</a> is the place to start if you want to understand Ruby. It covers all aspects of the language and should be the first place you look when learning or referencing Ruby programming language. Other resources listed below are complementary to the official language documentation or they present Ruby documentation in a different format/style/flavor.</p> <h3>Getting Started</h3> <dl> <dt><a href="/en/documentation/faq/">Official FAQ</a></dt> <dd>The official frequently asked questions.</dd> <dt><a href="https://rubykoans.com/">Ruby Koans</a></dt> <dd>The Koans walk you along the path to enlightenment in order to learn Ruby. The goal is to learn the Ruby language, syntax, structure, and some common functions and libraries. We also teach you culture.</dd> <dt><a href="https://poignant.guide">Why’s (Poignant) Guide to Ruby</a></dt> <dd>An unconventional but interesting book that will teach you Ruby through stories, wit, and comics. Originally created by <em>why the lucky stiff</em>, this guide remains a classic for Ruby learners.</dd> <dt><a href="http://www.techotopia.com/index.php/Ruby_Essentials">Ruby Essentials</a></dt> <dd>A free on-line book designed to provide a concise and easy to follow guide to learning Ruby.</dd> <dt><a href="http://pine.fm/LearnToProgram/">Learn to Program</a></dt> <dd>A wonderful little tutorial by Chris Pine for programming newbies. If you don’t know how to program, start here.</dd> <dt><a href="https://learncodethehardway.org/ruby/">Learn Ruby the Hard Way</a></dt> <dd>A very good set of exercises with explanations that guide you from the absolute basics of Ruby all the way to OOP and web development.</dd> </dl> <h3>Manuals</h3> <dl> <dt><a href="http://www.ruby-doc.org/docs/ProgrammingRuby/">Programming Ruby</a></dt> <dd>The seminal work on Ruby in English, this first edition of the <a href="https://pragprog.com/titles/ruby5/programming-ruby-3-3-5th-edition/">Pragmatic Programmers’ book</a> is available for free online.</dd> <dt><a href="http://en.wikibooks.org/wiki/Ruby_programming_language">The Ruby Programming Wikibook</a></dt> <dd>A free online manual with beginner and intermediate content plus a thorough language reference.</dd> </dl> <h3>Reference Documentation</h3> <dl> <dt><a href="https://docs.ruby-lang.org/en/">Official API Documentation</a></dt> <dd>The official Ruby language documentation for different versions including the currently unreleased (trunk) version.</dd> <dt><a href="https://docs.ruby-lang.org/en/master/extension_rdoc.html">Ruby C API Reference</a></dt> <dd>The official introduction to Ruby’s C API. Great if you want to write C extensions or contribute to Ruby’s development.</dd> <dt><a href="http://www.rubydoc.info/">RubyDoc.info</a></dt> <dd>The one-stop web site for reference documentation about Ruby gems and GitHub-hosted Ruby projects.</dd> <dt><a href="https://rubyapi.org/">RubyAPI.org</a></dt> <dd>Easily find and browse Ruby classes, modules, and methods.</dd> </dl> <h3>Editors and IDEs</h3> <p>For coding in Ruby, you can use the default editor of your operating system. By the way, to be more effective in coding, it is worth choosing a source code editor with basic Ruby support (e.g. syntax-highlighting, file browsing) or an integrated development environment with advanced features (e.g. code completion, refactoring, testing support).</p> <p>Here is a list of popular tools used by Rubyists:</p> <ul> <li>Linux and cross-platform tools: <ul> <li><a href="http://www.aptana.com/">Aptana Studio</a></li> <li><a href="https://atom.io/">Atom</a></li> <li><a href="http://www.gnu.org/software/emacs/">Emacs</a> with <a href="http://www.emacswiki.org/emacs/RubyMode">Ruby mode</a> and <a href="http://rsense.github.io/">Rsense</a></li> <li><a href="https://eric-ide.python-projects.org/">Eric</a></li> <li><a href="http://www.geany.org/">Geany</a></li> <li><a href="http://projects.gnome.org/gedit/screenshots.html">gedit</a></li> <li><a href="https://kate-editor.org/">Kate</a></li> <li><a href="https://www.kdevelop.org/">KDevelop</a></li> <li><a href="https://netbeans.org/">NetBeans</a></li> <li><a href="http://www.jetbrains.com/ruby/">RubyMine</a></li> <li><a href="http://www.scintilla.org/SciTE.html">SciTe</a></li> <li><a href="http://www.sublimetext.com/">Sublime Text</a></li> <li><a href="http://www.vim.org/">Vim</a> with <a href="https://github.com/vim-ruby/vim-ruby">vim-ruby</a> plugin and <a href="http://rsense.github.io/">Rsense</a></li> <li><a href="https://code.visualstudio.com/docs/languages/ruby">Visual Studio Code</a></li> </ul> </li> <li>On Windows: <ul> <li><a href="http://notepad-plus-plus.org/">Notepad++</a></li> </ul> </li> <li>On macOS: <ul> <li><a href="http://macromates.com/">TextMate</a></li> <li><a href="https://www.barebones.com/products/bbedit/">BBEdit</a></li> <li><a href="http://kapeli.com/dash">Dash</a> (documentation browser)</li> </ul> </li> </ul> <h3>Further Reading</h3> <p><a href="http://ruby-doc.org">Ruby-doc.org</a> maintains a comprehensive list of English documentation sources. If you have questions about Ruby the <a href="/en/community/mailing-lists/">mailing list</a> is a great place to start.</p> </div> </div> <hr class="hidden-modern" /> <div id="sidebar-wrapper"> <div id="sidebar"> <div class="navigation"> <h3><strong>Get Started</strong>, it's easy!</h3> <ul class="menu"> <li><a href="https://try.ruby-lang.org/">Try Ruby! (in your browser)</a></li> <li><a href="/en/documentation/quickstart/">Ruby in Twenty Minutes</a></li> <li><a href="/en/documentation/ruby-from-other-languages/">Ruby from Other Languages</a></li> </ul> </div> <div class="navigation"> <h3><strong>Explore</strong> a new world…</h3> <ul class="menu"> <li><a href="/en/documentation/">Documentation</a></li> <li><a href="https://rubybib.org/">Academic Research</a></li> <li><a href="/en/libraries/">Libraries</a></li> <li><a href="/en/documentation/success-stories/">Success Stories</a></li> </ul> </div> <div class="navigation"> <h3><strong>Participate</strong> in a friendly and growing community.</h3> <ul> <li><a href="/en/community/mailing-lists/">Mailing Lists</a>: Talk about Ruby with programmers from all around the world.</li> <li><a href="/en/community/user-groups/">User Groups</a>: Get in contact with Rubyists in your area.</li> <li><a href="/en/community/weblogs/">Blogs and Newsletters</a>: Read about what’s happening right now in the Ruby community.</li> <li><a href="/en/community/ruby-core/">Ruby Core</a>: Help polish the rough edges of the latest Ruby.</li> <li><a href="https://bugs.ruby-lang.org/">Issue Tracking</a>: Report or help solve issues in Ruby.</li> </ul> </div> <h3>Syndicate</h3> <p><a href="/en/feeds/news.rss">Recent News (RSS)</a></p> </div> </div> <hr class="hidden-modern" /> </div> </div> </div> <div class="container"> <div id="footer"> <div class="site-links"> <a href="/en/" class="home">Home</a> <a href="/en/downloads/">Downloads</a> <a href="/en/documentation/">Documentation</a> <a href="/en/libraries/">Libraries</a> <a href="/en/community/">Community</a> <a href="/en/news/">News</a> <a href="/en/security/">Security</a> <a href="/en/about/">About Ruby</a> </div> <p> This site in other languages: <a href="/bg/">Български</a>, <a href="/de/">Deutsch</a>, <a href="/en/">English</a>, <a href="/es/">Español</a>, <a href="/fr/">Français</a>, <a href="/id/">Bahasa Indonesia</a>, <a href="/it/">Italiano</a>, <a href="/ja/">日本語</a>, <a href="/ko/">한국어</a>, <a href="/pl/">polski</a>, <a href="/pt/">Português</a>, <a href="/ru/">Русский</a>, <a href="/tr/">Türkçe</a>, <a href="/vi/">Tiếng Việt</a>, <a href="/zh_cn/">简体中文</a>, <a href="/zh_tw/">繁體中文</a>. </p> <p><a href="/en/about/website/">This website</a> is proudly maintained by members of the Ruby community.</p> </div> </div> </body> </html>