Inspired by PyPA's Virtualenv, Mineshaft allows for the creation of isolated Ruby virtual environments. It aims to simplify the process of installing and using multiple versions of Ruby.
Mineshaft is a Ruby gem, so you will need a working Ruby environment to use it.
gem install mineshaft
To build Ruby environments that are able to download gems from RubyGems, you will also need to install OpenSSL. You can install OpenSSL on MacOS via Homebrew.
brew install openssl
yum group install "Development Tools"
yum install openssl-devel
Create a new environment and install the latest stable version of Ruby.
ms new env
To specify a particular version of Ruby, add the version number after the env name
ms new env 3.4.0
To use the new environment, you must activate it using the activate.sh
script.
source env/bin/activate.sh
You can install a Ruby environment globally by running the following command. Specify the version of Ruby after the install
keyword. This will replace your current system wide Ruby for the user running Mineshaft.
ms install 3.4.0
To view all globally installed Rubies
ms env
When you install a gem that has a binary associated with it, you will need to reload your global Ruby bin
directory.
ms reload
To switch between environments, use the use
keyword followed by a version of Ruby installed on your machine.
ms use 3.4.0
There is rake test defined to run the test suite. rspec
~> 3.13.0 must be installed as a development dependency prior to running tests.
rake test
Cameron Testerman -- [email protected]
Copyright 2017-2024, Cameron Testerman
Released under MIT license.