ruby-build: definition not found: 2.2.1

I want to install new version of ruby by rbenv install 2.2.1, but I get the error

ruby-build: definition not found: 2.2.1
 The following versions contain 2.2.1 in the name:

Could you please let me know how should I install version 2.2.1?

Thanks in advance!

You should upgrade ruby-build to the latest version, ruby-build is an rbenv plugin that provides an rbenv install command to compile and install different versions of Ruby on UNIX-like systems.

Using Homebrew package manager:

brew upgrade ruby-build --HEAD

If ruby-build-HEAD already installed try reinstalling it

brew reinstall ruby-build --HEAD

You can look for the current stable ruby version number at:

Then use rbenv to see the upgraded list of available options:

rbenv install --list

Install latest stable version as below (replace 2.2.2 with your version string):

rbenv install 2.2.2
rbenv rehash

To list and verify all installed versions:

rbenv versions

To set as the global ruby version (in this case 2.2.2):

rbenv global 2.2.2

Hope this helps you and everyone else who faces similar situation in future.

ruby-build: definition not found -> Missing How To Hint � Issue #254 , there shout be a hint in the commandline and the README how to update the definitions. i got this error: muescha$ rbenv install 1.9.3-p327� ruby-build --version returns ruby-build 20150928 for me. This would only work if you installed it manually. If you're using homebrew then you should be able to run brew upgrade ruby-build individually.

Most of the answer here use brew command. So in case, you are on Ubuntu, then do these.

cd ~/.rbenv
git pull

cd ~/.rbenv/plugins/ruby-build/
git pull

ruby-build: definition not found: 2.7.1 � Issue #1430 � rbenv/ruby , Ruby 2.7.1 has been released, but I can not install it with rbenv. I am on macOS 10.15.3 with ZSH and Homebrew. ❯ brew upgrade rbenv� I´m following the workshop Installing a Ruby on Rails Development Environment in OS X and when I type: rbenv install 2.2.1 I get this message: ruby-build: definition not found: 2.2.1

Try to update your ruby-build manually from the repository by using this command:

/Users/your-user/.rbenv/plugins/ruby-build && git pull

Replace "your-user" with your Mac User

Once you've done that you can run the install:

rbenv install 2.2.1

ruby-build: definition not found: 2.6.1 � Issue #96 � asdf-vm , Hi I don't know why the asdf-ruby version of ruby-build has an old list of released rubies. My dedicated version of ruby-build has 2.6.1 already� Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

I upgraded homebrew

brew update && brew upgrade

and then was able to upgrade to 2.2.1

rbenv install '2.2.1'

Hope this helps!

rbenv/ruby-build: Compile and install Ruby, Contribute to rbenv/ruby-build development by creating an account on If you wish to develop and install a version of Ruby that is not yet supported by ruby- build, you Use the default build definitions as a template for your custom definitions. the package was not found on the mirror;; the mirror is down;; the download is� Is Ruby part of the "alternatives" mechanism on Ubuntu? If not, it might be worthwhile using something like rbenv to manage Ruby installs. Especially if you need to use different versions of Ruby at the same time. Soft-linking can get a little tiresome when doing Rails development, etc. – user459652 Oct 29 '15 at 14:33

rbenv - ruby-build: definition not found: 2.2.1 -, i want install new version of ruby rbenv install 2.2.1 , error ruby-build: definition not found: 2.2.1 following versions contain 2.2.1 in name: rbx-2.2.1 rbx-2.2.10. First build (rbx-2.5.2) result: failed, second build (rbx-2.5.2) with same command line: succeeded - ruby-build.20150315230638.4558.log

Not able to upgrade to Ruby 2.2.2 using rbenv, ruby-build: definition not found: 2.2.2 The following versions contain rbx-2.2.0 rbx-2.2.1 rbx-2.2.10 rbx-2.2.2 rbx-2.2.3 rbx-2.2.4 rbx-2.2.5� Try: gem pristine oj --version 3.9.2 Ignoring oj-3.9.1 because its extensions are not built. Try: gem pristine oj --version 3.9.1 Ignoring oj-3.7.12 because its extensions are not built. Try: gem pristine oj --version 3.7.12 Ignoring ox-2.11.0 because its extensions are not built.

Installing Ruby 2.5.0 - DEV, git pull upstream master # pulled from repo with new Ruby version set rbenv install 2.5.0 #=> ruby-build: definition not found: 2.5.0 # # The� is the Ruby community’s gem hosting service. Instantly publish your gems and then install them.Use the API to find out more about available gems. Become a contributor and improve the site yourself.

  • This answer might help you. Just try to update ruby-build plugin.
  • Nice, I had a similar problem and 'brew upgrade ruby-build --HEAD' did the job! Thanks.
  • brew upgrade ruby-build --HEAD gave me an error message about --HEAD, but trying without it worked.
  • cd ~/.rbenv/plugins/ruby-build git pull