0

I'm facing a really weird issue and would appreciate any help. When I run

danger --version

I get 4.3.5

But when I run

gem list -a danger

I get

danger (8.2.3, 8.2.2)

And when I use yes | gem uninstall -a --force danger it uninstall danger 8.2.2 and danger 8.2.3 but danger --version still gives 4.3.5

danger exec is currently failing because it couldn't identify android_lint variable in the Dangerfile. And I think it's happening because of danger version. How do I update it?

Shivam Pokhriyal
  • 1,044
  • 11
  • 26
  • if you are on Linux you can check where danger is saved using `where` command. – Chandan Mar 13 '21 at 18:30
  • Thank you for the answer. I'm on ubuntu and I tried `whereis danger` which gave me `/usr/local/bin`. Then I removed it from there using `su rm -rf danger`. But now `danger --version` gives `danger: not found`. Even when I'm install it using `gem install danger` – Shivam Pokhriyal Mar 14 '21 at 07:24
  • did you tried after closing terminal and then rerun the app in new terminal, and you are sure that you have gem directory in `PATH` env variable – Chandan Mar 14 '21 at 07:34
  • you can check [here](https://stackoverflow.com/questions/2392293/ruby-gems-returns-command-not-found) for gem path – Chandan Mar 14 '21 at 08:29
  • is your problem solved – Chandan Mar 14 '21 at 15:10
  • yes, it's solved. Thanks! You can post your answer and I'll accept it for bounty. – Shivam Pokhriyal Mar 15 '21 at 03:29

1 Answers1

1

If on Linux you can use where or whereis command to check where the binary is stored, then you can either backup, rename or delete if not required.

Then reinstall the danger gem and try to run the app

If still does not work open a new terminal and try to run the app in new terminal

And make sure gem directory is on your Path env variable

Note: For more info how to check gem directory path you can check here

Chandan
  • 11,465
  • 1
  • 6
  • 25