Closed ghost closed 6 years ago
I'm not sure I can help without more info about the recipe that you're trying to run - it sounds like there might be an error in that recipe. It also sounds like this might be more of a general Chef question rather than anything specific to knife-oci or OCI, in which case this might be better addressed in other forums.
My recipe looks like
require 'myoci' vol_id = Create_volume.create_vol('muy','FE2s',50)
I'm not familiar with the myoci gem. It sounds like this might not be installed in the gem instance used by chef-client.
mygem is gem which is created by me and i have installed it on client. When i am trying to call mygem using chef-client it's error out whereas when i call using ruby program it's working fine.
Any update?
did you tried call the receipt outside oci environment with Chef? it's more like an environment variable set up issue. And did you have any issue with other gem? Can you create another simple one (just do nothing but to test whether it can locate the gem) to test it out?
Closing, but please re-open if there is more info.
I am trying to run recipe using chef-client -zr "recipe[mycookbook::recipe1] But it is error out with following error: [2017-12-22T18:27:45+05:30] INFO: Storing updated cookbooks/mycookbook/recipes/recipe1.rb in the cache.
================================================================================
Recipe Compile Error in c:/workstation-repo/.chef/local-mode-cache/cache/cookbooks/mycookbook/recipes/recipe1.rb
LoadError
cannot load such file -- myoci
System Info:
chef_version=13.4.19 platform=windows platform_version=6.1.7601 ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32] program_name=C:/opscode/chefdk/bin/chef-client executable=C:/opscode/chefdk/bin/chef-client
Running handlers: [2017-12-22T18:27:45+05:30] ERROR: Running exception handlers Running handlers complete [2017-12-22T18:27:45+05:30] ERROR: Exception handlers complete Chef Client failed. 0 resources updated in 16 seconds [2017-12-22T18:27:45+05:30] FATAL: Stacktrace dumped to c:/workstation-repo/.chef/local-mode-cache/cache/chef-stacktrace.out [2017-12-22T18:27:45+05:30] FATAL: Please provide the contents of the stacktrace .out file if you file a bug report [2017-12-22T18:27:45+05:30] FATAL: LoadError: cannot load such file -- myoci
If i run using ruby command it's working c:>ruby recipe1.rb
but it's not working using chef-client