--- title: "Ruby and Rails" category: "Languages and runtimes" tagline: "The Ruby language and the Rails web framework, installed with mise if you choose them." source: "mise" command: "rails" website: "https://rubyonrails.org/" code: "https://github.com/rails/rails" links: - name: "Ruby" url: "https://www.ruby-lang.org/" - name: "Rails Guides" url: "https://guides.rubyonrails.org/" --- ## What it is Ruby is a programming language designed to be pleasant to read and write. Rails, or Ruby on Rails, is a web framework built on it: it gives a new web app a database layer, routing, templates and tests from the start, and favors sensible conventions over configuration. GitHub, Shopify and Basecamp were built with it. Ruby libraries are called gems; Bundler installs the ones a project needs from its `Gemfile`. ## Why it's here - **Fast to build web apps.** `rails new` gives you a working app in minutes. - **Batteries included.** Database migrations, background jobs, mail and tests are part of the framework. - **Ruby itself.** A good language for scripts and automation, too. ## On CoreDesktop Ruby and Rails aren't installed for everyone. To add them, run `configure languages` and answer yes to Ruby on Rails. It installs the latest Ruby with [mise](/software/mise/) (`mise use -g ruby@latest`), then the Bundler and Rails gems. Each new version of Ruby gets Rails and Bundler automatically, and `update` moves you to the newest Ruby and updates Rails and Bundler, leaving your other gems as they are. Machines that had Ruby from an earlier CoreDesktop keep it, and `update` reinstalls Rails if an earlier move to a new Ruby lost it. If you don't use Ruby, remove it with `mise unuse -g ruby`. Start a new app with: ``` rails new myapp ```