Closed fschwahn closed 6 years ago
We've had some gems that suddenly don't install on high sierra either and I haven't tracked down the exact cause of the problem. If you want to troubleshoot further, I'd suggest running brew gem formula mailcatcher > mailcatcher.rb
and playing around with the resulting formula in mailcatcher.rb
. I suspect something to do with the way we are overriding GEM_HOME
in the formula may be part of the cause.
I was able to fix the issue by replacing the initialization of the gem paths in the generated bin:
I replaced this:
ENV['GEM_HOME']="/usr/local/Cellar/gem-mailcatcher/0.6.5"
ENV['GEM_PATH']="/usr/local/Cellar/gem-mailcatcher/0.6.5"
with this:
Gem.paths = {
'GEM_HOME' => "/usr/local/Cellar/gem-mailcatcher/0.6.5",
'GEM_PATH' => "/usr/local/Cellar/gem-mailcatcher/0.6.5"
}
And now it works for me. I found Gem.paths=
by googling a bit around (from https://stackoverflow.com/a/30369485/891458), but haven't looked into it further. Maybe it makes sense to use it generally?
Ah! I didn't realize that mailcatcher installed but the binstub wasn't working. For that, you might try #49.
Ok, just tested it, #49 also fixes the problem. Closing this 👍
This used to work in the past (though I'm not sure with which
brew-gem
version, but fails now:I'm on High Sierra, if that makes a difference. Any idea where to start looking?