unident77
unident77

Reputation: 35

Ruby successfully installed with rbenv but is unaccessible

I installed rbenv and ruby-build, ran rbenv install 2.3.0 and it succeeded. However I can't use any Ruby commands. Here are the various errors I get:

user@ubuntu:~$ gem install bundler
rbenv: gem: command not found

The `gem' command exists in these Ruby versions:
  2.3.0

user@ubuntu:~$ ruby -v
rbenv: ruby: command not found

The `ruby' command exists in these Ruby versions:
  2.3.0

user@ubuntu:~$ rbenv install 2.3.0
rbenv: /home/user/.rbenv/versions/2.3.0 already exists
continue with installation? (y/N)

2.3.0 exists in ~/.rbenv/versions:

user@ubuntu:~$ cd ~/.rbenv
user@ubuntu:~/.rbenv$ ls
bin          libexec  plugins  README.md  src   versions
completions  LICENSE  rbenv.d  shims      test
user@ubuntu:~/.rbenv$ cd versions
user@ubuntu:~/.rbenv/versions$ ls
2.3.0

I restarted the machine and tried reinstalling but I get the same thing. Ruby has never been installed on this machine.

Upvotes: 2

Views: 1002

Answers (1)

Kailan Blanks
Kailan Blanks

Reputation: 322

Try to run rbenv global 2.3.0.

Upvotes: 2

Related Questions