获取最新 Ruby 版本
Get latest Ruby version
我目前 运行 在尝试使用 RVM 安装最新的 Ruby 版本时遇到了一些问题。我在使用 rvm install ruby-2.2.0
时收到以下错误
user$ rvm install ruby-2.2.0
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.10/x86_64/ruby-2.2.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
ERROR: '/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
Requirements installation failed with status: 1.
然后我 运行 brew doctor
得到以下错误
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
RVM 获得稳定命令并向我显示此警告,但我仍然没有获得稳定版本
* WARNING: You have '~/.profile' file, you might want to load it,
to do that add the following line to '/Users/user/.bash_profile':
source ~/.profile
我该如何解决这个问题?我已经避开它一段时间了,真的很想起来 运行ning。提前致谢
你需要做的:
cd /usr/local/Library
git pull origin master
这将升级您的自制软件,您可以再次使用 brew。
如果您遇到权限问题,请尝试:
sudo git pull origin master
对于 Yosemite 试试这个:
cd /System/Library/Frameworks/Ruby.framework/Versions
sudo ln -s Current 1.8
brew update
sudo rm 1.8
对于 OS X 10.8.3 试试这个:
sudo chown -R $USER:admin /usr/local
cd /usr/local
git reset --hard origin/master
brew update
Mac OS X 10.10 (Yosemite) 不再附带 Ruby 1.8(仅 2.0)
使用 git 更新 brew:
cd /usr/local/Library/
git branch --set-upstream-to=origin/master master
# on branch master
git pull
对于第二个问题,编辑/Users/user/.bash_profile
,然后添加下一句:
source ~/.profile
我目前 运行 在尝试使用 RVM 安装最新的 Ruby 版本时遇到了一些问题。我在使用 rvm install ruby-2.2.0
user$ rvm install ruby-2.2.0
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.10/x86_64/ruby-2.2.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
ERROR: '/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
Requirements installation failed with status: 1.
然后我 运行 brew doctor
得到以下错误
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
RVM 获得稳定命令并向我显示此警告,但我仍然没有获得稳定版本
* WARNING: You have '~/.profile' file, you might want to load it,
to do that add the following line to '/Users/user/.bash_profile':
source ~/.profile
我该如何解决这个问题?我已经避开它一段时间了,真的很想起来 运行ning。提前致谢
你需要做的:
cd /usr/local/Library
git pull origin master
这将升级您的自制软件,您可以再次使用 brew。
如果您遇到权限问题,请尝试:
sudo git pull origin master
对于 Yosemite 试试这个:
cd /System/Library/Frameworks/Ruby.framework/Versions
sudo ln -s Current 1.8
brew update
sudo rm 1.8
对于 OS X 10.8.3 试试这个:
sudo chown -R $USER:admin /usr/local
cd /usr/local
git reset --hard origin/master
brew update
Mac OS X 10.10 (Yosemite) 不再附带 Ruby 1.8(仅 2.0) 使用 git 更新 brew:
cd /usr/local/Library/
git branch --set-upstream-to=origin/master master
# on branch master
git pull
对于第二个问题,编辑/Users/user/.bash_profile
,然后添加下一句:
source ~/.profile