ruby,

Solution: Unknown ruby interpreter version (do not know how to handle): RUBY_VERSION

Nov 07, 2021 · 1 min read · Post a comment

As a part of the solutions to common issues in Ruby dev environment series, here’s the link to the previous ones:

Today’s solution will be related to Unknown ruby interpreter version (do not know how to handle): RUBY_VERSION.

Prerequisites

  • Ruby environment

Solution

Step 1. Find which ruby version you are using.

ruby -v

Output:

ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin21]

Step 2. On top of your project directory, open Gemfile and replace RUBY_VERSION with the current ruby version that you are running.

Example Gemfile before:

source "https://rubygems.org"
ruby RUBY_VERSION

Example Gemfile after:

source "https://rubygems.org"
ruby '3.0.0'

Step 3. Close and reopen your Terminal.

Conclusion

If you still see the warning message, try to reinstall Ruby. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.