Warbler - no such file to download zip / zip

I am trying to create a war file from my Rails project using Warbler .

This is my gemfile:

 source 'https://rubygems.org' ruby '1.9.3', :engine => 'jruby', :engine_version => '1.7.4' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.0.0' # Use mysql as the database for Active Record #gem 'mysql2' gem 'jdbc-mysql' gem 'activerecord-jdbcmysql-adapter' # Use SCSS for stylesheets gem 'sass-rails', '~> 4.0.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # Use CoffeeScript for .js.coffee assets and views gem 'coffee-rails', '~> 4.0.0' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby # Use jquery as the JavaScript library gem 'jquery-rails' gem 'jquery-ui-rails' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks gem 'turbolinks' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 1.2' group :doc do # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', require: false end gem 'haml-rails' gem 'chosen-rails' gem "compass-rails", "~> 2.0.alpha.0" gem 'twitter-bootstrap-rails' gem 'less-rails' #gem 'therubyracer' gem 'therubyrhino' gem 'rails-erd' gem 'faker' gem 'devise' gem 'cancan' gem 'kaminari' gem 'paperclip' gem 'remotipart', '~> 1.0' gem 'cancan' gem 'rails_admin' gem 'puma' gem 'rubyzip', :require => 'zip/zip' gem 'warbler' # Use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' # Use unicorn as the app server # gem 'unicorn' # Use Capistrano for deployment # gem 'capistrano', group: :development # Use debugger # gem 'debugger', group: [:development, :test] gem 'gibberish' # gem 'jquery-turbolinks' gem "paper_trail", "~> 3.0.0.beta1" 

The application runs successfully on the Puma server (before adding the warbler).

I just installed warbler using

gem install warbler

Then I launched warble . But I got the error:

 LoadError: no such file to load -- zip/zip require at org/jruby/RubyKernel.java:1054 (root) at /home/stever/.rvm/gems/jruby-1.7.4/gems/warbler-1.3.8/lib/warbler/jar.rb:8 require at org/jruby/RubyKernel.java:1054 (root) at /home/stever/.rvm/gems/jruby-1.7.4/gems/warbler-1.3.8/lib/warbler/task.rb:1 require at org/jruby/RubyKernel.java:1054 (root) at /home/stever/.rvm/gems/jruby-1.7.4/gems/warbler-1.3.8/lib/warbler/task.rb:11 require at org/jruby/RubyKernel.java:1054 (root) at /home/stever/.rvm/gems/jruby-1.7.4/gems/warbler-1.3.8/lib/warbler.rb:1 load at org/jruby/RubyKernel.java:1073 (root) at /home/stever/.rvm/gems/jruby-1.7.4/gems/warbler-1.3.8/lib/warbler.rb:35 eval at org/jruby/RubyKernel.java:1093 (root) at /home/stever/.rvm/gems/jruby-1.7.4/bin/ruby_noexec_wrapper:14 

Then I tried to add it to the Gemfile as above. Even then I get an error. I also can not start my Puma server.

I have rubyzip installed.

+6
source share
2 answers

RubyZip version 1.0.0 changed several class names and the location of the required file. This led to problems when one of the dependencies of your project depends on the v1.0.0 interface, and the other on the v0.9.9 interface. To fix this problem, try adding zip-zip to your project. It provides a simple adapter for your dependencies using the v0.9.9 interface, allowing you to upgrade to RubyZip v1.0.0.

+14
source

this is fixed in warbler 1.4.0.beta2

+1
source

Source: https://habr.com/ru/post/953612/


All Articles