Skip to content

Instantly share code, notes, and snippets.

@sergio1990
Created July 31, 2014 09:52
Show Gist options
  • Save sergio1990/8ab81510875c5701431e to your computer and use it in GitHub Desktop.
Save sergio1990/8ab81510875c5701431e to your computer and use it in GitHub Desktop.
Fix brew after Mac OS 10.10 installing
//После установки Mac OS 10.10 похерился brew. Подробнее здесь https://github.com/Homebrew/homebrew/issues/29795
brew update
/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 26: /usr/local/Library/brew.rb: Undefined error: 0
//Все из-за того, что в Mac OS 10.10 по-умолчанию ruby 2.0.0 теперь стоит
//Но это можно легко исправить подредактировав /usr/local/Library/brew.rb
sudo vim /usr/local/Library/brew.rb
//и исправив интерпретатор на
//#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
//Единственный неприятный момент может возникнуть при обновлении brew
brew update
error: Your local changes to the following files would be overwritten by merge:
Library/brew.rb
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
//Поэтому я зашел в папку, где лежит brew и закоммитил свои изменения
cd /usr/local/Library
git commit -am 'Change interpreter'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment