Forge Home


Configure ruby via Boxen


7,886 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 8.5.7 (latest)
  • 8.5.6
  • 8.5.5
  • 8.5.4
  • 8.5.3
released Dec 15th 2015
This version is compatible with:
  • Darwin

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'halyard-ruby', '8.5.7'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add halyard-ruby
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install halyard-ruby --version 8.5.7

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



halyard/ruby — version 8.5.7 Dec 15th 2015


Puppet Forge Dependency Status MIT Licensed Build Status

Module to install ruby versions and gems

Changes from upstream

  • Removed a lot of meta-stuff I wasn't using, like the cardboard scripts
  • Removed definition files for github's custom ruby versions
  • Set up CircleCI build tests
  • Default gem version to '*'
  • Default gem name to resource title
  • Rehash rbenv after gem install
  • Switch from puppet-module-data to function bindings
  • Allow skipping rbenv init on shell creation using SKIP_RBENV_INIT environment variable


In your hiera config:

ruby::build::ensure: v20150818
ruby::rbenv::ensure: v0.4.0

"ruby::provider": "rbenv"
"ruby::user": "deployuser"

# Check for ruby-build releases
"ruby::build::ensure": "v20141028"
"ruby::chruby::ensure": "v0.3.6"
"ruby::rbenv::ensure": "v0.4.0"

# rbenv plugins
    "ensure": "v1.0.0"
    "source": "sstephenson/rbenv-gem-rehash"

# Environment variables for building specific versions
# You'll want to enable hiera's "deeper" merge strategy
# See
    "CC": "llvm"
    "CFLAGS": "-O9 -funroll-loops"
    "CC": "gcc"

# Version aliases, commonly used to bless a specific version
# Use the "deeper" merge strategy, as with ruby::version::env
  "1.9.3": "1.9.3-p484"
  "2.0.0": "2.0.0-github"
  "2.0.0-github": "2.0.0-github6"
class { 'ruby::global':
  version => '2.2.2'

# ensure a gem is installed for a certain ruby version
# note, you can't have duplicate resource names so you have to name like so
$version = "2.2.2"
ruby_gem { "bundler for ${version}":
  gem          => 'bundler',
  version      => '~> 1.2.0',
  ruby_version => $version,

ruby_gem { 'bundler for all rubies':
  gem          => 'bundler',
  version      => '~> 1.0',
  ruby_version => '*',

# install a ruby version
ruby::version { '2.2.2': }

# Installing rbenv plugin
ruby::rbenv::plugin { 'rbenv-vars':
  ensure => 'v1.2.0',
  source  => 'sstephenson/rbenv-vars'


All ruby versions are installed to /opt/rubies, using either rbenv (default) or chruby.

Required Puppet Modules