NAME
Ruby::VersionManager
WARNING!
This is an unstable development release not ready for production!
VERSION
Version 0.003008
SYNOPSIS
The Ruby::VersionManager Module will provide a subset of the bash rvm.
Ruby::VersionManager comes with a script rvm.pl. See the perldoc of rvm.pl for a list of actions and options.
ATTRIBUTES
rootdir
Root directory for Ruby::VersionManager file structure.
ruby_version
The ruby version to install, check or remove. Any String matching one of the major ruby versions is valid. Ruby::VersionManager will guess a version based on available versions matching the string. If multiple versions match the latest stable release will be used. Preview and RC versions will never be installed automatically. You have to provide the full matching version string as shown with the list method.
gemset
Name your gemset. More sophisticated support for gemsets needs to be implemented.
agent_string
The user agent used when downloading ruby. Defaults to Ruby::VersionManager/0.003008.
archive_type
Type of the ruby archive to download. Defaults to .tar.bz2, valid are also .tar.gz and .zip.
major_version
Will be automatically set.
rubygems_version
Not yet in use.
CONSTRUCTION
All attributes are optional at creation. Note that rootdir should be set at construction if you want another directory than default because Ruby::VersionManager->new will bootstrap the needed directories.
my $rvm = Ruby:VersionManager->new;
Or
my $rvm = Ruby:VersionManager->new(
rootdir => '/path/to/root',
ruby_version => '1.8',
gemset => 'name_of_the_set',
);
METHODS
available_rubies
Returns a hashref of the available ruby versions.
installed_rubies
Returns a hashref of the installed ruby versions.
list
Print a list of available and installed ruby versions to STDOUT.
$rvm->list;
updatedb
Update database of available ruby versions.
$rvm->updatedb;
install
Install a ruby version. If no version is given the latest stable release will be installed. The program tries to guess the correct version from the provided string. It should at least match the major release. If you need to install a preview or rc version you will have to provide the full exact version.
Latest ruby
$rvm->ruby_version('1.9');
$rvm->install;
Latest ruby-1.8
$rvm->ruby_version('1.8');
$rvm->install;
Install preview
$rvm->ruby_version('ruby-1.9.3-preview1');
$rvm->install;
uninstall
Remove a ruby version and the source dir including the downloaded archive. You have to provide the full exact version of the ruby you want to remove as shown with list.
$rvm->ruby_version('ruby-1.9.3-preview1');
$rvm->uninstall;
LIMITATIONS AND TODO
Currently Ruby::VersionManager is only tested to be running on Linux with bash installed. Better support of gemsets needs to be added.
AUTHOR
Mugen Kenichi, <mugen.kenichi at uninets.eu>
BUGS
Report bugs at:
Ruby::VersionManager issue tracker
support at uninets.eu
<mugen.kenichi at uninets.eu>
SUPPORT
Technical support
<mugen.kenichi at uninets.eu>