This will get you going with the latest version of rbenv and make it easy to fork and contribute any changes back upstream.
-
Check out rbenv into
~/.rbenv
.$ cd $ git clone git://github.com/sstephenson/rbenv.git .rbenv
-
Add
~/.rbenv/bin
to your$PATH
for access to therbenv
command-line utility.$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
-
Add rbenv init to your shell to enable shims and autocompletion.
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
-
Restart your shell so the path changes take effect. You can now begin using rbenv.
$ source ~/.bash_profile
-
Install ruby-build locally as a rbenv plugin:
$ mkdir -p ~/.rbenv/plugins $ cd ~/.rbenv/plugins $ git clone git://github.com/sstephenson/ruby-build.git $ cd ~/.rbenv/plugins/ruby-build $ sudo ./install.sh
-
Install any ruby version with the built in
rbenv-install
command:$ rbenv install 1.9.2-p290