Skip to content

Instantly share code, notes, and snippets.

@notnmeyer
Last active October 6, 2015 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notnmeyer/04bc1c0be0e41504cd62 to your computer and use it in GitHub Desktop.
Save notnmeyer/04bc1c0be0e41504cd62 to your computer and use it in GitHub Desktop.
module SomeModule
  class SomeClass
    require "chef/resource/chef_gem"
    Chef::Resource::ChefGem.new("fog").run_action(:install)
    require "fog"
  end
end

will produce:

NoMethodError
-------------
undefined method `events' for nil:NilClass

...

Relevant File Content:
----------------------
/tmp/kitchen/cache/cookbooks/gem-dep/libraries/test.rb:
1: module SomeModule
2: class SomeClass
3: require "chef/resource/chef_gem"
4>> Chef::Resource::ChefGem.new("fog").run_action(:install)
5: require "fog"
6: end
7: end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment