I need to change my ruby version to 2.6.5 to get a dev environment running for an existing app, however I get a strange error when I try to install it.
Macbook pro
M2
Ventura 13.1
ruby -v: 3.0.0
node -v: 16.12.0
I have RVM installed, when I enter in the terminal to switch ruby versions this is what happens:
rvm use 2.6.5
Required ruby-2.6.5 is not installed.
To install do: 'rvm install "ruby-2.6.5"'
Next I try to install 2.6.5
rvm install 2.6.5
ruby-2.6.5 - #removing src/ruby-2.6.5 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/13.1/arm64/ruby-2.6.5.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Updating certificates bundle '/opt/homebrew/etc/[email protected]/cert.pem'
Requirements installation successful.
Installing Ruby from source to: /Users/placeholder/.rvm/rubies/ruby-2.6.5, this may take a while depending on your cpu(s)...
ruby-2.6.5 - #downloading ruby-2.6.5, this may take a while depending on your connection...
ruby-2.6.5 - #extracting ruby-2.6.5 to /Users/placeholder/.rvm/src/ruby-2.6.5 - please wait
ruby-2.6.5 - #configuring - please wait
ruby-2.6.5 - #post-configuration - please wait
ruby-2.6.5 - #compiling - please wait
Error running '__rvm_make -j8',
please read /Users/placeholder/.rvm/log/1671569360_ruby-2.6.5/make.log
There has been an error while running make. Halting the installation.
The make.log file is just a massive code snippet of ruby trying to make the change.
Any ideas on how I can fix this?
CodePudding user response:
As per advice from anothermh, uninstalled rbenv and brew versions of Ruby
Uninstallation
brew uninstall ruby
for removing brew version
Use accepted answer on this SO article for removing rbenv
Install Ruby via RVM
Install RVM as per instructions || as per this
rvm install (ruby version)
rvm --default use (ruby version)
can use rvm list
to see available ruby versions.
CodePudding user response:
Using rvm:
Install the ruby version:
rvm install 2.6.5
Set and use default 2.6.5:
rvm use 2.6.5 --default