How can I install ruby 2.2.1 if I'm currently on 2.2.2 ... I need to rewind back a version because ruby 2.2.2 seems to have having some issues loading my projects in the terminal.
3 Answers
RVM is a version management system that does exactly this.
Once you install see the faqs
-
But would that have to have been installed prior, I just installed ruby on this computer and the most recent version is 2.2.2 and I need 2.2.1? – nickaroo747 Jun 14 '15 at 01:13
-
no. It allows you to traverse backwards like you wish. I prefer it to Rbenv – Jun 14 '15 at 01:15
-
1basically you install RVM independently, then install the versions (as many as you wish!) of ruby you want, and then to switch to the version of ruby you say ```use ruby x.x.x``` – Jun 14 '15 at 01:16
-
did you follow the instructions on the site? – Jun 14 '15 at 01:34
-
yes... 'gpg' is not recognized as an internal or external command, operable program or batch file is what it replies back when I put the gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 in the command line – nickaroo747 Jun 14 '15 at 01:36
-
```\curl -sSL https://get.rvm.io | bash``` Try this command only and let me know what you see. – Jun 14 '15 at 01:45
-
which directory are you in? – Jun 14 '15 at 01:47
-
users, do I need to be in the directory of the project? – nickaroo747 Jun 14 '15 at 01:50
-
BASH 3.2.25 required (you have 3.1.23(6) release) – nickaroo747 Jun 14 '15 at 01:52
-
see the top answer here: http://stackoverflow.com/questions/10574969/how-do-i-install-bash-3-2-25-on-mac-os-x-10-5-8 – Jun 14 '15 at 01:59
An option for Ruby version management is rbenv. I prefer it to RVM because it's not as intrusive (it doesn't need to be loaded into your shell, it doesn't override shell commands, it doesn't manage gemsets, etc.).
In your case, to install an older Ruby version, you can do the following, once rbenv is installed:
Check for available Ruby versions:
rbenv install -l
The above should show a list of all versions available (in your scenario, 2.2.1 should be an available option). Then once you have picked out a version you wish to install, the following command can be run next:
rbenv install 2.2.1
Finally, To switch between ruby versions you can run:
rbenv local 2.2.1
Or to set Ruby 2.2.1 to be default globally:
rbenv global 2.2.1
More info, such as installation instructions, can be found in the README
Hope that was helpful to you!

- 4,196
- 2
- 22
- 33
-
But would that have to have been installed prior, I just installed ruby on this computer and the most recent version is 2.2.2 and I need 2.2.1? – nickaroo747 Jun 14 '15 at 01:13
-
You can actually install previous versions. Once you have it installed you can do something like `rbenv install 2.2.1`. – Zoran Jun 14 '15 at 01:15
-
I keep getting rbenv: command not found, I don't think I installed it correctly – nickaroo747 Jun 14 '15 at 01:29
-
Make sure you followed the installation instructions and also installed ruby-build with it. That's usually why that `command not found` error pops up. Hope that helps – Zoran Jun 14 '15 at 01:42