Install any Ruby version in minutes - Ruby Newbie

2 min read Original article ↗

When you're getting started with Ruby, setting up ruby in your development environment is one of the most important tasks.

As you start creating or modifying projects, managing different versions and configuring dependencies can become a challenging task.

Fortunately, you can use mise-en-place to get started in minutes instead of hours. The tool provides a consistent way to setup and interact with your projects no matter what language they're written in.

mise supports hundreds of dev tools, including ruby. Below is a 3 step process to get you up and running in less than 15 minutes:

1. Install mise

curl https://mise.run | sh

After the script finishes, you'll get a message like this:

mise: installed successfully to $HOME/.local/bin/mise
mise: run the following to activate mise in your shell:
echo "eval \"\$($HOME/.local/bin/mise activate zsh)\"" >> "$HOME/.zshrc"

mise: run `mise doctor` to verify this is setup correctly

2. Activate

Copy and run the script in your shell to activate mise in ZSH:

echo "eval \"\$($HOME/.local/bin/mise activate zsh)\"" >> "$HOME/.zshrc"

3. Use

Navigate to your project directory:

cd your-project

Run the following command to install the version of ruby that your project requires. For example:

mise use ruby@3.4.5

After completion, you'll see the following output:

mise ruby@3.4.5 ✓ installed                                                                                                                                                         mise ~/your-project/mise.toml tools: ruby@3.4.5

You're now ready to start using any version of ruby in your projects!

If you want to learn more about it or use more advanced features, I recommend getting familiar with the tool by watching the 3 min demo and explore the Getting Started and Walkthrough sections in the documentation.

If you run into any problem or have questions about the process, you can leave a comment below.

Get your free guide today: Getting Started with Ruby

New content is posted frequently with guides, recommendations and updates from the community. Drop your email in the box below and we'll send new stuff straight to your inbox!