Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Mac OSx 10.9.5上升级到Ruby 2.1.3_Ruby_Macos_Installation - Fatal编程技术网

在Mac OSx 10.9.5上升级到Ruby 2.1.3

在Mac OSx 10.9.5上升级到Ruby 2.1.3,ruby,macos,installation,Ruby,Macos,Installation,今天我在MacOSX10.9.5上从2.0.0升级到了Ruby2.1.3。结果比最初预期的要困难得多。由于我浪费了很多时间,我想我会分享我的经验和解决方案,以防其他人也遇到这个问题 我已经安装了xcode+开发工具。我本周也更新了xcode——不确定这是否是事情突然不起作用的原因。然而,事实如下: $ gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include

今天我在MacOSX10.9.5上从2.0.0升级到了Ruby2.1.3。结果比最初预期的要困难得多。由于我浪费了很多时间,我想我会分享我的经验和解决方案,以防其他人也遇到这个问题

我已经安装了xcode+开发工具。我本周也更新了xcode——不确定这是否是事情突然不起作用的原因。然而,事实如下:

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

$ rvm -v
rvm 1.25.32 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

$ brew -v
Homebrew 0.9.5

$ git version
git version 1.9.3 (Apple Git-50)
现在的问题是,如果我尝试检查ruby版本,我会得到以下结果:

$ rvm --default use ruby-2.1.3
Using /Users/georg/.rvm/gems/ruby-2.1.3
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
  Referenced from: /Users/georg/.rvm/rubies/ruby-2.1.3/bin/ruby
  Reason: image not found
事实上,一切都没有真正起作用——我尝试重新加载RVM、重新安装、重新安装和升级自制软件,等等

$ brew update && brew upgrade

$ rvm reload
重新安装的ruby

$ rvm install ruby-2.1.3
Already installed ruby-2.1.3.
To reinstall use:

    rvm reinstall ruby-2.1.3
还有许多其他的解决方案——然而,这一切都没有奏效

所以我检查了是否有/usr/local/lib/libcloog-isl.4.dylib

$ ls -la /usr/local/lib/libcloog-isl.4.dylib 

没有任何回报

因此解决问题的解决方案是运行以下程序:

$ brew rm cloog; brew install cloog 
塔塔。这一切突然奏效了

$ ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]

这是RVM安装的Ruby 2.1.3二进制版本的一个已知问题。RVM的维护者米哈尔·帕皮斯(Michal Papis)目前还没有把修复这个问题放在优先考虑的位置。正确的解决方案是在不使用二进制文件的情况下重新安装Ruby 2.1.3,如下所示:


rvm重新安装2.1.3--禁用二进制文件

查看这些RVM GitHub问题,查看Michal对此问题的评论:


谢谢,这对我来说也很有效。我也有同样的问题。然而,是什么让你想到了“cloog”?像
rvm
rbenv
这样的东西使整个过程更加容易。
$ ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]