ruby-on-rails – 鸣鸟 – 没有这样的文件加载拉链/拉链

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 鸣鸟 – 没有这样的文件加载拉链/拉链前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试使用Warbler从我的Rails项目创建一个war文件.

这是我的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"

应用程序在Puma服务器上成功运行(在添加warbler之前).

我刚刚安装了warbler

宝石安装鸣鸟

然后我跑了起来.但是我得到了错误

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

然后我尝试将其添加到Gemfile中,如上所述.即使这样我也会收到错误.我现在也无法启动我的Puma服务器.

我确实安装了rubyzip.

解决方法

RubyZip版本1.0.0更改了几个类名和要求的文件的位置.当您的一个项目依赖项依赖于v1.0.0接口而另一个依赖于v0.9.9接口时,这会引入问题.要解决此问题,请尝试将 zip-zip gem添加到项目中.它使用v0.9.9接口为您的依赖项提供了一个简单的适配器,允许您升级到RubyZip v1.0.0.
原文链接:https://www.f2er.com/ruby/267731.html

猜你在找的Ruby相关文章