CINXE.COM
TryRuby: Learn programming with Ruby
<!doctype html> <html lang="en"> <head><script type="text/javascript" src="/_static/js/bundle-playback.js?v=HxkREWBo" charset="utf-8"></script> <script type="text/javascript" src="/_static/js/wombat.js?v=txqj7nKC" charset="utf-8"></script> <script>window.RufflePlayer=window.RufflePlayer||{};window.RufflePlayer.config={"autoplay":"on","unmuteOverlay":"hidden"};</script> <script type="text/javascript" src="/_static/js/ruffle/ruffle.js"></script> <script type="text/javascript"> __wm.init("https://web.archive.org/web"); __wm.wombat("https://try.ruby-lang.org/","20240730060431","https://web.archive.org/","web","/_static/", "1722319471"); </script> <link rel="stylesheet" type="text/css" href="/_static/css/banner-styles.css?v=S1zqJCYt" /> <link rel="stylesheet" type="text/css" href="/_static/css/iconochive.css?v=3PDvdIFv" /> <!-- End Wayback Rewrite JS Include --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/> <title>TryRuby: Learn programming with Ruby</title> <meta name="description" content="Learn to program in Ruby in 30 minutes"/> <link rel="preconnect" href="https://web.archive.org/web/20240730060431/https://fonts.googleapis.com/"/> <link rel="preconnect" href="https://web.archive.org/web/20240730060431/https://fonts.gstatic.com/" crossorigin/> <link rel="stylesheet" href="https://web.archive.org/web/20240730060431cs_/https://fonts.googleapis.com/css2?family=Reenie+Beanie&family=Source+Code+Pro&display=swap"/> <link rel="stylesheet" href="https://web.archive.org/web/20240730060431cs_/https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="" crossorigin="anonymous"/> <link href="/web/20240730060431cs_/https://try.ruby-lang.org/stylesheets/vendor/codemirror.css" rel="stylesheet"/> <link href="/web/20240730060431cs_/https://try.ruby-lang.org/stylesheets/vendor/codemirror-solarized.css" rel="stylesheet"/> <link href="/web/20240730060431cs_/https://try.ruby-lang.org/stylesheets/vendor/pygment_solarized_light.css" rel="stylesheet"/> <link href="/web/20240730060431cs_/https://try.ruby-lang.org/stylesheets/application.css" rel="stylesheet"/> <script src="https://web.archive.org/web/20240730060431js_/https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js" integrity="" crossorigin="anonymous"></script> <script src="https://web.archive.org/web/20240730060431js_/https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js" integrity="" crossorigin="anonymous"></script> <script src="/web/20240730060431js_/https://try.ruby-lang.org/javascripts/vendor/codemirror-compressed-4.8.js"></script> <script src="/web/20240730060431js_/https://try.ruby-lang.org/javascripts/application.js"></script> </head> <body class="tryruby-page"> <nav class="tryruby-navbar navbar navbar-expand-lg navbar-light"> <div class="container justify-content-between"> <a class="tryruby-brand navbar-brand" href="/web/20240730060431/https://try.ruby-lang.org/"> Try Ruby </a> <button class="navbar-toggler tryruby-navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-links" aria-controls="navbar-links" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="tryruby-navbar-links collapse navbar-collapse" id="navbar-links"> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link" href="/web/20240730060431/https://try.ruby-lang.org/playground"> Playground </a> </li> <li class="nav-item"> <a class="nav-link" href="/web/20240730060431/https://try.ruby-lang.org/articles"> Articles </a> </li> <li class="nav-item"> <a class="nav-link" href="/web/20240730060431/https://try.ruby-lang.org/about"> About </a> </li> <li class="nav-item dropdown"> <button class="nav-link btn dropdown-toggle language-menu-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" title="Toggle language menu" aria-label="Toggle language menu" id="language-menu-toggle"> <svg width="20" height="20" viewbox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"> <title>Language</title> <path d="M478.33 433.6l-90-218a22 22 0 00-40.67 0l-90 218a22 22 0 1040.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 00458 464a22 22 0 0020.32-30.4zM334.83 362L368 281.65 401.17 362zM267.84 342.92a22 22 0 00-4.89-30.7c-.2-.15-15-11.13-36.49-34.73 39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 000-44H214V70a22 22 0 00-44 0v20H54a22 22 0 000 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 00-40.58 17c.58 1.38 14.55 34.23 52.86 83.93.92 1.19 1.83 2.35 2.74 3.51-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1021.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59 22.52 24.08 38 35.44 38.93 36.1a22 22 0 0030.75-4.9z"/> </svg> </button> <div class="dropdown-menu dropdown-menu-end" aria-labelledby="language-menu-toggle"> <button class="dropdown-item" data-change-lang="en" aria-controls="tryruby-content"> English </button> <button class="dropdown-item" data-change-lang="nl" aria-controls="tryruby-content"> Nederlands </button> <button class="dropdown-item" data-change-lang="es" aria-controls="tryruby-content"> Español </button> <button class="dropdown-item" data-change-lang="pt-br" aria-controls="tryruby-content"> Português do Brasil </button> <button class="dropdown-item" data-change-lang="ja" aria-controls="tryruby-content"> 日本語 </button> <button class="dropdown-item" data-change-lang="ru" aria-controls="tryruby-content"> Русский </button> <button class="dropdown-item" data-change-lang="ua" aria-controls="tryruby-content"> Українська </button> <button class="dropdown-item" data-change-lang="mk" aria-controls="tryruby-content"> Македонски </button> <button class="dropdown-item" data-change-lang="zh" aria-controls="tryruby-content"> 中文 </button> <button class="dropdown-item" data-change-lang="de" aria-controls="tryruby-content"> Deutsch </button> <button class="dropdown-item" data-change-lang="tr" aria-controls="tryruby-content"> Türkçe </button> <button class="dropdown-item" data-change-lang="fr" aria-controls="tryruby-content"> Français </button> </div> </li> </ul> </div> </div> </nav> <div class="container mt-4"> <div class="row"> <div class="col-md-5"> <h1 id="tryruby-title"> Got 30 minutes? Give Ruby a shot right now! </h1> <div id="tryruby-content"> <p>Ruby is a programming language from Japan which is revolutionizing software development.</p> <p>The beauty of Ruby is found in its balance between simplicity and power.</p> <p>You can type some Ruby code in the editor and use these buttons to navigate:</p> <ul> <li><strong>Run</strong> → Executes the code in the editor</li> <li><strong>Copy</strong> → Copies the example code to the editor</li> <li><strong>Next</strong> → Allows you to go to the next lesson</li> <li><strong>Back</strong> → Allows you to return to the previous lesson</li> </ul> <div class="foxes">Click on <strong>Next</strong> to start learning.</div> </div> </div> <div class="col-md-7"> <h2 class="code-title">Editor</h2> <div id="editor" class="tryruby-code tryruby-code--editor"></div> <div class="tryruby-buttons"> <button id="btn_copy" type="button" class="btn btn-secondary" aria-controls="editor"> Copy </button> <button id="btn_run" type="button" class="btn btn-primary w-25" aria-controls="output"> Run </button> </div> <h2 class="code-title">Output</h2> <div id="output" class="tryruby-code tryruby-code--output"></div> <div class="tryruby-buttons my-5"> <button type="button" id="btn_back" class="btn btn-secondary pull-left" aria-controls="tryruby-content"> Back </button> <select id="tryruby-index" class="form-select mx-3" aria-controls="tryruby-content"></select> <button id="btn_next" type="button" class="btn btn-primary pull-right" aria-controls="tryruby-content"> Next </button> </div> </div> </div> </div> </body> </html> <!-- FILE ARCHIVED ON 06:04:31 Jul 30, 2024 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 21:39:02 Nov 30, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). --> <!-- playback timings (ms): captures_list: 0.557 exclusion.robots: 0.029 exclusion.robots.policy: 0.017 esindex: 0.01 cdx.remote: 50.531 LoadShardBlock: 195.409 (3) PetaboxLoader3.datanode: 400.727 (4) PetaboxLoader3.resolve: 147.884 (2) load_resource: 433.002 -->