Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to install Ruby 1.9.3-p327 on OS X Mavericks? And if so, how?

Tags:

macos

ruby

rvm

I'm setting up a Mac OS X Mavericks 10.9.3 system for development.

Due to some legacy code and environments on OTHER machines, I need to use Ruby 1.9.3-p327.

However, it isn't building.

I have Xcode 5.1.1 (5B1008) installed and command line tools are installed.

I have gcc...

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.2.0
Thread model: posix

The error I'm getting is below.

Does anyone know of a workaround for this?

$ rvm install ruby-1.9.3-p327               
ruby-1.9.3-p327 - #removing src/ruby-1.9.3-p327 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3-p327.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/opt/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/username/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracting ruby-1.9.3-p327 to /Users/username/.rvm/src/ruby-1.9.3-p327 - please wait
ruby-1.9.3-p327 - #applying patch /Users/username/.rvm/patches/ruby/GH-488.patch - please wait
ruby-1.9.3-p327 - #configuring - please wait
ruby-1.9.3-p327 - #post-configuration - please wait
ruby-1.9.3-p327 - #compiling - please wait
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/username/.rvm/log/1400875609_ruby-1.9.3-p327/make.log
f_rational_new_no_reduce1(VALUE klass, VALUE x)
^
6 warnings generated.
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
    return t->num_entries;
    ~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1
+__rvm_make:0> return 2
There has been an error while running make. Halting the installation.

I'm finding that ruby-1.9.3-p547 does install without errors, but I need the other version.

like image 482
Ethan Avatar asked Dec 31 '25 06:12

Ethan


1 Answers

If it's not neccesary to use rvm to install this version of ruby, you can use rbenv. I just installed this exactly version without any problems. And it's easy to install it with brew.

If it won't work, then the problem in another place.

like image 131
zishe Avatar answered Jan 03 '26 11:01

zishe