【发布时间】:2016-04-06 23:38:42
【问题描述】:
我安装了 rbenv 和 ruby-build,运行了rbenv install 2.3.0,它成功了。但是我不能使用任何 Ruby 命令。以下是我得到的各种错误:
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 存在于~/.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
我重新启动了机器并尝试重新安装,但我得到了同样的结果。这台机器上从未安装过 Ruby。
【问题讨论】: