Find file
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (65 sloc) 4.84 KB
"name": "ruby",
"description": "Installs Ruby and related packages",
"long_description": "= DESCRIPTION:\n\nInstalls Ruby and related packages.\n\n= REQUIREMENTS:\n\n== Platform:\n\nTested on Ubuntu 10.04. Debian and Gentoo should also work fully. CentOS, Red Hat, Fedora and Arch are partially supported.\n\n= ATTRIBUTES:\n\n* +languages[:ruby][:default_version]+ - The Ruby version to install with the ruby recipe and create symlinks for with the symlinks recipe.\n\n= USAGE:\n\nPrevious versions of this cookbook gave you no control over which version of Ruby would be installed. We are now in the middle of an awkward period where you are equally likely to want 1.8 or 1.9. You may even want both. This is now catered for. To install specific versions side-by-side, use the 1.8, 1.9 or 1.9.1 recipes. The ruby recipe will install the version specified by +languages[:ruby][:default_version]+. If you want to do something other than install these packages, the +ruby_packages+ definition is provided as a wrapper around the package resource. Just specify the version number.\n\nFor example, to use the default recipe in a role named \"base\", use 'ruby' in the run list and set the +languages[:ruby][:default_version]+ attribute:\n\n {\n \"name\": \"base\",\n \"description\": \"Base role is applied to all systems\",\n \"json_class\": \"Chef::Role\",\n \"default_attributes\": {\n },\n \"override_attributes\": {\n \"languages\": {\n \"ruby\": {\n \"default_version\": \"1.8\"\n }\n }\n },\n \"chef_type\": \"role\",\n \"run_list\": [\n \"recipe[ruby]\"\n ]\n }\n\nMany scripts, including those provided by Rails, don't ask for a particular version of Ruby such as \"ruby1.8\" and simply look for \"ruby\" instead. Sometimes a symlink is provided and sometimes the executable is simply called \"ruby\" in the first place but generally speaking, it is difficult to predict this behaviour, especially when Ruby Gems is thrown into the mix. The symlinks recipe seeks to relieve you of this headache by creating symlinks for the common executables pointing to the Ruby version specified by +languages[:ruby][:default_version]+. This is also available as a definition called +ruby_symlinks+, which is a wrapper around the link resource. As before, just specify the version number. Non-symlinks will not be overwritten unless you set force to true. You can also set a path other than /usr/bin if necessary.\n\n*IMPORTANT!* Only Ubuntu, Debian and Gentoo support installing a specific Ruby version at all. yum-based distributions install 1.8 by default but require you to give the full package version otherwise. Maybe some magic could be added to Chef? Arch installs 1.9.2 by default but 1.8 is only available from AUR. Additionally, Ubuntu and Debian group 1.9.2 with 1.9.1 while Gentoo lumps all 1.9 releases together.\n\n= LICENSE and AUTHOR:\n\nAuthor:: Joshua Timberman (<>), James Le Cuirot (<>)\n\nCopyright:: 2009-2010, Opscode, Inc; 2010, FindsYou Limited\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
"maintainer": "Opscode, Inc.",
"maintainer_email": "",
"license": "Apache 2.0",
"platforms": {
"centos": [
"redhat": [
"fedora": [
"ubuntu": [
"debian": [
"arch": [
"gentoo": [
"dependencies": {
"recommendations": {
"suggestions": {
"conflicting": {
"providing": {
"replacing": {
"attributes": {
"languages/ruby/default_version": {
"display_name": "Default Ruby version",
"recipes": [
"choice": [
"default": "1.8",
"description": "The Ruby version to install with the ruby recipe and create symlinks for with the symlinks recipe. Unfortunately this setting only works fully on Ubuntu, Debian and Gentoo.",
"calculated": false,
"type": "string",
"required": "optional"
"groupings": {
"recipes": {
"ruby": "Installs Ruby and related packages",
"1.8": "Installs Ruby 1.8 and related packages",
"1.9": "Installs Ruby 1.9 and related packages",
"1.9.1": "Installs Ruby 1.9.1 and related packages",
"symlinks": "Installs symlinks for the default Ruby version"
"version": "0.9.0"