Are different Heroku installations conflicting?

人盡茶涼 提交于 2019-12-25 02:27:15

问题


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
  1. Am I correct to assume that I am dealing with conflicting installations?
  2. How do I resolve the current Heroku issue--let it remove duplicate files? What does that mean? (And which gets removed: /usr/local/bin/heroku or /usr/local/lib/heroku/bin/heroku ?
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!