OSX 10.10 Yosemite comes with ruby 2.0 bundled and Homebrew is designed to work with ruby 1.8.x.
I opened file vim /usr/local/Library/brew.rb , changed first line to #!/Users/alex/.rvm/rubies/ruby-1.9.3-p448/bin/ruby -W0 (I didn’t have ruby 1.8 installed within rvm)
After that we need to do brew update, but this will not work because we need to commit our changes:
cd $(brew –repository) && git commit -a -m ‘new ruby version 1.9’
After that you can do brew update and fight with more interesting issues 🙂
Please read my UPDATES below.
UPDATE #1: after hours of playing around I reverted back to OSX Mavericks.
To do this you need to press CMD + Option + R during macbook boot and follow instructions.
Some necessary steps after you rolled back:
1. Install Java from here: Java for Mavericks
2. If you want to revert your changes in brew.rb you can do which -a ruby and replace path to ruby interpreter with any you have (if you don’t have ruby 1.8 you can rvm install 1.8)
3. After rolling back to Mavericks user stopped being a sudoer (not the wheel/admin group member). So you need to boot in the single user mode (CMD+S right after computer power on) and add user to a wheel group.
4. One sad thing when you get rolled back – Finder is not launching anymore.
Jason Sperske in the comments below found out the reason of this:
So HPFS+ has per file compression and in 10.10 they introduced a new version. When you install it it optimizes your file system by updating some key OS files to the new compression version. Unfortunately when you roll back it doesn’t recompress with the old version. This makes key files inaccessible in 10.9 and thus crashes Finder (as well as break some named pipes breaking MySQL). If you open Console.app you will see about 180 “can’t access compressed file..” Messages each time you try an open a finder window.
I checked my Console.app and saw those log messages:
6/5/14 3:09:36.000 PM kernel: decmpfs.c:250:_decmp_get_func: tried to access a compressed file of unregistered type 7 6/5/14 3:09:36.000 PM kernel: decmpfs.c:250:_decmp_get_func: tried to access a compressed file of unregistered type 7 6/5/14 3:09:36.969 PM Finder: -[TBrowserWindowController loadWindow]: failed to load window nib file '/System/Library/CoreServices/Finder.app/Contents/Resources/BrowserWindow.nib'.
I have not found a solution how to make Finder work fine so I made clean install of Mavericks to continue my work. If you still want to play with Yosemite you can consider installing it on Virtualbox (by Dave from Engadged), enjoy! 🙂
Thanks to Don Klime, he wrote a solution for non-working Finder below in comments:
I ran into the same issue with the Finder and was able to fix it by copying BrowserWindow.nib and IconView.nib from a working machine to my broken machine. The files are located here:
I copied them to a USB key from a working machine, then copied them to my desktop on the broken machine. I had to use the shell to copy them to the broken machine since Finder wasn’t working.
I then booted the broken machine into recovery mode, and copied the files from my desktop to /System/Library/CoreServices/Finder.app/Contents/Resources/
I have to use the ‘mv’ command to rename the broken files since they are in some strange state that doesn’t allow overwrite. Hope this helps.
andyedinborough found even easier out:
I was able to get Finder working by just deleting those two files then relaunching Finder.
Thanks guys, hope this short post will help save time to everyone