Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use homebrew variables for binary path instead of hardcoding #33

Closed
paulhybryant opened this issue Oct 11, 2016 · 6 comments
Closed

Use homebrew variables for binary path instead of hardcoding #33

paulhybryant opened this issue Oct 11, 2016 · 6 comments

Comments

@paulhybryant
Copy link

I didn't install homebrew in /usr/local/

So the following line causes failure when installing
rubybindir = '<%= use_homebrew_ruby ? "/usr/local/bin" : "/usr/bin" %>'

@nicksieger
Copy link

@paulhybryant Thanks for reporting this. Can you try installing with brew install brew-gem --HEAD and see if the fix works for you?

@paulhybryant
Copy link
Author

no, this is the error:

(erb):40:in expand_formula': uninitialized constant Brew::Gem::CLI::HOMEBREW_PREFIX (NameError) from /usr/local/Cellar/ruby/2.3.1_2/lib/ruby/2.3.0/erb.rb:864:ineval'
from /usr/local/Cellar/ruby/2.3.1_2/lib/ruby/2.3.0/erb.rb:864:in result' from /usr/local/lib/brew/gem/cli.rb:49:inexpand_formula'
from /usr/local/lib/brew/gem/cli.rb:56:in block in with_temp_formula' from /usr/local/lib/brew/gem/cli.rb:55:inopen'
from /usr/local/lib/brew/gem/cli.rb:55:in with_temp_formula' from /usr/local/lib/brew/gem/cli.rb:76:inrun'
from /usr/local/bin/brew-gem:7:in `

'

@nicksieger
Copy link

Ah, right. brew-gem gets launched by Homebrew rather than loaded inside of it. I think the fix should be to replace HOMEBREW_PREFIX with either brew --prefix or ENV['HOMEBREW_PREFIX']. I'll see which one works best.

@nicksieger nicksieger reopened this Oct 12, 2016
@nicksieger
Copy link

@paulhybryant try the most recent master. Should work better now.

@paulhybryant
Copy link
Author

yeah that works. Thanks @nicksieger

@paulhybryant
Copy link
Author

This seems still only available in HEAD, not in a release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants