37 lines
1.5 KiB
Markdown
37 lines
1.5 KiB
Markdown
---
|
|
title: "Ruby and Rails"
|
|
category: "Languages and runtimes"
|
|
tagline: "The Ruby language and the Rails web framework, installed with mise and kept up to date."
|
|
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
|
|
|
|
CoreDesktop installs Ruby with [mise](/software/mise/) rather than pacman: it installs the latest Ruby and makes it your default (`mise use -g ruby@latest`), then installs the Bundler and Rails gems. Each `update` updates mise, moves you to the newest Ruby, and runs `gem update` to update your gems, Rails included.
|
|
|
|
Start a new app with:
|
|
|
|
```
|
|
rails new myapp
|
|
```
|