cookbook 'ruby_lwrp', '= 0.1.7'
ruby_lwrp (4) Versions 0.1.7 Follow5
Installs chruby and ruby-build to build rubies from source
cookbook 'ruby_lwrp', '= 0.1.7', :supermarket
knife supermarket install ruby_lwrp
knife supermarket download ruby_lwrp
Description
[]('http://img.shields.io/cookbook/v/ruby\_lwrp.svg)
Cookbook ruby_lwrp
builds various versions of ruby and installs them to /opt/rubies
. It uses ruby-build to build and install ruby and chruby for switching between installed ruby versions.
Requirements
Platform:
- Debian
- Ubuntu
Cookbooks:
No dependencies defined
Attributes
-
node['ruby']['chruby']['install_path']
- Defaults to"/opt/chruby"
. -
node['ruby']['chruby']['home_prefix']
- Defaults to"/home"
. -
node['ruby']['chruby']['git_url']
- Defaults to"git://github.com/postmodern/chruby.git"
. -
node['ruby']['chruby']['git_ref']
- Defaults to"master"
. -
node['ruby']['chruby']['install_pkgs']
- Defaults to"%w(make git-core)"
. -
node['ruby']['ruby_build']['install_path']
- Defaults to"/opt/ruby-build"
. -
node['ruby']['ruby_build']['git_url']
- Defaults to"git://github.com/sstephenson/ruby-build.git"
. -
node['ruby']['ruby_build']['git_ref']
- Defaults to"master"
. -
node['ruby']['ruby_build']['install_pkgs']
- Defaults to"%w(build-essential bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev ssl-cert subversion git-core libffi-dev)"
.
Recipes
- ruby_lwrp::default - Includes
ruby_build
andchruby
recipes. - ruby_lwrp::chruby - Installs the Chruby to
/opt/chruby
and prepares Chef toruby_set
the LWRP. - ruby_lwrp::ruby_build - Installs the ruby-build to
/opt/ruby-build
and prepares Chef to useruby_install
LWRP.
LWRP
ruby_install
Actions
-
install: Builds and installs ruby, includes chruby functions via
/etc/profile.d/
.
Attribute Parameters
- definition: This attribute defines ruby version. Should be in ruby-build definition list;
-
prefix: Set install prefix for ruby-build, default is
/opt/rubies
; -
build_ruby: Build ruby from sources via ruby-build.
True
by default. IfFalse
, try to install system ruby package.
ruby_set
Actions
-
set: Install chruby_auto helper to user's
.profile
and create.rubyversion
in user's home directory.
Attribute Parameters
- definition: Name attribute, define ruby version. Should be in ruby-build definition list;
- username: Target user;
-
install_bundler: If
true
, bundler will be installed. Default istrue
.
Usage
You must include recipe[ruby_lwrp::default]
to your run list or via include_recipe
. If you don't want to build ruby or use chruby, you may use recipe[ruby_lwrp::ruby_build]
or recipe[ruby_lwrp::chruby]
recipes.
Example of ruby 1.9.3-p392 setup:
include_recipe 'ruby_lwrp::default'
ruby_install '1.9.3-p392' do
action :install
end
ruby_set '1.9.3-p392' do
action :set
username 'alice'
end
See fixture cookbook in tests/fixtures/cookbooks
.
License and Maintainer
Maintainer:: LLC Express 42 (cookbooks@express42.com)
License:: MIT
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
1.1.7 (Jun 27, 2015)
- (Fix) Fix compatibility with Chef 12.4.0
1.1.6 (Apr 7, 2015)
- (New) switched to lightweight resources
1.1.5 (Mar 5, 2015)
- (New) Rename cookbook name to ruby_lwrp
- (New) switched to heavy resources
Foodcritic Metric
0.1.7 passed this metric
0.1.7 passed this metric