The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Alien::Ruby - Find or install Ruby

SYNOPSIS

 use Alien::Ruby;

 use Env qw( @PATH );
 
 unshift @PATH, Alien::Ruby->bin_dir;

 system(q(ruby -e 'puts "Hello from Ruby!"'));

 system('gem install pry');
 

DESCRIPTION

This distribution provides the Ruby programming language so that it can be used by other Perl distributions. It does this by first trying to detect an existing install of Ruby on your system. If found it will use that. If it cannot be found, the Ruby source code will be downloaded from the internet and it will be compiled and installed to a private share location for the use of other Perl modules.

GEM

Because RubyGems is included with Ruby, and the gem executable is installed into the same directory as the <ruby> executable, you can use Alien::Ruby as if it were Alien::Gem.

Please be mindful of the $ENV{GEM_HOME} and $ENV{GEM_PATH} environment variables. These variables will change the default locations where Gem's can be found, and where Gem's will be installed.

SPECIFY RUBY VERSION

To specify the version of Ruby you want, set the ALIEN_RUBY_VERSION environment variable before installing Alien::Ruby:

  $ ALIEN_RUBY_VERSION=2.7.7 cpanm Alien::Ruby

The minimum supported Ruby version is 2.1.0.

WINDOWS

Windows is not currently supported. Patches welcome.

SEE ALSO

Alien

Documentation on the Alien concept itself.

Alien::Base

The base class for this Alien.

Alien::Build::Manual::AlienUser

Detailed manual for users of Alien classes.

AUTHOR

Nicholas Hubbard <nicholashubbard@posteo.net>

CONTRIBUTORS

  • William N. Braswell, Jr.

  • Zakariyya Mughal