I am using a number of gems in my recipes with gem_package such as below:
gem_package ‘faraday’ do
These gem_package statements are located mid recipe and then I have a “require
’faraday’” straight after, so I can start using the gems in the recipe.
This specific recipe is 3rd out of 4 in the run list. When I run it seems to
skip everything until it gets to the gem_package statements . Why is this
happening? I have tried various different methods such as calling
g.run_action(:install) with no luck.
I was originally using chef_gem and read that it causes gems to be installed at
compile time but gem_package also seems to be doing that too.
Behaviour I am looking for is to install the gem at the point in the recipe
where it is being used.
I am new to chef (in windows) and this has got me stumped so appreciate any