cookbook 'chef_ruby', '~> 2.2.1'
chef_ruby (2) Versions 2.2.1 Follow4
Installs Ruby 1.9 from source
cookbook 'chef_ruby', '~> 2.2.1', :supermarket
knife supermarket install chef_ruby
knife supermarket download chef_ruby
chef_ruby
Installs Ruby 1.9.x from source.
Acknowledgements
RVM in conjunction with Chef is shit.
Cookbook Requirements
- apt
- build-essential
Attributes
-
default[:chef_ruby][:version] = "1.9.3-p194"
: string containing the ruby version you want to install. -
default[:chef_ruby][:rubygems][:version] = "1.8.25"
: string containing the rubygems version you want to install.
Recipes
-
default
: installs Ruby from source.
Usage
When setting up a system for the first time, Ohai will profile it and then store the ruby directory as /opt/chef/embedded/lib/ruby
.
This attribute (normally referenced in cookbooks as languages[:ruby][:gems_dir]
) does not get reset automatically when a new Ruby is
installed. The default recipe tells Ohai to reload its attributes. Adding this block to any recipe that uses the attribute languages[:ruby][:gems_dir]
;
then, whenever Ohai reloads its attributes, your cookbook will also reload its attributes.
ruby_block "reload_ruby" do block do node.load_attribute_by_short_filename('<filename of attributes, eg default>', '<name of cookbook that contains the attributes>') end action :nothing subscribes :create, "ohai[reload]", :immediately end
Legal
This cookbook was originally written by Carlo Zottmann but he seems to have stopped maintaining it. Now it is maintained
by Lytro.
* Written by Anuj Biyani for Lytro
* Liability in case of anything: definitely not me.
* License: WTFPL.
Collaborator Number Metric
2.2.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
2.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
2.2.1 failed this metric
FC064: Ensure issues_url is set in metadata: chef_ruby/metadata.rb:1
FC065: Ensure source_url is set in metadata: chef_ruby/metadata.rb:1
FC066: Ensure chef_version is set in metadata: chef_ruby/metadata.rb:1
FC121: Cookbook depends on cookbook made obsolete by Chef 14: chef_ruby/metadata.rb:1
FC122: Use the build_essential resource instead of the recipe: chef_ruby/recipes/default.rb:2
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
2.2.1 passed this metric
Testing File Metric
2.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.2.1 failed this metric
2.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
2.2.1 failed this metric
FC064: Ensure issues_url is set in metadata: chef_ruby/metadata.rb:1
FC065: Ensure source_url is set in metadata: chef_ruby/metadata.rb:1
FC066: Ensure chef_version is set in metadata: chef_ruby/metadata.rb:1
FC121: Cookbook depends on cookbook made obsolete by Chef 14: chef_ruby/metadata.rb:1
FC122: Use the build_essential resource instead of the recipe: chef_ruby/recipes/default.rb:2
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
2.2.1 passed this metric
Testing File Metric
2.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.2.1 failed this metric
FC065: Ensure source_url is set in metadata: chef_ruby/metadata.rb:1
FC066: Ensure chef_version is set in metadata: chef_ruby/metadata.rb:1
FC121: Cookbook depends on cookbook made obsolete by Chef 14: chef_ruby/metadata.rb:1
FC122: Use the build_essential resource instead of the recipe: chef_ruby/recipes/default.rb:2
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
2.2.1 passed this metric
Testing File Metric
2.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.2.1 failed this metric
2.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number