The command rbenv install is missing

McDougall picture McDougall · Jul 12, 2013 · Viewed 55.9k times · Source

In Ubuntu 10.04 I just installed rbenv. The install command is not present.

rbenv 0.4.0-49-g8b04303
Usage: rbenv <command> [<args>]

Some useful rbenv commands are:
   commands    List all available rbenv commands
   local       Set or show the local application-specific Ruby version
   global      Set or show the global Ruby version
   shell       Set or show the shell-specific Ruby version
   rehash      Rehash rbenv shims (run this after installing executables)
   version     Show the current Ruby version and its origin
   versions    List all Ruby versions available to rbenv
   which       Display the full path to an executable
   whence      List all Ruby versions that contain the given executable

See `rbenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/sstephenson/rbenv#readme

What am I missing?

Answer

toro2k picture toro2k · Jul 12, 2013

The install command is not embedded into rbenv, it comes from the ruby-build plugin. You can install it using the command:

git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build

On Mac OS X you can install it through homebrew:

brew install ruby-build

On Debian (version >= 7) and Ubuntu (version >= 12.10) both rbenv and ruby-build can be installed using apt-get (or aptitude):

sudo apt-get update
sudo apt-get install rbenv ruby-build

On FreeBSD ruby-build is available in the Ports Collection, it can be install both as a binary package or build from the port:

# Using pkgng rbenv will be installed
pkg install ruby-build

# Building ruby-build form Ports will install rbenv only if the RBENV option is set
cd /usr/ports/devel/ruby-build
make install