rubyrbenv

Problem with rbenv after installing it from git repository


I installed rbenv using the following:

git clone https://github.com/rbenv/rbenv.git ~/.rbenv --depth=1
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc

Then, when I try to use it, I am getting the following error message:

~$ rbenv install -l
rbenv: no such command `install'

How to solve this problem?


Solution

  • rbenv installation does not include the install command. It is provided by the ruby-build plugin. As the rbenv was installed with the git repository, I had to install the ruby-build in the same way:

    git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
    

    After restarting the terminal, the install command worked.