Json gem conflict


Let’s say chef-client 11.4.4 comes with json gem version 1.5.4

The fog gem depends on json ~> 1.7

The first time using the fog gem in a recipe, it fails with this error:

[2013-05-08T11:08:01-04:00] FATAL: Gem::LoadError:
route53_record[tester4.brabblevideo.com] (route53::client line 7) had an error:
Gem::LoadError: Unable to activate fog-1.11.1, because json-1.5.4 conflicts
with json (~> 1.7)

Then add this to the recipe:

json = gem_package “json” do
version "1.7.7"
action :nothing
json.run_action( :install )

This will get the json gem updated to 1.7.7 . But it is too late for the
chef run to succeed. A second chef run is always required.