title: how to require my library in chef ruby_block
body: <p>I'm developing a cookbook to deploy a simple ROR application. I write an app_helper.rb and put it into the libraries directory of my cookbook, here is the content:</p>
  
  <pre><code>module AppHelper
  
      def self.find_gem
        if File.exists?("/usr/local/rvm/bin/rvm")
          return `/usr/local/rvm/bin/rvm default exec which gem`.chomp
        else
          return "/usr/bin/gem"
        end
      end
    end
  </code></pre>
  
  <p>In the recipes/default.rb, I mix in the above module into Chef::Recipe class</p>
  
  <pre><code>class Chef::Recipe
    include AppHelper
  end
  </code></pre>
  
  <p>As you know, the find_gem function can be called from anywhere of the recipe.</p>
  
  <p>when I'm trying to  use the find_gem function in my ruby_block like this:</p>
  
  <pre><code>ruby_block "find gem" do
     block do
      gem_bin = Chef::Recipe::find_gem
      # or gem_bin = find_gem
    end
  end
  </code></pre>
  
  <p>I got a NoMethodError: undefined method 'find_gem'.</p>
  
  <p>Also try to mix in the module into Chef::Resource::RubyBlock, it doesn't work neither.</p>
  
  <pre><code>class Chef::Resource::RubyBlock
    include AppHelper
  end
  
  ruby_block "find gem" do
     block do
      gem_bin = Chef::Resource::RubyBlock::find_gem
      # or gem_bin = find_gem
    end
  end
  </code></pre>
  
  <p>Is there any way to call the function in the module from the ruby_block?  Or Is there an variable of chef to location the files in the libraries, so that I can be able to require the module in the ruby_block. </p>
  
  <p>Thanks!</p>