Runtime Environments

Runtime Environments are a core feature of RubyEnv, designed to simplify the management of Ruby and Rails projects on macOS. They allow you to create isolated environments for each project, ensuring that dependencies, Ruby (or Node!) versions, and configurations do not conflict with one another.

Ruby & Node

RubyEnv Runtime Environments

Creating an Environment

To create a new Ruby Environment, simply open RubyEnv and click on the "New Environment" button. You will be prompted to select a runtime type (Ruby or Node.js), specify the Ruby version, and provide a name for your environment. RubyEnv will then set up the environment with the specified Ruby version and any necessary dependencies.

Choose Runtime

On the next screen you can select the runtime version you want to use for this environment. RubyEnv will automatically download and install the selected version if it is not already available on your system.

Configure Environment

After selecting the runtime version, you'll be prompted to install the new version and configure the environment. RubyEnv will handle all the necessary setup, including creating a new directory for the environment and configuring the shell to use the specified Ruby version.

Install Environment

Once the environment is created, you can start using it immediately. Just right click the environment in the sidebar and click 'Activate'. You'll need to do this with both Ruby and Node.js if you're using both runtimes in your project.

Node.js

Node.js environments work similarly to Ruby environments. You can create a new Node.js environment by selecting "Node.js" as the runtime type when creating a new environment. RubyEnv will handle the installation of the specified Node.js version and set up the environment accordingly. The only major difference is you'll be asked to pick a package manage (npm, yarn or pnpm) to use with your Node.js environment.