0

macOS comes with pre-installed ruby and its current installed version on my mac is 2.6.3 and I want to update it to 2.7.0

I have tried multiple methods, but I'm not able to update it. Also, rvm isn't installing on my mac.

I have the following things already installed : 1. Xcode CTL 2. Homebrew 3. gcc 4. gnu

  • What I did is use `brew` to install `rbenv` and `rbenv` to install newer ruby. – matt Feb 20 '20 at 16:46
  • Apart from that I don't see why this isn't a duplicate, as the question has been asked and answered many times in many ways. https://stackoverflow.com/questions/60182199/upgrading-global-ruby-version-on-macos is an example. – matt Feb 20 '20 at 16:48
  • 1
    Does this answer your question? [Upgrading Global Ruby Version on macOS](https://stackoverflow.com/questions/60182199/upgrading-global-ruby-version-on-macos) – Oflocet Feb 20 '20 at 16:48

1 Answers1

3

First you need add gpg key.

gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

Then install rvm via CURL. If you don't have CURL, install it via Homebrew brew install curl

curl -sSL https://get.rvm.io | bash

then rvm list to get installed version of ruby.

then rvm list known to get the available version.

then rvm install 2.7.0 to install ruby 2.7.0.

then rvm --default use 2.7.0 to use it.

Danish Ali
  • 184
  • 1
  • 9