edelight/chef-cookbooks — Issue #22: missing bson_ext gem causes chef run to fail
Author: ctgswallow
Created: 2011-12-15 19:12:56+00:00
State: open

diff --git a/site-cookbooks/mongodb/recipes/default.rb b/site-cookbooks/mongodb/recipes/default.rb
index d107edb..c979a2f 100644
--- a/site-cookbooks/mongodb/recipes/default.rb
+++ b/site-cookbooks/mongodb/recipes/default.rb
@@ -23,6 +23,12 @@ package "mongodb" do
action :install
end

+# This missing gem stops chef.
+gem_package 'bson_ext' do
+ action :nothing
+end.run_action(:install)
+Gem.clear_paths
+
needs_mongo_gem = (node.recipes.include?("mongodb::replicaset") or node.recipes.include?("mongodb::mongos"))

if needs_mongo_gem