Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

ruby_build (48) Versions 1.3.0

Manages the ruby-build framework and its installed rubies. A LWRP is also defined.

Policyfile
Berkshelf
Knife
cookbook 'ruby_build', '= 1.3.0', :supermarket
cookbook 'ruby_build', '= 1.3.0'
knife supermarket install ruby_build
knife supermarket download ruby_build
README
Dependencies
Changelog
Quality 100%

ruby-build Chef Cookbook

Cookbook Version
Build Status
OpenCollective
OpenCollective
License

Description

Manages the [ruby-build][rb_site] framework and its installed Rubies. A lightweight resources and providers (lwrp) is also defined.

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Usage

Simply include recipe[ruby_build] in your run_list to have ruby-build installed. You will also have access to the ruby_build_ruby resource. See the See Resources and Providers section for more details.

Requirements

Chef

  • Chef 12.1+

Platforms

The following platforms have been tested with this cookbook, meaning that the recipes and LWRPs run on these platforms without error:

  • ubuntu 12.04+
  • mac_os_x
  • debian 7+
  • freebsd 9+
  • rhel 6+
  • fedora
  • suse 13+

There might be more that work successfully as well, but those are not tested in test kitchen.

Please [report][issues] any additional platforms so they can be added.

Cookbooks

There are no external cookbook dependencies. However, if you are installing [JRuby] then a Java runtime will need to be installed. The Opscode [java cookbook][java_cb] can be used on supported platforms.

Installation

Depending on the situation and use case there are several ways to install this cookbook. All the methods listed below assume a tagged version release is the target, but omit the tags to get the head of development.

From Supermarket

To install this cookbook from the Chef Supermarket, use the knife command:

knife cookbook site install ruby_build

Using Berkshelf

[Berkshelf] is a cookbook dependency manager and development workflow assistant. To install Berkshelf:

cd chef-repo
gem install berkshelf
berks init

To use the Supermarket version:

echo "cookbook 'ruby_build'" >> Berksfile
berks install

Or to reference the Git version:

repo="chef_rbenv/ruby_build"
latest_release=$(curl -s https://api.github.com/repos/$repo/git/refs/tags \
| ruby -rjson -e '
  j = JSON.parse(STDIN.read);
  puts j.map { |t| t["ref"].split("/").last }.sort.last
')
cat >> Berksfile <<END_OF_BERKSFILE
cookbook 'ruby_build',
  :git => 'git://github.com/$repo.git', :branch => '$latest_release'
END_OF_BERKSFILE

Recipes

default

Installs the ruby-build codebase and initializes Chef to use the Lightweight Resources and Providers ([LWRPs][lwrp]).

Attributes

git_url

The Git URL which is used to install ruby-build.

The default is "git://github.com/rbenv/ruby-build.git".

git_ref

A specific Git branch/tag/reference to use when installing ruby-build. For example, to pin ruby-build to a specific release:

node['ruby_build']['git_ref'] = "v20111030"

The default is "master".

default_ruby_base_path

The default base path for a system-wide installed Ruby. For example, the following resource:

ruby_build_ruby "1.9.3-p0"

will be installed into "#{node['ruby_build']['default_ruby_base_path']}/1.9.3-p0" unless a prefix_path attribute is explicitly set.

The default is "/usr/local/ruby".

upgrade

Determines how to handle installing updates to the ruby-build framework. There are currently 2 valid values:

  • "none", false, or nil: will not update ruby-build and leave it in its current state.
  • "sync" or true: updates ruby-build to the version specified by the git_ref attribute or the head of the master branch by default.

The default is "none".

Resources and Providers

ruby_build_ruby

Actions

Action Description Default
install Build and install a Ruby from a definition file. See the [ruby-build readme][rb_readme] for more details. Yes
reinstall Force a recompiliation of the Ruby from source. The :install action will skip a build if the target install directory already exists.

Attributes

Attribute Description Default Value
definition Name attribute: the name of a [built-in definition][rb_definitions] or the path to a ruby-build definition file. nil
prefix_path The path to which the Ruby will be installed. nil
user A user which will own the installed Ruby. The default value of nil denotes a system-wide Ruby (root-owned) is being targeted. Note: if specified, the user must already exist. nil
group A group which will own the installed Ruby. The default value of nil denotes a system-wide Ruby (root-owned) is being targeted. Note: if specified, the group must already exist. nil
environment A Hash of [additional environment variables][rb_environment] such as CONFIGURE_OPTS or RUBY_BUILD_MIRROR_URL. nil

Examples

Install Ruby
# See: https://github.com/sstephenson/ruby-build/issues/186
ruby_build_ruby "ree-1.8.7-2012.02" do
  environment({ 'CONFIGURE_OPTS' => '--no-tcmalloc' })
end

ruby_build_ruby "1.9.3-p0" do
  prefix_path "/usr/local/ruby/ruby-1.9.3-p0"
  environment({
    'RUBY_BUILD_MIRROR_URL' => 'http://local.example.com'
  })

  action      :install
end

ruby_build_ruby "jruby-1.6.5"

Note: the install action is default, so the second example is more common.

Install A Ruby For A User
ruby_build_ruby "maglev-1.0.0" do
  prefix_path "/home/deploy/.rubies/maglev-1.0.0"
  user        "deploy"
  group       "deploy"
end
Reinstall Ruby
ruby_build_ruby "rbx-1.2.4" do
  prefix_path "/opt/rbx-1.2.4"

  action      :reinstall
end

Note: the Ruby will be built whether or not the Ruby exists in the prefix_path directory.

Known Issues

Public work on this cookbook has resumed after a hiatus. Accordingly, some combinations of versions have issues that you have to work around.

  • Ubuntu 12.04 and rubinius needs an apt repo for LLVM as the build tools rely on LLVM version between 3.0 and 3.5:
  apt_repository 'llvm' do
  uri 'http://llvm.org/apt/precise'
  distribution 'llvm-toolchain-precise-3.5'
  components ['main']
  end
  • Ubuntu 14.04 and ruby 2.0.0 patch versions <457

    • The readline and openssl extensions have an issue patched in 457

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website
https://opencollective.com/sous-chefs/sponsor/1/website
https://opencollective.com/sous-chefs/sponsor/2/website
https://opencollective.com/sous-chefs/sponsor/3/website
https://opencollective.com/sous-chefs/sponsor/4/website
https://opencollective.com/sous-chefs/sponsor/5/website
https://opencollective.com/sous-chefs/sponsor/6/website
https://opencollective.com/sous-chefs/sponsor/7/website
https://opencollective.com/sous-chefs/sponsor/8/website
https://opencollective.com/sous-chefs/sponsor/9/website

Dependent cookbooks

yum-epel >= 0.0.0
git >= 0.0.0

Contingent cookbooks

aws-codedeploy-agent Applicable Versions
chruby Applicable Versions
errbit-server Applicable Versions
gitlab Applicable Versions
gitlab-shell Applicable Versions
gitlabhq Applicable Versions
ish Applicable Versions
minimart Applicable Versions
mw_application Applicable Versions
myusa Applicable Versions
noosfero Applicable Versions
polyglot Applicable Versions
redmine2 Applicable Versions
ruby_pkg Applicable Versions
ruby_rbenv Applicable Versions
sensu_admin Applicable Versions
server-base Applicable Versions
simple_passenger Applicable Versions
ut_workstation Applicable Versions

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.

[1.3.0] - 2020-03-05

Added

  • Add debian-10 platform to test kitchen configurations
  • Migrate to github actions

Fixed

  • Fix CircleCI testing, bring it up to Sous-Chefs standards
  • Fix Markdown
  • Fix YAML
  • Use platform? helper in the attributes file
  • Remove the unnecessary long_description field in metadata.rb
  • Fix libgdbm package name in attributes for debian 10
  • Fix libgdbm package name in attributes for Ubuntu 19

[1.2.0] - 2019-01-23

  • Convert to a custom resource
  • Move test from bats to Inspec
  • Add support for Amazon Linux
  • Add support for Ubuntu 18.04

[1.1.0] - 2017-04-07

  • Maintenance of this cookbook has been moved to the Sous Chefs organization - http://sous-chefs.org/
  • Switched git installation to the git cookbook
  • Sped up converge times by using multi-package installs when available
  • Added Chefspec matchers
  • Removed a duplicate package that was causing warnings on Chef 12 / failures on Chef 13
  • Ensured that multi-package installs would continue on Amazon Linux with Chef 13
  • Removed some fragile and unnecessary code that checked to see if we were on Chef 12+
  • Switched testing to Delivery local mode and removed all test gems from the Gemfile.
  • Added a skeleton Chefspec test suite
  • Updated to more modern Ruby versions to test with

[1.0.0] - 016-07-18

  • This cookbook has been moved under the chef-rbenv Github organization to allow for additional committers and further maintenance
  • The cookbook now requires Chef 12 due to the use of multi-package installations
  • Existing lists of package dependencies have been updated to match those on the ruby-build wiki. This removes several runtime dependencies such as readline, zlib, and subversion

Additional Changes

  • Added support for installing Rubinius dependencies when installing Rubinius
  • Added dependency installation on OS X machines
  • Added support for FreeBSD
  • Added a dependency on yum-epel when on RHEL
  • Added Travis CI integration testing using kitchen-dokken and inspec
  • Added cookstyle for Ruby linting and resolved all warnings
  • Updated the ruby-build Github URL to the new location
  • Switched package dependency logic to use platform_family which supports additional derivative distros
  • Add source_url, issues_url, and chef_version metadata to metadata.rb
  • Updated the LWRP to use use_inline_resources for proper update notifications
  • Added a Chef 11+ style default_action to the LWRP
  • Updated attribute file to use default instead of node.set which avoids deprecation warnings
  • Updated the Berksfile to use Supermarket
  • Updated the Gemfile with the latest testing dependencies
  • Added the Apache 2.0 license file
  • Updated readme to remove HTML tables that don't render in Supermarket
  • Swapped the Rakefile for the standard Chef Rakefile

[0.8.0] - 2013-05-22

  • Pull request #8: Remove libyaml-devel pkg dependency for Red Hat family platforms. (@fnichol)
  • Pull request #9: Use the HTTPS clone URL. (@adammck)
  • Pull request #10: Use old-form notifies to support AWS OpsWorks. (@tsabat)
  • Issue #7: Install Git package(s) only if Git is not previously installed. (@fnichol, @ChrisLundquist)
  • Convert project from Jamie to Test Kitchen. (@fnichol)

[0.7.2] - 2012-12-31

  • Fix missing package dependencies for C Ruby versions on RHEL family. (@fnichol)
  • Print Ruby build time to :info logger (formerly :debug). (@fnichol)
  • Add integration tests for commonly installed Ruby versions. (@fnichol)

[0.7.0] - 2012-11-21

  • Add environment attr to ruby_build_ruby. This allows for adding custom compilation flags, as well as newer ruby-build environment variables, such as RUBY_BUILD_MIRROR_URL. (@fnichol)
  • Update foodcritic configuration and update .travis.yml. (@fnichol)
  • Update Installation section of README (welcome Berkshelf). (@fnichol)

[0.6.2] - 2012-05-03

  • Fix ruby_build_ruby LWRP now notifies when updated (FC017). (@fnichol)
  • Fix Add plaform equivalents in default attrs (FC024). (@fnichol)
  • Fix JRuby requires make package on Ubuntu/Debian. (@fnichol)
  • Ensure Chef::Config[:file_cache_path] exists in solo mode. (@fnichol)
  • Add TravisCI to run Foodcritic linter. (@fnichol)
  • Reorganize README with section links. (@fnichol)

[0.6.0] - 2011-12-10

The initial release.

Collaborator Number Metric
            

1.3.0 passed this metric

Contributing File Metric
            

1.3.0 passed this metric

Foodcritic Metric
            

1.3.0 passed this metric

No Binaries Metric
            

1.3.0 passed this metric

Testing File Metric
            

1.3.0 passed this metric

Version Tag Metric
            

1.3.0 passed this metric