Remove RVM
$ rvm implode
or
$ rm -rf ~/.rvm
Note: Also make sure all of the .rvm files and folder are deleted.
clone rbenv from git repo
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
Compile dynamic bash extension
$ cd ~/.rbenv && src/configure && make -C src
Add below in .bashrc file
export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
which rbenv > /dev/null && eval "$(rbenv init -)"
Shell-specific instructions on how to initialize rbenv to enable shims and autocompletion.
$ ~/.rbenv/bin/rbenv init
Restart shel then run
$ type rbenv
Installing as an rbenv plugin
$ cd ~/.rbenv/plugins/ruby-build
$ git clone https://github.com/rbenv/ruby-build.git
or
$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
List all available versions:
$ rbenv install -l
Install a Ruby version:
$ rbenv install 2.0.0-p247
Rbenv rehasb ruby after installing ruby
$ rbenv rehash
Intall ruby gem
$ gem install bundler