When I tried to pull out a Rails product that I used to put on Github and run it,
version `x.x.x' is not installed
It seems that the version of ruby is different. ..
#Check the list
rbenv install --list
#install
rbenv install x.x.x
#Set the version to use by default
rbenv global x.x.x
##Installed Rubyx.x.Make x available
rbenv rehash
Now you can develop with your favorite version of ruby!
If you also need Rails, add this as well
sudo gem install rails
I omitted it because it seems to be long, but I got an error like this. No matter how much you install (sudo gem install rails), it will come out infinitely, It seems to be a famous error. Since it interferes with ruby which is included in Mac by default,
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
After installing rbenv and ruby-build with the following command It can be solved by setting this article.
brew install rbenv ruby-build
I'm glad if you can use it as a reference.
Recommended Posts