Skip to content

Instantly share code, notes, and snippets.

@esteedqueen
Last active October 29, 2024 02:55
Show Gist options
  • Save esteedqueen/b605cdf78b0060299322033b6a60afc3 to your computer and use it in GitHub Desktop.
Save esteedqueen/b605cdf78b0060299322033b6a60afc3 to your computer and use it in GitHub Desktop.
How to fix rbenv: version `x.x.x` is not installed

So, you just cloned an existing project's repo and you run bundle install but you got the error: rbenv: version x.x.x is not installed....

What the issue means? The project uses a specific ruby version that you do not have on your system.

Here's how to fix it:

  • Install the Ruby build for the specified version using:
rbenv install x.x.x
  • If the above command doesn't run successfully and you get ruby-build: definition not found: x.x.x, upgrade brew and ruby-build using:
brew update && brew upgrade ruby-build

And run the rbenv install x.x.x command again.

  • Now, you have a new Ruby version, so you have to reinstall the gems you need (e.g. bundler, rails, etc). To be able to run bundle install again, run gem install bundler, gem install rails, etc to install the gems (bundler and rails) version for the newly installed ruby build
@softmastx
Copy link

thanks

@shaarang-contlo
Copy link

Cannot thank you enough!

@sony-mathew
Copy link

This worked. 🎉

@DavenMauff
Copy link

Thank you! :)

@nachoalthabe
Copy link

Thanks!

@davybolivar
Copy link

Thank you!

@aMujeeb
Copy link

aMujeeb commented Oct 29, 2024

Thank You...!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment