Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Updating homebrew requires ERB #28688

Closed
0scarius opened this issue Apr 24, 2014 · 10 comments
Closed

Updating homebrew requires ERB #28688

0scarius opened this issue Apr 24, 2014 · 10 comments

Comments

@0scarius
Copy link

I have created a fresh user account on my (fairly old) MacBook Pro running Mac OS X 10.6.8 (10K549), which has the installed Ruby version 1.9.2 (ruby --version gives me ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]). When I issue the command brew update, I get the following error:

usr/local/Library/Homebrew/download_strategy.rb:2:in require': no such file to load -- erb (LoadError) from /usr/local/Library/Homebrew/download_strategy.rb:2 from /usr/local/Library/Homebrew/resource.rb:1:inrequire'
from /usr/local/Library/Homebrew/resource.rb:1
from /usr/local/Library/Homebrew/extend/pathname.rb:3:in require' from /usr/local/Library/Homebrew/extend/pathname.rb:3 from /usr/local/Library/Homebrew/global.rb:3:inrequire'
from /usr/local/Library/Homebrew/global.rb:3
from /usr/local/Library/brew.rb:17:in `require'
from /usr/local/Library/brew.rb:17

I have tried commenting out the particular line (#2) in download_strategy.rb to see what happens, but then it gives me a similar error for open-uri in a different file.

Why does it give me the error that it cannot load such a file -- erb, when ERB is part of the Standard Library (http://www.ruby-doc.org/stdlib-1.9.2/libdoc/erb/rdoc/ERB/Util.html)?

Please help, as I have bee googling for too long already...

@mistydemeo
Copy link
Member

Can you please post your brew --config?

@0scarius
Copy link
Author

Gives me the same:

/usr/local/Library/Homebrew/download_strategy.rb:2:in require': no such file to load -- erb (LoadError) from /usr/local/Library/Homebrew/download_strategy.rb:2 from /usr/local/Library/Homebrew/resource.rb:1:inrequire'
from /usr/local/Library/Homebrew/resource.rb:1
from /usr/local/Library/Homebrew/extend/pathname.rb:3:in require' from /usr/local/Library/Homebrew/extend/pathname.rb:3 from /usr/local/Library/Homebrew/global.rb:3:inrequire'
from /usr/local/Library/Homebrew/global.rb:3
from /usr/local/Library/brew.rb:17:in `require'
from /usr/local/Library/brew.rb:17

@adamv
Copy link
Contributor

adamv commented Apr 24, 2014

What does /usr/bin/ruby --version give? It should still point to 1.8.x.

@mistydemeo
Copy link
Member

Try this and paste the output: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -rerb -e 'puts ERB.version'

@0scarius
Copy link
Author

@adamv that gives me "/usr/bin/ruby: No such file or directory"

@mistydemeo, that gives me "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: no such file to load -- erb (LoadError)"

I went and checked the location /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ and it only has the files ruby and rake?

@mistydemeo
Copy link
Member

@0scarius It sounds like something is wrong with the Ruby that came with Mac OS X - you should try to restore it.

@0scarius
Copy link
Author

How do i do that?

@mistydemeo
Copy link
Member

The sledgehammer solution is an OS reinstall; otherwise, you can try to use a tool like Pacifist to reinstall just the package containing the Ruby framework. Not sure where that package is located in the OS updates and/or the OS DVD, though.

@0scarius
Copy link
Author

The thing is I am trying to install rbenv to actually manage my rubies, and it suggested to install this via homebrew... but then i got lost in this mess... any suggestions on how to bypass this?

@adamv
Copy link
Contributor

adamv commented Apr 25, 2014

Unfortunately, using rbenv or other tools won't help this, as none of them manage the system provided Ruby. Reinstalling the system ruby is kind of out of our jurisdiction, see @mistydemeo's comment above.

@adamv adamv closed this as completed Apr 25, 2014
@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants