在Mac OSx 10.9.5上升级到Ruby 2.1.3 [英] Upgrading to Ruby 2.1.3 on Mac OSx 10.9.5
问题描述
今天,我在Mac OSx 10.9.5上从2.0.0升级到了Ruby 2.1.3.事实证明,这比最初预期的要困难得多.而且由于浪费了很多时间,我想我可以分享自己的经验和解决方案,以防其他人也遇到问题.
Today I upgraded to Ruby 2.1.3 from 2.0.0 on Mac OSx 10.9.5. It turned out to be more difficult than initially expected. And since I wasted a hell lot of time I thought I share my experiences plus solution in case someone else hits the problem as well.
我安装了xcode +开发人员工具.我也在本周更新了xcode-不知道这是否是事情突然不起作用的原因.但是,以下是事实:
I have xcode + developer tools installed. I updated xcode this week as well - not sure if that was the reason why things suddenly didn't work. However, here are the facts:
$ 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并将其用作默认值:
Getting the latest version of Ruby and using it as default:
$ rvm install ruby
$ rvm --default use ruby-2.1.3
现在的问题是,如果我尝试检查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,重新安装,重新安装和升级自制软件等.
In fact nothing was really working - I tried to reload RVM, reinstall, re-install and upgrade homebrew, etc.
$ brew update && brew upgrade
$ rvm reload
重新安装红宝石
$ rvm install ruby-2.1.3
Already installed ruby-2.1.3.
To reinstall use:
rvm reinstall ruby-2.1.3
以及许多其他解决方案-但是,这一切都没有成功.
And many other solutions - however, it all did not do the trick.
所以我检查了是否有/usr/local/lib/libcloog-isl.4.dylib
So I checked if I have /usr/local/lib/libcloog-isl.4.dylib
$ ls -la /usr/local/lib/libcloog-isl.4.dylib
没有回馈任何东西...
Which didn't give anything back ...
推荐答案
因此解决该问题的解决方案是运行以下命令:
So the solution, which resolved the issue is to run the following:
$ brew rm cloog; brew install cloog
Ta-Ta.突然之间一切都奏效了!
Ta-Ta. It all worked all of the sudden!
$ ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]
这篇关于在Mac OSx 10.9.5上升级到Ruby 2.1.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!