小牛的系统红宝石和宝石破碎 [英] Mavericks system Ruby and gem broken

查看:86
本文介绍了小牛的系统红宝石和宝石破碎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行ruby -vgem -v(或任何其他命令)时,我得到:

When I tried to run ruby -v or gem -v (or any other command), I get:

dyld: lazy symbol binding failed: Symbol not found: _ruby_run
  Referenced from: /usr/local/bin/ruby
  Expected in: /usr/lib/libruby.dylib

dyld: Symbol not found: _ruby_run
  Referenced from: /usr/local/bin/ruby
  Expected in: /usr/lib/libruby.dylib

这是在我运行rvm system以暂时切换到系统默认Ruby之后的. RVM工作正常,但是我特别需要在系统Ruby上安装gem,因此不能这样做.

This is after I ran rvm system to temporally switch to the system default Ruby. RVM is working fine, but I have a special need to install a gem to the system Ruby and I can't because of this problem.

有人知道为什么吗?似乎是到Ruby的某种链接问题,但我不知道该如何解决.

Does anyone know why? It seems to be some kind of link problem to Ruby, but I'm don't know how to solve this.

我运行了which ruby,它现在位于"/usr/local/bin/ruby​​"中.

I ran which ruby and it's at this point located in "/usr/local/bin/ruby".

我在"/usr/lib/"中检查了Ruby,它指向我的系统Ruby:"../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby​​"

I checked the Ruby in "/usr/lib/" and it's pointing to my system Ruby: "../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby"

任何帮助将不胜感激.

推荐答案

这对我有用.我将libruby的符号链接更改回lib ruby​​.1.8.6.dylib

This worked for me. I changed the symbolic link for libruby back to lib ruby.1.8.6.dylib

$ sudo cp -p /usr/local/lib/libruby.1.8.6.dylib /usr/lib
$ cd /usr/lib
$ sudo rm libruby.dylib
$ sudo ln -s libruby.1.8.6.dylib libruby.dylib

如果您需要返回到Ruby 2.0

If you need to go back to Ruby 2.0

$ sudo rm libruby.dylib
$ sudo ln -s libruby.2.0.0.dylib libruby.dylib

这篇关于小牛的系统红宝石和宝石破碎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆