cannot load such file -- archive/zip
V01dZer0 opened this issue · 2 comments
when open DownloadController#index, it is said that:
LoadError in DownloadController#index
cannot load such file -- archive/zip
My class:
class DownloadController < ApplicationController
require 'archive/zip'
def index
end
end
Gemfile:
gem 'archive-zip'
i runned 'bundle' in my rails directory:
Resolving dependencies...
Using rake (10.1.0)
Using i18n (0.6.1)
Using multi_json (1.7.7)
Using activesupport (3.2.13)
Using builder (3.0.4)
Using activemodel (3.2.13)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.3)
Using tilt (1.4.1)
Using sprockets (2.2.2)
Using actionpack (3.2.13)
Using mime-types (1.23)
Using polyglot (0.3.3)
Using treetop (1.4.14)
Using mail (2.5.4)
Using actionmailer (3.2.13)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.13)
Using activeresource (3.2.13)
Using io-like (0.3.0)
Using archive-zip (0.6.0)
Using bcrypt-ruby (3.1.1)
Using bundler (1.3.5)
Using cancan (1.6.10)
Using coffee-script-source (1.6.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.3)
Using json (1.8.0)
Using rdoc (3.12.2)
Using thor (0.18.1)
Using railties (3.2.13)
Using coffee-rails (3.2.2)
Using orm_adapter (0.4.0)
Using warden (1.2.3)
Using devise (3.0.0)
Using jquery-rails (3.0.4)
Using rails (3.2.13)
Using sass (3.2.9)
Using sass-rails (3.2.6)
Using sqlite3 (1.3.7)
Using uglifier (2.1.2)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
How does this error comes?
Best regards
It looks like you have everything correctly configured, so my only guess given what you have provided is that the archive-zip gem isn't being included in your application. Make sure that any group or platform filter of which archive-zip may be a member in your Gemfile is loaded by your application.
As a quick hack, you may also write a short controller that simply dumps the content of the load path ($:) so that you can check to see if archive/zip.rb should be located.
It's been over a year without any response. Please feel free to reopen this issue if there is still a problem for which you need assistance.