Ruby

Framework
Ruby
Category
Languages
Publisher
Jetify
{
  "packages": [
    "bundler@2.4",
    "ruby@3.1"
  ],
  "shell": {
    "init_hook": [],
    "scripts": {
      "run_test": "ruby -e 'puts \"Hello from Ruby #{RUBY_VERSION}\"'"
    }
  }
}

Ruby

Example Repo

Open In Devspace

Ruby can be automatically configured by Devbox via the built-in Ruby Plugin. This plugin will activate automatically when you install Ruby 2.7 using devbox add ruby.

Adding Ruby to your shell

Run devbox add ruby@3.1 bundler, or add the following to your devbox.json

    "packages": [
        "ruby@3.1",
        "bundler@latest"
    ]

This will install Ruby 3.1 to your shell. You can find other installable versions of Ruby by running devbox search ruby. You can also view the available versions on Nixhub

Ruby Plugin Support

Devbox will automatically create the following configuration when you install Ruby with devbox add.

Environment Variables

These environment variables configure Gem to install your gems locally, and set your Gem Home to a local folder

RUBY_CONFDIR={PROJECT_DIR}/.devbox/virtenv/ruby
GEMRC={PROJECT_DIR}/.devbox/virtenv/ruby/.gemrc
GEM_HOME={PROJECT_DIR}/.devbox/virtenv/ruby
PATH={PROJECT_DIR}/.devbox/virtenv/ruby/bin:$PATH

Bundler

In case you are using bundler to install gems, bundler config file can still be used to pass configs and flags to install gems.

.bundle/config file example:

BUNDLE_BUILD__SASSC: "--disable-lto"

Related Docs

README.md

Level up your dev environment

No need to switch your style. Devbox works with any coding language, so you can get results as you write.
PREPARE FOR LAUNCH

Plans for teams of any size

Jetify Cloud offers pricing plans for Solo Developers to Large Enterprises, and everything in between. All plans include free credits, and you are only billed for what you use. Need something custom? Contact our team and we can help.
YOUR INPUT COUNTS

Join the community

Discuss ideas, uses and builds with the Jetify team and others.