Remon Amin
Remon Amin

Reputation: 1548

Rails: rbenv rehash not working (rbenv-shim exists)

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

Upvotes: 24

Views: 9360

Answers (1)

rebelshrug
rebelshrug

Reputation: 772

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

Upvotes: 51

Related Questions