rbenv: rbenv: ruby: command not found after install

after install and config rbenv following rbenv documentation i got this error:

$ ruby -v rbenv: ruby: command not found

The `ruby’ command exists in these Ruby versions: 1.8.7-p249 1.9.3-dev 1.9.3-p125

why? i already removed RVM installation - the single thing that I found at foruns or similar issues.

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

@ITPROz make sure you add the rbenv init in ~/.profile (I had the same error on Ubuntu 13.04)

export RBENV_ROOT="${HOME}/.rbenv"
if [ -d "${RBENV_ROOT}" ]; then
  export PATH="${RBENV_ROOT}/bin:${PATH}"
  eval "$(rbenv init -)"
fi

You probably haven’t select any particular version and it tries falling back to the system Ruby which it doesn’t find.

Do rbenv global 1.9.3-p125 and try again. If that doesn’t help, post us the output of rbenv versions and which -a ruby

Oops! When I used “rbenv global 2.0.0-p247”, everything goes well!!!

This worked for me too! rbenv global <version_number>

Oops! When I used “rbenv global 2.0.0-p247”, everything goes well!!!

I installed rbenv to ubuntu 16.04 with below guide but when I run this command, got an error message. rails -v -bash: /user/bin/ruby: No such file or directory. How can I solve it? Thanks

Try rbenv rehash after rbenv install 1.9.3-dev @seufagner

Closing since this seems to be a system issue, not a bug in rbenv. I feel like I gave enough advice for you to debug your system.