DEV Community

Cover image for Upgrade to Ruby 3 - intro 💎
Michael Currin
Michael Currin

Posted on

Upgrade to Ruby 3 - intro 💎

I regularly build websites using Jekyll, which is built on Ruby. So I need to have control over my Ruby environment and gems.

I recently upgraded to Ruby 3. And now I want to share steps for others, using macOS or Linux.

This series covers

  1. Deleting the old gems and old Ruby.
  2. Setting up a new Ruby and updating the path.
  3. Fixing up gems for projects.

What is Ruby?

If you've never heard of Ruby, this post is not for you. But check out the Ruby homepage to learn more about the language.

Why upgrade to Ruby 3? 🤔

According to the first post below, there are some improvements around performance, concurrency and type checking. Plus changes in syntax and gem updates, as covered in the Other notable changes since 2.7 section.

See also this blog post as a friendlier summary of changes.

Since Ruby 3 has been out about 6 months and has a patch release out, I feel comfortable using it. I would avoid using a major release too soon after it comes out.

Linux warning ⚠️

For Linux users - before your uninstall Ruby in the post, save yourself some trouble and make sure that Ruby 3 is actually available for your distribution. Using your system's package manager UI to browser can help here.

If you're stuck, then you can install a Ruby environment manager and use that to install Ruby 3.

See also this post which covers using rbenv or rvm to install Ruby 3 on Ubuntu.

Top comments (0)