0

I'm having trouble installing older version of ruby on my machine (osx mountain lion). I was wondering if anybody has ideas on how to resolve this compile issue:

$ rvm install 1.8.7

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.
Certificates in '/opt/twitter/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/mshahriarinia/.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/mshahriarinia/.rvm/src/ruby-1.8.7-p374....
ruby-1.8.7-p374 - #applying patch /Users/mshahriarinia/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch.
ruby-1.8.7-p374 - #applying patch /Users/mshahriarinia/.rvm/patches/ruby/1.8.7/no_sslv2.diff.
ruby-1.8.7-p374 - #applying patch /Users/mshahriarinia/.rvm/patches/ruby/GH-488.patch.
ruby-1.8.7-p374 - #applying patch /Users/mshahriarinia/.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 -j 1',
showing last 15 lines of /Users/mshahriarinia/.rvm/log/1489619955_ruby-1.8.7-p374/make.log
numeric.c: In function 'flo_is_finite_p':
numeric.c:1238:5: warning: 'finite' is deprecated (declared at /opt/twitter/Cellar/gcc@4.9/4.9.4/lib/gcc/4.9/gcc/x86_64-apple-darwin15.6.0/4.9.4/include-fixed/    math.h:772) [-Wdeprecated-declarations]
     if (!finite(value))
     ^
{standard input}:4857:suffix or operands invalid for `movq'
{standard input}:4860:suffix or operands invalid for `movq'
{standard input}:4869:suffix or operands invalid for `movq'
{standard input}:4885:suffix or operands invalid for `movq'
{standard input}:4889:suffix or operands invalid for `movq'
{standard input}:4896:suffix or operands invalid for `movq'
{standard input}:4898:suffix or operands invalid for `movq'
{standard input}:4900:suffix or operands invalid for `movq'
{standard input}:4914:suffix or operands invalid for `movq'
make: *** [numeric.o] Error 1
+++ return 2
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.
Morteza Shahriari Nia
  • 1,392
  • 18
  • 24
  • Ruby 1.8.7 is defunct, so you may have a lot of trouble getting it running on anything at this point. If you really need to use it, spinning up 10.7 in a VM might help. The last time I had to do this I had to use a really old Linux distribution in [Vagrant](http://vagrantup.com) and even those are annoying since you can't install packages for them any more, the repositories are cut off. One thing to try is using `rbenv` instead. – tadman Mar 16 '17 at 02:16
  • There is no strict dependency on this particular version, Any ruby <2 would work. Just picked this – Morteza Shahriari Nia Mar 18 '17 at 02:59
  • You'd have a lot more luck with 1.9.3 than 1.8.7. The newest possible version that fits your requirements. – tadman Mar 18 '17 at 05:39
  • 1.9.3 didn't work either: http://pastebin.com/qFLwefhN – Morteza Shahriari Nia Mar 21 '17 at 20:39
  • Didn't OS X 10.8 come with a system Ruby < 2.0? You may want to use that. According to [this post](http://apple.stackexchange.com/questions/107853/which-versions-of-mac-os-x-have-ruby-installed-by-default) you should have a system 10.8.7 already compiled. RVM is only necessary if you want to switch to something else. – tadman Mar 21 '17 at 20:44

1 Answers1

1

Looks like the issue is with XCODE. Check if you have outdated XCODE, by running:

softwareupdate --list

If XCODE is outdate please update by

softwareupdate --install <product name>

Otherwise if XCODE is missing install it by running:

xcode-select --install

source: https://github.com/rvm/rvm/issues/3577

harshs08
  • 700
  • 10
  • 29