自制破碎? Ruby破碎?无法运行brew或重新安装

时间:2014-11-15 19:27:02

标签: ruby homebrew

我无法在brew中运行任何东西。我不知道发生了什么。我试图安装Jekyll,我开始收到此错误。

/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 23: /usr/local/Library/brew.rb: Undefined error: 0

另外,ruby版本:ruby 2.0.0p481(2014-05-08修订版45883)[universal.x86_64-darwin14]

这是我输入的内容:

~]$ brew install ruby                                (gh-pages✱)
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 23: /usr/local/Library/brew.rb: Undefined error: 0

1 个答案:

答案 0 :(得分:0)

尝试切换到rbenv以安装和管理您的ruby:

$ brew update
$ brew install rbenv ruby-build

之后您仍需要将eval "$(rbenv init -)"添加到您的个人资料中。你只需要这样做一次。

$ rbenv install 2.0.0p481 

https://github.com/sstephenson/rbenv#homebrew-on-mac-os-x