Skip to content
This repository has been archived by the owner. It is now read-only.

Updated brew.rb for Yosemite (10.10) #29796

Closed
wants to merge 1 commit into from

Conversation

@delasteve
Copy link

commented Jun 2, 2014

/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 23: /usr/local/Library/brew.rb: Undefined error: 0

Mac OS X 10.10 (Yosemite) no longer ships with Ruby 1.8 (only 2.0). I have changed the brew.rb file to use the 'Current' directory found in the Ruby.Framework folder. Unless there is a specific reason to use 1.8, this should prevent the issue above when doing a OS upgrade.

@keith

This comment has been minimized.

Copy link
Contributor

commented Jun 2, 2014

You have to replace this line in more places than just that one. It's in at least 3 more files where I had to switch it as well. Also since homebrew doesn't support 2.0.0 I'm not sure how this will work. This is the brew doctor error for that:

Warning: Ruby version 2.0.0 is unsupported.
Homebrew is developed and tested on Ruby 1.8.x, and may not work correctly
on other Rubies. Patches are accepted as long as they don't break on 1.8.x.
@mistydemeo

This comment has been minimized.

Copy link
Member

commented Jun 2, 2014

@k3dt Your issue is unrelated. Please follow the instructions in the error and the troubleshooting guide, and open a new issue.

@keith

This comment has been minimized.

Copy link
Contributor

commented Jun 2, 2014

You can see the other files that include this in this issue: #29795

@delasteve

This comment has been minimized.

Copy link
Author

commented Jun 2, 2014

So the two routes this can take would be for Homebrew to use Current or to hardcode everything to 2.0. Given we go with the Current route...

The issue occurs when we get to the lines that look like this:

$:.unshift "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8"

We would have to tack on 2.0.0 to replace the 1.8 at the end to make it look like:

/$:.unshift "System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby/2.0.0"

Unless there is any other suggestions, I am at a loss at what to do to make this not occur in the future.

If we hardcode it to 2.0, this all becomes an easy fix as far as this is concerned. For Homebrew to support 2.0 is another issue.

@jacknagel

This comment has been minimized.

Copy link
Contributor

commented Jun 2, 2014

Please don't worry about solving this, myself and the other maintainers will address it.

@delasteve

This comment has been minimized.

Copy link
Author

commented Jun 2, 2014

Sounds good. Closing this.

@delasteve delasteve closed this Jun 2, 2014
@delasteve delasteve deleted the delasteve:update-ruby-version-yosemite branch Jun 2, 2014
@jakecast

This comment has been minimized.

Copy link

commented Jun 3, 2014

okay, i by no way advocating this method for working around ruby 2.0 in Yosemite, but if you really are trying to get it working, I managed to install a couple packages by doing this.

navigate to /usr/local/Library/ and open the hierarchy in the text editor of your choice.

then replace all the following in all the files.

#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -W0
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0

and

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8
/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby/2.0.0

again. super loose and sketchy, but it got stuff installing for me.

@aprescott

This comment has been minimized.

Copy link

commented Oct 13, 2014

I worked around this issue by updating brew with git instead of my broken brew command:

cd /usr/local/Library/
git branch --set-upstream-to=origin/master master
# on branch master
git pull

#29795 has been locked so I thought it best to throw this here.

@zjhiphop

This comment has been minimized.

Copy link

commented Nov 11, 2014

thanks @aprescott , it's works!

@Homebrew Homebrew locked and limited conversation to collaborators Nov 11, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
7 participants
You can’t perform that action at this time.