可以在OS X Mavericks上安装Ruby 1.9.3-p327吗?如果是这样,怎么样?

时间:2014-05-23 20:25:16

标签: ruby macos rvm

我正在设置Mac OS X Mavericks 10.9.3系统进行开发。

由于OTHER机器上的一些遗留代码和环境,我需要使用Ruby 1.9.3-p327。

然而,它并没有建立。

我安装了Xcode 5.1.1(5B1008)并安装了命令行工具。

我有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

我得到的错误低于。

有没有人知道这方面的解决方法?

$ 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.

我发现ruby-1.9.3-p547确实安装没有错误,但我需要另一个版本。

1 个答案:

答案 0 :(得分:1)

如果不需要使用rvm来安装此版本的ruby,则可以使用rbenv。我刚刚安装了这个版本没有任何问题。使用brew安装它很容易。

如果它不起作用,那么问题就在另一个地方。