20

I am trying to rehash rbenv after installing a new gem it gives me these error on my ubuntu server

 rbenv: cannot rehash: /home/deployer/.rbenv/shims/.rbenv-shim exists

however .rbenv-shims doesn't exists

Promise Preston
  • 24,334
  • 12
  • 145
  • 143
Remon Amin
  • 1,506
  • 2
  • 19
  • 44

1 Answers1

42

Might be an issue with directory permissions @ sstephenson/rbenv:

FWIW - I also had this problem, and had to change permissions on the dir where it was checking for the .rbenv-shim... so it could write to the dir, so it stopped complaining.

Also, try:

rm /home/deployer/.rbenv/shims/.rbenv-shim

and run:

rbenv rehash
BinaryButterfly
  • 18,137
  • 13
  • 50
  • 91
rebelshrug
  • 682
  • 7
  • 10