Was `NameError` not catching a when the `chef_gem` resource doesn't exist? I don't like just rescuing everything (like a timeout connecting to RubyGems for instance.

Another option here might be for this cookbook to depend on the chef_gem cookbook that either provides the resource to older versions or does nothing on newer versions. Longer term issue though.