Install Ruby and Rails in Ruby

From the Ruby on Rails cheat sheet ยท Setup ยท verified Jul 2026

Install Ruby and Rails

Install Ruby with Mise, add Rails, and generate a new application.

bash
# Install Mise, activate it, then install Ruby 3
curl https://mise.run | sh
eval "$(~/.local/bin/mise activate bash)"
mise use -g ruby@3

# Install and verify Rails
gem install rails
ruby --version
rails --version
๐Ÿ“Œ Rails 8.1 requires Ruby 3.2 or newer
๐Ÿ’ก A version manager keeps the system Ruby untouched
๐Ÿ” Use bin/rails inside an app to run its locked Rails version
๐ŸŽฏ Visit localhost port 3000 after the server starts
installrubymiserails-new

Continue with Ruby on Rails

Save the full cheat sheet or work through every related task.

Back to the full Ruby on Rails cheat sheet