RVM install 1.8.7 on Monterey 12.0.1 Fails

523 Views Asked by At

Has anyone gotten ruby 1.8.7 working on Monterey with RVM?

I've tried every solution reported out there and nothing seems to work for me. I know 1.8.7 is totally deprecated and unsupported but there are many out there still on this version.

RVM Version: rvm 1.29.12 (latest) Gem Version: 3.2.3

Last one I attempted was:

$ export warnflags=-Wno-error=implicit-function-declaration
$ rvm install ruby-1.8.7 --with-openssl-dir=$HOME/.rvm/usr

Warning! Requested ruby installation which requires another ruby available - installing ruby-1.8.7-p374 first.

ruby-1.8.7-p374 - #removing src/ruby-1.8.7-p374..
Checking requirements for osx.
Installing requirements for osx.
Updating system..........
Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, libksba, readline, zlib, openssl................
Certificates bundle '/usr/local/etc/openssl@3/cert.pem' is already up to date.
Requirements installation successful.
Warning: DYLD_LIBRARY_PATH environment variable is set, this might interact with the compilation and ruby.
Installing Ruby from source to: /Users/myuser/.rvm/rubies/ruby-1.8.7-p374, this may take a while depending on your cpu(s)...
ruby-1.8.7-p374 - #downloading ruby-1.8.7-p374, this may take a while depending on your connection...
ruby-1.8.7-p374 - #extracting ruby-1.8.7-p374 to /Users/myuser/.rvm/src/ruby-1.8.7-p374.....
ruby-1.8.7-p374 - #applying patch /Users/myuser/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch.
ruby-1.8.7-p374 - #applying patch /Users/myuser/.rvm/patches/ruby/1.8.7/no_sslv2.diff.
ruby-1.8.7-p374 - #applying patch /Users/myuser/.rvm/patches/ruby/GH-488.patch.
ruby-1.8.7-p374 - #applying patch /Users/myuser/.rvm/patches/ruby/ssl_no_ec2m.patch.
ruby-1.8.7-p374 - #configuring...............................
ruby-1.8.7-p374 - #post-configuration.
ruby-1.8.7-p374 - #compiling.................................
Error running '__rvm_make -j12',
please read /Users/myuser/.rvm/log/1638292263_ruby-1.8.7-p374/make.log

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

To proceed rvm requires a ruby-1.8.7-p374 compatible ruby is installed.
We attempted to install it automatically but it failed with status 2.
Please install it manually (or a compatible alternative) to proceed.

Link to make.log

1

There are 1 best solutions below

2
josht On

These are the steps that I used to install ruby-1.8.7 on a M1 Mac running Monterey:

  1. Start a Terminal window with Rosetta
  2. Download and compile OpenSSL 1.0.2u (assuming it's installed to /usr/local/ssl)
  3. Install HomeBrew and with it install gcc@6 (assuming you have not installed Home-brew previously in Arm64 architecture. If you have, then it needs to be uninstalled first)
  4. In the terminal run : rvm install 1.8.7 --with-openssl-dir=/usr/local/ssl --autolibs=disable --with-gcc=gcc-6