From 3198bec3e5a7e5fe0acc3f45c8cedccdf173235f Mon Sep 17 00:00:00 2001 From: Peter Burkholder Date: Fri, 13 Mar 2015 10:48:54 -0400 Subject: Using warning suggested by @btm --- lib/chef/provider/package/rubygems.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index 4b37519d6b..434117884b 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -380,10 +380,13 @@ class Chef # Opscode Omnibus - The ruby that ships inside omnibus is only used for Chef # Default to installing somewhere more functional if new_resource.options && new_resource.options.kind_of?(Hash) - msg = "gem_package is for use by the system install of Ruby\n" - msg << "but the Chef Omnibus Ruby has been detected with an options\n" - msg << "hash. Use gem_binary attribute or pass a string of options\n" - msg << "at #{new_resource} from #{new_resource.source_line}" + msg = [ + "Gem options should be passed to gem_package as a string instead of a hash when", + "using this installation of Chef because it runs with its own packaged Ruby. A hash", + "may only be used when installing a gem to the same Ruby installation that Chef is", + "running under. See https://docs.chef.io/resource_gem_package.html for more information.", + "Error raised at #{new_resource} from #{new_resource.source_line}", + ].join("\n") raise ArgumentError, msg end gem_location = find_gem_by_path -- cgit v1.2.1