Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to access 'zip' gem (or 'rubyzip') in Ruby?
    primarykey
    data
    text
    <p>I must be missing something totally obvious but I can't seem to get the <a href="http://rubygems.org/gems/zip" rel="nofollow">'zip'</a> gem to work. I've installed it with rubygems just like I've done with many other gems. Rubygem says it's there but yet when I try to require it, Ruby says it's not there. I'm experiencing the same problem on both Windows and Linux. Here's a Linux session (extra output removed for brevity):</p> <pre><code>~$ ruby -v ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux] ~$ gem list z ~$ sudo gem install zip Successfully installed zip-2.0.2 ~$ irb irb(main):001:0&gt; require 'zip/zip' LoadError: no such file to load -- zip/zip from (irb):1:in `require' from (irb):1 from :0 </code></pre> <p>And a Windows session:</p> <pre><code>C:\&gt; ruby -v ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32] C:\&gt; gem list z C:\&gt; gem install zip Successfully installed zip-2.0.2 C:\&gt; irb irb(main):001:0&gt; require 'zip/zip' LoadError: no such file to load -- zip/zip from (irb):1:in `require' from (irb):1 </code></pre> <p>I'm thinking perhaps there's some underlying dependency that 'zip' needs but I haven't found anything about that in the docs.</p> <p>I've also had the same lack of success with <a href="http://rubygems.org/gems/rubyzip" rel="nofollow">'rubyzip'</a> It seems that perhaps 'zip' and 'rubyzip' are forks?</p> <p>Any ideas? Or if there's a better gem out there for archiving, I'd love to hear about it. <a href="http://rubygems.org/search?utf8=%E2%9C%93&amp;query=rubyzip" rel="nofollow">The choice of zip archiving gems is confusing.</a> The gem <a href="http://rubygems.org/gems/zippy" rel="nofollow">'Zippy'</a> looks good but it requires 'zip' so I'm still stuck. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload