[chef] RVM cookbook


Chronological Thread 
  • From: Nikhil Shah < >
  • To: " " < >
  • Subject: [chef] RVM cookbook
  • Date: Wed, 30 Jul 2014 22:55:56 -0400

Hey guys,

Hope this email finds you well. I am having a bit of a hard time implementing the RVM cookbook. Essentially I want to have the following:


\curl -L https://get.rvm.io | bash -s stable --ruby

source ~/.rvm/scripts/rvm

rvm requirements

rvm install ruby 2.1.1

rvm use ruby --default

rvm rubygems current

gem install bundler




With that said, I am using this cookbook - https://github.com/fnichol/chef-rvm:
"Most likely, this is the typical case. Include recipe[rvm::system] in your run_list and override the defaults you want changed. See below for more details."

So I setup my role as follow:

name "rvm"

description "RVM applied to all linux nodes."

run_list(

  "recipe[rvm::system]"

)



override_attributes(

'rvm' => {

    'rubies' => ['ruby-2.1.1'],

    'default_ruby' => 'ruby-2.1.1',

    'global_gems' => ['bundler', 'rake']

  }

)


When running knife, I get the following: 


Recipe Compile Error in /var/chef/cache/cookbooks/rvm/recipes/system.rb

TypeError: can't convert Symbol into Integer

---------------

/var/chef/cache/cookbooks/rvm/libraries/chef_rvm_recipe_helpers.rb:191:in `[]'

  /var/chef/cache/cookbooks/rvm/libraries/chef_rvm_recipe_helpers.rb:191:in `block in install_rubies'

/var/chef/cache/cookbooks/rvm/libraries/chef_rvm_recipe_helpers.rb:190:in `each'

   /var/chef/cache/cookbooks/rvm/libraries/chef_rvm_recipe_helpers.rb:190:in `install_rubies'

 /var/chef/cache/cookbooks/rvm/recipes/system.rb:29:in `from_file'

Relevant File Content:

----------------------

/var/chef/cache/cookbooks/rvm/libraries/chef_rvm_recipe_helpers.rb:



Any suggestions?


--
Nikhil Shah  System Administrator

THE ORCHARD Distribution Done Right
23 E 4th St Fl 3, New York, NY 10003

Follow us: The Daily Rind  Facebook  Twitter  YouTube  LinkedIn

Privileged And Confidential Communication. This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.



Archive powered by MHonArc 2.6.16.

§