-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rbenv: cannot rehash: /usr/local/var/rbenv/shims/.rbenv-shim exists #759
Comments
During the rehash process, rbenv writes out the temporary file It doesn't sound like you're running multiple Solution: remove the file and try again. |
I'm wondering what can be the root cause for such scenario? |
@shyjt I don't know! Maybe if you run |
That was so weird - I've reinstalled the package and it didn't help… But when I've repeated the procedure after restart it solved this problem and never happened again… |
I had this same error message on multiple servers on the same day, and in all cases deleting the file made it work again the next time. If this is a kind of pseudo-lock file, perhaps what rbenv could do is open and actually lock the file. Then a second rbenv which comes along and sees the file could simply try to delete it before recreating it. |
This has failed for me just now on an Ubuntu 16.04 server: Relevant Ansible output:
No other commands were run in parallel. Both rbenv and ruby-build are from master as of 5 minutes ago. After SSH'ing into the server and running This does not seem like a user error. Seems to be a race condition in |
I'm getting a similar error, not b/c the lock file gets clobbered, but b/c of the Just test bash. set -o noclobber
echo >/dev/null
That redirections needs to be done explicity, see Safe I/O Redirection with noclobber (Unix Power Tools, 3rd Edition). |
Any update on this? I still have this issue. I guess I'll check out #982 which reports to fix. |
Makes me wonder how long my system has thought a rehash was already in progress O_o |
I ran rbenv doctor with the command curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash and then was told this Checking for Checking `rbenv install' support: /usr/local/bin/rbenv-install (ruby-build 20200214) and it worked after exporting this director to the path like this export PATH="$PATH:/Users/user/.rbenv/shims" |
@igorshtopor @mislav - One way this can happen is if you run out of disk space mid-install. Just happened to me. Stupidly left my AWS EBS to the default 8GB. |
the rbenv doctor command posted above is 404'd. here is the updated command: with curl
alternatively, with wget
|
Hi! When trying to
$ rbenv rehash
getting:What does that mean?
The text was updated successfully, but these errors were encountered: