I'm trying to use gem_specfic_install
cookbook so I can use the SpecificInstall
provider but chef just doesn't seem to accept it's there.
I've added cookbook 'gem_specific_install', '~> 0.2.4'
to my berksfile
I've added depends 'gem_specific_install'
to my metadata.rb
I've added include_recipe "gem_specific_install"
to my install recipe file
Chef errors no matter which way I use it (as specified here)
What am I doing wrong?
p.s. the reason I'm trying to use this is because I need to install event_machine
gem from it's github repo as that contains a fix that the .gem on rubygems.com doesn't have.
Would it be worth downloading the fixed version, build the .gem file and host it locally or on our artifactory server instead of using specific_install ? EDIT:
It either goes:
[2014-10-27T17:36:16+00:00] FATAL: NoMethodError: undefined method `repository' for Chef::Resource::GemPackage
or
options takes a string not a hash
EDIT: Doesn't really matter any more, managed to fix my problem by using normal gem_package, I realised what I was doing wrong, still I do want to know why specific_install wasn't working.
So if you want to use the repository
attribute, you need to use the gem_specific_install
resource directly instead of gem_package
. I don't think the second form using the options string is actual viable given changes in Chef.