“chef_gem” and  “gem_package” resources are used to install Ruby gems. Every system where Chef Client is installed has two versions of Ruby running. One is a system-wide instance of Ruby and the other is the one available only with Chef Client. “chef_gem” resource is used to install Ruby into Chef Client instance of Ruby and “gem_package” resource to install Ruby into a system-wide instance. gem_package resource has a property called “gem_binary” property that is used by Chef Client to detect the environment settings and then install the gems.       "chef_gem" resource is having all properties and options as that of “gem_package” resource except the “gem_binary” property.”chef_gem” resource always uses “CurrentGemEnvironment” where the Chef Client is running. “chef_gem” resource has additional functions of  Running its actions immediately before the convergence of the node. This allows the gem to be used in the recipe just after it’s installation. Gems are made aware of the changes so that they could be used immediately by running “Gem.clear_paths”.