How can I install ruby ​​2.2.1 if I'm on 2.2.2?

How can I install ruby ​​2.2.1 if I am on 2.2.2 now ... I need to rewind the version because Ruby 2.2.2 seems to have some problems loading my projects into the terminal.

+3


source to share


3 answers


RVM is a version control system that does just that.

https://rvm.io/



After installation see the faqs

https://rvm.io/rvm/basics

+3


source


Option for Ruby version control rbenv . I prefer it to RVM because it's not that intrusive (it doesn't need to be loaded into your shell, it doesn't override shell commands, it doesn't manage the gemset, etc.).


In your case, to install an older version of Ruby, you can do the following after installing rbenv:

Check the available Ruby versions:

rbenv install -l

      

The above list should display a list of all available versions (option 2.2.1 should be available in your script). Then, once you have selected the version you want to install, the following command can be run like this:

rbenv install 2.2.1

      



Finally, To switch between ruby ​​versions, you can run:

rbenv local 2.2.1

      

Or set Ruby 2.2.1 to default globally:

rbenv global 2.2.1

      

More details such as installation instructions can be found in the README

Hope this was helpful to you!

+1


source


Another Ruby version control option is chruby .

0


source







All Articles