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

gem install brew-gem + brew-gem install brew-gem causes brew link failure #25

Closed
AmirIHz opened this issue May 17, 2016 · 5 comments
Closed

Comments

@AmirIHz
Copy link

AmirIHz commented May 17, 2016

#239690c9c

gem install brew-gem followed by brew-gem install brew-gem, as suggested in README.md, causes the brew link step to fail due to an existing brew-gem executable in /usr/local/bin, which was installed by RubyGems:

$ gem install brew-gem
Fetching: brew-gem-0.7.2.gem (100%)
Successfully installed brew-gem-0.7.2
Parsing documentation for brew-gem-0.7.2
Installing ri documentation for brew-gem-0.7.2
Done installing documentation for brew-gem after 6 seconds
1 gem installed
$ brew-gem install brew-gem
==> Fetching brew-gem from gem source
Fetching: brew-gem-0.7.2.gem (100%)
Downloaded brew-gem-0.7.2
Warning: Cannot verify integrity of brew-gem-0.7.2.gem
A checksum was not provided for this resource
For your reference the SHA256 is: 7e9621043536b27d4423c40da3a71c5d1546963e671b68ecaa2d27129014d5c7
==> gem install /Library/Caches/Homebrew/brew-gem-0.7.2.gem --no-ri --no-rdoc --no-wrapper --no-user-install --install-dir /usr/local/Cellar/gem-brew-
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/brew-gem
Target /usr/local/bin/brew-gem
already exists. You may want to remove it:
  rm '/usr/local/bin/brew-gem'

To force the link and overwrite all conflicting files:
  brew link --overwrite gem-brew-gem

To list all files that would be deleted:
  brew link --overwrite --dry-run gem-brew-gem

Possible conflicting files are:
/usr/local/bin/brew-gem
==> Summary
🍺  /usr/local/Cellar/gem-brew-gem/0.7.2: 19 files, 24K, built in 14 seconds

If you have installed brew-gem as gem, do you really need to brew-gem it? Wouldn't it be redundant? On the other hand one might want brew-gem to be in the Cellar as well...

The Warning: Cannot verify integrity of brew-gem-0.7.2.gem A checksum was not provided for this resource warning should probably be a separate issue (like #24)... ;-)

@nicksieger
Copy link

Good point, I think the assumption here when you brew-gem install brew-gem is that you haven't already installed it in Homebrew. Probably worth updating the docs to point that out.

@AmirIHz
Copy link
Author

AmirIHz commented May 18, 2016

Thank you for your response. However, with all due respect, I believe you misunderstood me. I wasn't actually referring to a previous Homebrew installation of brew-gem, but the RubyGems install instructions in README.md:

Via Rubygems:

gem install brew-gem
brew-gem install brew-gem

Via Homebrew:

brew install brew-gem

These Via Rubygems instructions (first do a RubyGems install, followed by a brew-gem installation) cause the brew link step failure. The other way around (Homebrew installation followed by RubyGems installation) I haven't tested yet. I will do so as soon as I get home. ;-)

At any rate I think this issue should be reopened as it hasn't been resolved.

Update: a previously via Homebrew installed (and linked) brew-gem would indeed cause problems both with a RubyGems install and a brew-gem install. Nonetheless that isn't what I tried to point out by opening this issue as that in fact works as designed; the steps in README.md don't.

@nicksieger
Copy link

Ok, so it still sounds like a documentation issue. The point is that you should choose one installation method and stick with that, but it sounds like you tried both in succession?

@anfleene
Copy link

@AmirIHz I think 317098c clears up the documentation well enough.

@AmirIHz
Copy link
Author

AmirIHz commented May 20, 2016

@nicksieger uhhhhh nope, I'm just following the official README.md instructions:

Via Rubygems:

gem install brew-gem
brew-gem install brew-gem

which doesn't state you shouldn't run both commands and pick either one. Which wouldn't make much sense as brew-gem install brew-gem wouldn't work if you hadn't previously installed brew-gem in the first place. So yes, it's a documentation issue.

I hadn't used the classic Homebrew method before filing this issue, however, I did try several cases, just to be sure. Anyway, this issue isn't a show-stopper for me personally. I just think it would be a problem for other people who follow your documented RubyGems method to the letter, and aren't as tech-savvy as I am. Documentation should be tested as well. ;-)

For the record, after experiencing the failure I just uninstalled both the gem and the Homebrew gem-brew-gem and stuck with just the gem install brew-gem and skipped the brew-gem install brew-gem which seems redundant to me anyway. I just thought you should know about it. I'm only trying to help.

@anfleene nope, try again.

@sportngin sportngin locked and limited conversation to collaborators May 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants