0

Am trying to install Ruby on MacBook M1 but it failed every time, Command used: rvm install ruby 2.7.2 (none of the version worked)

Error running '__rvm_make install',
please read /Users/myName/.rvm/log/1641910054_ruby-2.7.2/install.log

There has been an error while running make install. Halting the installation.

And after checking logs, I found

*** Following extensions are not compiled:
gdbm:
Could not be configured. It will not be installed.
Check ext/gdbm/mkmf.log for more details.
openssl:
    Could not be configured. It will not be installed.
    Check ext/openssl/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.

I have also tried other version managers like asdf but no luck.

Background: HomeBrew installed successfully, paths also set, rvm also installed. Command line tools for Xcode also installed, using latest version of Xcode 13.2.1 and latest macOS Monterey 12.1.

  • Maybe this https://stackoverflow.com/questions/69012676/install-older-ruby-versions-on-a-m1-macbook helps? – Andre Wildberg Jan 11 '22 at 19:15
  • I tried to install Ruby through asdf but it didn't work, may be due to some conflicts with paths. So I had to switch back to Big Sur and rvm worked fine, check below comment for further clarification – Khawar Shahzad Jan 12 '22 at 20:07

1 Answers1

0

I think maybe rvm just doesnt work properly on m1 yet? Try just using brew install ruby for now. It should work the same.

Matthias Lee
  • 89
  • 2
  • 7
  • Well after spending 3,4 days on this, I came to know that rvm works fine on M1 but rbenv doesn't. So I tried to install Ruby on new machine with rvm and copied ruby particular version folder to rbenv directory (because my project was using rbenv to install ruby). – Khawar Shahzad Jan 12 '22 at 20:04
  • 1
    I had to switch back to Big Sur OS to try out things from scratch, and fortunately rvm worked fine this time. – Khawar Shahzad Jan 12 '22 at 20:05