问题
I have spent many hours trying to understand the implications of local installation vs global (root?) installation, but couldn't grasp enough to even formulate a question. This issue (below) with Heroku is a part of that puzzle.
Heroku had been installed-and worked with some simple rails apps. But out of the blue, I began to get an error message that I should install Heroku CLI. Thinking perhaps I had messed things up, I went ahead and used Brew to install Heroku this time (brew install heroku/brew/heroku) Though the installation was successful, I continued to get the same error message about installing Heroku CLI.
Today, I started another rails app (rails new MyApp, got the same error message Install the Heroku CLI from https://cli.heroku.com, tried brew install heroku/brew/heroku yet again, and here's a new message:
Warning: heroku/brew/heroku 7.7.8 is already installed, it's just not linked
You can use `brew link heroku` to link this version.
When I did brew link heroku , I got this:
Linking /usr/local/Cellar/heroku/7.7.8...
Error: Could not symlink bin/heroku
Target /usr/local/bin/heroku
already exists. You may want to remove it:
rm '/usr/local/bin/heroku'
To force the link and overwrite all conflicting files:
brew link --overwrite heroku
To list all files that would be deleted:
brew link --overwrite --dry-run heroku
and brew link --overwrite --dry-run heroku led to:
Would remove:
/usr/local/bin/heroku -> /usr/local/lib/heroku/bin/heroku
- Am I correct to assume that I am dealing with conflicting installations?
- How do I resolve the current Heroku issue--let it remove duplicate files? What does that mean? (And which gets removed:
/usr/local/bin/herokuor/usr/local/lib/heroku/bin/heroku? - I believe I have similar issues related to ruby gem installations. I'd appreciate some pointers on understanding the fundamental issue of global vs local (vs individual app installations?), specifically related to ruby, rails and ruby gems.
来源:https://stackoverflow.com/questions/51804851/are-different-heroku-installations-conflicting