Answer the question
In order to leave comments, you need to log in
`
rbenv: ruby: command not found
Lately I keep seeing this error:
rbenv: ruby: command not found
The `ruby' command exists in these Ruby versions:
2.0.0-p353
Does anyone know how to fix it?
Answer the question
In order to leave comments, you need to log in
I had the rbenv-bundler plugin installed, which was added by my old rbenv installation script. After uninstalling this plugin, the error no longer appears.
Look.
When you say ruby, then with a normally initialized rbenv, the script in ~/.rbenv/shims/ruby should run, which transfers the command to the rbenv script itself (if you do cat ~/.rbenv/shims/ruby, you will see the path to it).
rbenv adds its paths to the environment and calls this https://github.com/sstephenson/rbenv/blob/master/libexec/rbenv-exec
and it in turn determines the full path to the ruby command and runs it
https://github .com/sstephenson/rbenv/blob/master/libexec/rbenv-exec#L47
in this place it looks like a collapse / tryndets =) because then only a pure ruby interpreter according to the logic of the script.
alternatively try againrbenv which ruby
well, if it doesn’t help, try to see what kind of command exec is trying to do there (insert echo "$RBENV_COMMAND_PATH" before line 47)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question