# Help with windows\_zipfile resource

**URL:** <https://discourse.chef.io/t/help-with-windows-zipfile-resource/6341>\
**Category:** Chef Infra (archive)\
**Created:** [February 23, 2015, 2:44am UTC](https://discourse.chef.io/t/help-with-windows-zipfile-resource/6341 "2015-02-23T02:44:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_F](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@Chris\_F](https://discourse.chef.io/u/Chris_F)\
**Post date:** [February 23, 2015, 2:44am UTC](https://discourse.chef.io/t/help-with-windows-zipfile-resource/6341/1 "2015-02-23T02:44:57Z")

</div>

My cookbooks ran fine last week. Why are they failing TODAY?

I had another post with problems with windows\_package. Here’s one with windows\_zipfile. I did upgrade to knife-windows 0.8.4. I also found this [https://tickets.opscode.com/browse/COOK-3542](https://tickets.opscode.com/browse/COOK-3542), but this seems like an old report. WT…???

```
============================================================================

```

# ==== Error executing action `unzip` on resource ‘windows\_zipfile[c:\windows\temp chef-client]’ ============================================================================

```
LoadError
---------
cannot load such file -- zip

Cookbook Trace:
---------------
c:/chef/cache/cookbooks/windows/providers/zipfile.rb:90:in `rescue in ensure

```

\_rubyzip\_gem\_installed’  
c:/chef/cache/cookbooks/windows/providers/zipfile.rb:83:in `ensure_rubyzip_g em_installed' c:/chef/cache/cookbooks/windows/providers/zipfile.rb:28:in`block in class\_f  
rom\_file’

```
Resource Declaration:
---------------------
# In c:/chef/cache/cookbooks/db-flexipdb/recipes/install_flexipdb.rb

 38: windows_zipfile "#{node.db_flexipdb.tempdir}" do
 39: source "#{node.db_flexipdb.tempdir}"+"\\"+"#{node.db_flexipdb.flexipd

```

b\_package}"  
40: action :unzip  
41: overwrite true  
42: end  
43:

```
Compiled Resource:
------------------
# Declared in c:/chef/cache/cookbooks/db-flexipdb/recipes/install_flexipdb.r

```

b:38:in `from\_file’

```
windows_zipfile("c:\windows\temp\chef-client") do
  action [:unzip]
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  declared_type :windows_zipfile
  cookbook_name "db-flexipdb"
  recipe_name "install_flexipdb"
  source "c:\\windows\\temp\\chef-client\\FlexIPDB-2.5.0-5.zip"
  overwrite true
end

```

[2015-02-22T21:32:44-05:00] INFO: Running queued delayed notifications before re  
-raising exception

Running handlers:  
[2015-02-22T21:32:44-05:00] ERROR: Running exception handlers  
Running handlers complete  
[2015-02-22T21:32:44-05:00] ERROR: Exception handlers complete  
[2015-02-22T21:32:44-05:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stack  
trace.out  
Chef Client failed. 22 resources updated in 329.556749 seconds  
[2015-02-22T21:32:44-05:00] INFO: Sending resource update report (run-id: 4ceb5b  
4a-9cdc-45c9-8abc-65e7b611ef4a)  
[2015-02-22T21:32:45-05:00] FATAL: LoadError: windows\_zipfile[c:\windows\temp\ch  
ef-client] (db-flexipdb::install\_flexipdb line 38) had an error: LoadError: cann  
ot load such file – zip

C:\Users\Administrator\>

---

<div class="post-metadata">

**Author:** ![Jay\_Mundrawala](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@Jay\_Mundrawala](https://discourse.chef.io/u/Jay_Mundrawala)\
**Post date:** [February 23, 2015, 3:37am UTC](https://discourse.chef.io/t/help-with-windows-zipfile-resource/6341/2 "2015-02-23T03:37:53Z")

</div>

Can I get the version of chef client, the version of the windows cookbook,  
and the stack trace?  
Thanks,  
Jay  
On Feb 22, 2015 6:45 PM, "Fouts, Chris" [Chris.Fouts@sensus.com](mailto:Chris.Fouts@sensus.com) wrote:

> My cookbooks ran fine last week. Why are they failing TODAY?
> 
> I had another post with problems with windows\_package. Here’s one with  
> windows\_zipfile. I did upgrade to knife-windows 0.8.4. I also found this  
> [https://tickets.opscode.com/browse/COOK-3542](https://tickets.opscode.com/browse/COOK-3542), but this seems like an old  
> report. WT…???
> 
> ============================================================================
> 
> ====
> 
> ```
> Error executing action `unzip` on resource
> 
> ```
> 
> 'windows\_zipfile[c:\windows\temp\
> 
> chef-client]'
> 
> ============================================================================
> 
> ====
> 
> ```
> LoadError
> 
> ---------
> 
> cannot load such file -- zip
> 
> Cookbook Trace:
> 
> ---------------
> 
> c:/chef/cache/cookbooks/windows/providers/zipfile.rb:90:in `rescue in
> 
> ```
> 
> ensure
> 
> \_rubyzip\_gem\_installed'
> 
> ```
> c:/chef/cache/cookbooks/windows/providers/zipfile.rb:83:in
> 
> ```
> 
> `ensure\_rubyzip\_g
> 
> em\_installed'
> 
> ```
> c:/chef/cache/cookbooks/windows/providers/zipfile.rb:28:in `block in
> 
> ```
> 
> class\_f
> 
> rom\_file'
> 
> ```
> Resource Declaration:
> 
> ---------------------
> 
> # In c:/chef/cache/cookbooks/db-flexipdb/recipes/install_flexipdb.rb
> 
> 38: windows_zipfile "#{node.db_flexipdb.tempdir}" do
> 
> 39: source
> 
> ```
> 
> "#{node.db\_flexipdb.tempdir}"+"\"+"#{node.db\_flexipdb.flexipd
> 
> b\_package}"
> 
> ```
> 40: action :unzip
> 
> 41: overwrite true
> 
> 42: end
> 
> 43:
> 
> Compiled Resource:
> 
> ------------------
> 
> # Declared in
> 
> ```
> 
> c:/chef/cache/cookbooks/db-flexipdb/recipes/install\_flexipdb.r
> 
> b:38:in `from\_file'
> 
> ```
> windows_zipfile("c:\windows\temp\chef-client") do
> 
> action [:unzip]
> 
> retries 0
> 
> retry_delay 2
> 
> default_guard_interpreter :default
> 
> declared_type :windows_zipfile
> 
> cookbook_name "db-flexipdb"
> 
> recipe_name "install_flexipdb"
> 
> source "c:\\windows\\temp\\chef-client\\FlexIPDB-2.5.0-5.zip"
> 
> overwrite true
> 
> end
> 
> ```
> 
> [2015-02-22T21:32:44-05:00] INFO: Running queued delayed notifications  
> before re
> 
> -raising exception
> 
> Running handlers:
> 
> [2015-02-22T21:32:44-05:00] ERROR: Running exception handlers
> 
> Running handlers complete
> 
> [2015-02-22T21:32:44-05:00] ERROR: Exception handlers complete
> 
> [2015-02-22T21:32:44-05:00] FATAL: Stacktrace dumped to  
> c:/chef/cache/chef-stack
> 
> trace.out
> 
> Chef Client failed. 22 resources updated in 329.556749 seconds
> 
> [2015-02-22T21:32:44-05:00] INFO: Sending resource update report (run-id:  
> 4ceb5b
> 
> 4a-9cdc-45c9-8abc-65e7b611ef4a)
> 
> [2015-02-22T21:32:45-05:00] FATAL: LoadError:  
> windows\_zipfile[c:\windows\temp\ch
> 
> ef-client] (db-flexipdb::install\_flexipdb line 38) had an error:  
> LoadError: cann
> 
> ot load such file -- zip
> 
> C:\Users\Administrator\>

---

<div class="post-metadata">

**Author:** ![Chris\_F](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@Chris\_F](https://discourse.chef.io/u/Chris_F)\
**Post date:** [February 23, 2015, 2:47pm UTC](https://discourse.chef.io/t/help-with-windows-zipfile-resource/6341/3 "2015-02-23T14:47:51Z")

</div>

chef-client v12.0.3  
chef-server v12.0.0  
windows v1.36.1

Here’s the stack trace

c:\chef\cache\>type chef-stacktrace.out  
Generated at 2015-02-22 21:56:35 -0500  
LoadError: windows\_zipfile[c:\windows\temp\chef-client] (db-flexipdb::install\_fl  
exipdb line 38) had an error: LoadError: cannot load such file – zip  
C:/opscode/chef/embedded/lib/ruby/site\_ruby/2.0.0/rubygems/core\_ext/kernel\_requi  
re.rb:54:in `require' C:/opscode/chef/embedded/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requi re.rb:54:in`require’  
c:/chef/cache/cookbooks/windows/providers/zipfile.rb:90:in `rescue in ensure_rub yzip_gem_installed' c:/chef/cache/cookbooks/windows/providers/zipfile.rb:83:in`ensure\_rubyzip\_gem\_i  
nstalled’  
c:/chef/cache/cookbooks/windows/providers/zipfile.rb:28:in `block in class_from_ file' C:/opscode/chef/embedded/apps/chef/lib/chef/provider/lwrp_base.rb:138:in`instan  
ce\_eval’  
C:/opscode/chef/embedded/apps/chef/lib/chef/provider/lwrp\_base.rb:138:in `block in action' C:/opscode/chef/embedded/apps/chef/lib/chef/provider.rb:149:in`run\_action’  
C:/opscode/chef/embedded/apps/chef/lib/chef/resource.rb:582:in `run_action' C:/opscode/chef/embedded/apps/chef/lib/chef/runner.rb:49:in`run\_action’  
C:/opscode/chef/embedded/apps/chef/lib/chef/runner.rb:81:in `block (2 levels) in converge' C:/opscode/chef/embedded/apps/chef/lib/chef/runner.rb:81:in`each’  
C:/opscode/chef/embedded/apps/chef/lib/chef/runner.rb:81:in `block in converge' C:/opscode/chef/embedded/apps/chef/lib/chef/resource_collection/resource_list.rb :83:in`block in execute\_each\_resource’  
C:/opscode/chef/embedded/apps/chef/lib/chef/resource\_collection/stepable\_iterato  
r.rb:116:in `call' C:/opscode/chef/embedded/apps/chef/lib/chef/resource_collection/stepable_iterato r.rb:116:in`call\_iterator\_block’  
C:/opscode/chef/embedded/apps/chef/lib/chef/resource\_collection/stepable\_iterato  
r.rb:85:in `step' C:/opscode/chef/embedded/apps/chef/lib/chef/resource_collection/stepable_iterato r.rb:104:in`iterate’  
C:/opscode/chef/embedded/apps/chef/lib/chef/resource\_collection/stepable\_iterato  
r.rb:55:in `each_with_index' C:/opscode/chef/embedded/apps/chef/lib/chef/resource_collection/resource_list.rb :81:in`execute\_each\_resource’  
C:/opscode/chef/embedded/apps/chef/lib/chef/runner.rb:80:in `converge' C:/opscode/chef/embedded/apps/chef/lib/chef/client.rb:315:in`converge’  
C:/opscode/chef/embedded/apps/chef/lib/chef/client.rb:400:in `block in run' C:/opscode/chef/embedded/apps/chef/lib/chef/client.rb:399:in`catch’  
C:/opscode/chef/embedded/apps/chef/lib/chef/client.rb:399:in `run' C:/opscode/chef/embedded/apps/chef/lib/chef/application.rb:243:in`run\_with\_grac  
eful\_exit\_option’  
C:/opscode/chef/embedded/apps/chef/lib/chef/application.rb:220:in `block in run_ chef_client' C:/opscode/chef/embedded/apps/chef/lib/chef/local_mode.rb:38:in`with\_server\_con  
nectivity’  
C:/opscode/chef/embedded/apps/chef/lib/chef/application.rb:201:in `run_chef_clie nt' C:/opscode/chef/embedded/apps/chef/lib/chef/application/client.rb:355:in`block  
in interval\_run\_chef\_client’  
C:/opscode/chef/embedded/apps/chef/lib/chef/application/client.rb:345:in `loop' C:/opscode/chef/embedded/apps/chef/lib/chef/application/client.rb:345:in`interv  
al\_run\_chef\_client’  
C:/opscode/chef/embedded/apps/chef/lib/chef/application/client.rb:335:in `run_ap plication' C:/opscode/chef/embedded/apps/chef/lib/chef/application.rb:58:in`run’  
C:/opscode/chef/embedded/apps/chef/bin/chef-client:26:in `<top (required)>' C:/opscode/chef/bin/chef-client:52:in`load’  
C:/opscode/chef/bin/chef-client:52:in `'  
c:\chef\cache\>

From: Jay Mundrawala [[mailto:jdm@getchef.com](mailto:jdm@getchef.com)]  
Sent: Sunday, February 22, 2015 10:38 PM  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: Help with windows\_zipfile resource

Can I get the version of chef client, the version of the windows cookbook, and the stack trace?  
Thanks,  
Jay  
On Feb 22, 2015 6:45 PM, “Fouts, Chris” \<[Chris.Fouts@sensus.com](mailto:Chris.Fouts@sensus.com)[mailto:Chris.Fouts@sensus.com](mailto:Chris.Fouts@sensus.com)\> wrote:  
My cookbooks ran fine last week. Why are they failing TODAY?

I had another post with problems with windows\_package. Here’s one with windows\_zipfile. I did upgrade to knife-windows 0.8.4. I also found this [https://tickets.opscode.com/browse/COOK-3542](https://tickets.opscode.com/browse/COOK-3542), but this seems like an old report. WT…???

```
============================================================================

```

# ==== Error executing action `unzip` on resource ‘windows\_zipfile[c:\windows\temp chef-client]’ ============================================================================

```
LoadError
---------
cannot load such file -- zip

Cookbook Trace:
---------------
c:/chef/cache/cookbooks/windows/providers/zipfile.rb:90:in `rescue in ensure

```

\_rubyzip\_gem\_installed’  
c:/chef/cache/cookbooks/windows/providers/zipfile.rb:83:in `ensure_rubyzip_g em_installed' c:/chef/cache/cookbooks/windows/providers/zipfile.rb:28:in`block in class\_f  
rom\_file’

```
Resource Declaration:
---------------------
# In c:/chef/cache/cookbooks/db-flexipdb/recipes/install_flexipdb.rb

 38: windows_zipfile "#{node.db_flexipdb.tempdir}" do
 39: source "#{node.db_flexipdb.tempdir}"+"\\"+"#{node.db_flexipdb.flexipd

```

b\_package}"  
40: action :unzip  
41: overwrite true  
42: end  
43:

```
Compiled Resource:
------------------
# Declared in c:/chef/cache/cookbooks/db-flexipdb/recipes/install_flexipdb.r

```

b:38:in `from\_file’

```
windows_zipfile("c:\windows\temp\chef-client") do
  action [:unzip]
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  declared_type :windows_zipfile
  cookbook_name "db-flexipdb"
  recipe_name "install_flexipdb"
  source "c:\\windows\\temp\\chef-client\\FlexIPDB-2.5.0-5.zip"
  overwrite true
end

```

[2015-02-22T21:32:44-05:00] INFO: Running queued delayed notifications before re  
-raising exception

Running handlers:  
[2015-02-22T21:32:44-05:00] ERROR: Running exception handlers  
Running handlers complete  
[2015-02-22T21:32:44-05:00] ERROR: Exception handlers complete  
[2015-02-22T21:32:44-05:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stack  
trace.out  
Chef Client failed. 22 resources updated in 329.556749 seconds  
[2015-02-22T21:32:44-05:00] INFO: Sending resource update report (run-id: 4ceb5b  
4a-9cdc-45c9-8abc-65e7b611ef4a)  
[2015-02-22T21:32:45-05:00] FATAL: LoadError: windows\_zipfile[c:\windows\temp\ch  
ef-client] (db-flexipdb::install\_flexipdb line 38) had an error: LoadError: cann  
ot load such file – zip

C:\Users\Administrator\>
