ruby-on-rails – zip/zip(LoadError) – Breaking or rails 4.0

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – zip/zip(LoadError) – Breaking or rails 4.0前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我刚刚添加了gem’carrierwave’,它正在破坏护栏4.0.我添加rubyzip gem,但它无法解决问题.我无法再运行任何测试,我无法弄清楚如何解决这个问题.

后卫 – 德布格

19:11:40 - DEBUG - Command execution: growlnotify --version
19:11:40 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
19:11:40 - INFO - Guard is using TerminalTitle to send notifications.
19:11:40 - DEBUG - Command execution: hash stty
19:11:40 - DEBUG - Guard starts all plugins
19:11:40 - DEBUG - Hook :start_begin executed for Guard::Spork
19:11:40 - DEBUG - Command execution: ps aux | grep -v guard | awk '/spork/&&!/awk/{print $2;}'
19:11:40 - DEBUG - Killing Spork servers with PID: 
19:11:40 - INFO - Starting Spork for RSpec
19:11:40 - DEBUG - guard-spork command execution: ["exec","spork","-p","8989"]
Using RSpec,Rails
Preloading Rails environment
cannot load such file -- zip/zip (LoadError)
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver/common/zipper.rb:1:in `require'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver/common/zipper.rb:1:in `<top (required)>'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver/common.rb:9:in `require'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver/common.rb:9:in `<top (required)>'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver.rb:29:in `require'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver.rb:29:in `<top (required)>'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.0.0/lib/selenium-webdriver.rb:1:in `require'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.0.0/lib/selenium-webdriver.rb:1:in `<top (required)>'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/Volumes/Khaya/pumula/config/application.rb:7:in `<top (required)>'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/bundler/gems/spork-rails-3224f84d8c31/lib/spork/app_framework/rails.rb:49:in `require'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/bundler/gems/spork-rails-3224f84d8c31/lib/spork/app_framework/rails.rb:49:in `preload_rails'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/bundler/gems/spork-rails-3224f84d8c31/lib/spork/app_framework/rails.rb:7:in `preload'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/spork-1.0.0rc3/lib/spork/test_framework.rb:134:in `block in preload'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/spork-1.0.0rc3/lib/spork.rb:62:in `exec_prefork'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/spork-1.0.0rc3/lib/spork/test_framework.rb:120:in `preload'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/spork-1.0.0rc3/lib/spork/run_strategy/forking.rb:25:in `preload'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/spork-1.0.0rc3/lib/spork/runner.rb:74:in `run'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/spork-1.0.0rc3/lib/spork/runner.rb:10:in `run'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/gems/spork-1.0.0rc3/bin/spork:10:in `<top (required)>'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/bin/spork:23:in `load'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/bin/spork:23:in `<main>'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
/Users/vezu/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'

的Gemfile

source 'https://rubygems.org'
gem 'rails','4.0.0'
gem 'pg'
group :development,:test do
  gem 'rspec-rails','2.13.1'
  gem 'guard-rspec','2.5.0'
  gem 'spork-rails',github: 'sporkrb/spork-rails'
  gem 'guard-spork','1.5.0'
  gem 'childprocess','0.3.9'
  gem 'factory_girl_rails','>= 4.2.0'
end
group :test do
  gem 'selenium-webdriver','2.0.0'
  gem 'capybara','2.1.0'
  gem 'growl','1.0.3'
end
group :development do
  gem 'better_errors'
  gem 'binding_of_caller'
  gem 'Meta_request'
end
gem 'sass-rails','~> 4.0.0'
gem 'anjlab-bootstrap-rails','>= 3.0.0.0',:require => 'bootstrap-rails'
gem 'uglifier','>= 1.3.0'
gem 'coffee-rails','~> 4.0.0'
gem 'jquery-rails'
gem 'cocoon',:git => 'git://github.com/nathanvda/cocoon'
gem 'simple_form','~> 3.0.0.rc'
gem 'country_select'
gem 'friendly_id','5.0.0.beta4' # Note: You MUST use 5.0.0 or greater for Rails 4.0+   
gem 'figaro'
gem 'devise',github: 'plataformatec/devise',branch: 'rails4'
gem 'rolify'
gem 'cancan'
gem 'stripe'
gem 'stripe_event'
gem 'carrierwave'
gem 'rmagick','2.13.2'
gem 'fog'
group :production do
  gem 'rails_12factor','0.0.2'
end
gem 'turbolinks'

logo_uploader.rb

**# encoding: utf-8

class logoUploader < CarrierWave::Uploader::Base
  include CarrierWave::RMagick

  def store_dir
    "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
  end

  version :thumb do
    process :resize_to_fill => [200,200]
  end

  def cache_dir
    "#{Rails.root}/tmp/uploads"
  end

end**

解决方法

我需要更新gem’selenium-webdriver’,’2.0.0’到gem’selenium-webdriver’,’〜> 2.35.1’并且问题都消失了.

类似的问题ruby on rails tutorial section 3.2 rspec testing error

原文链接:https://www.f2er.com/ruby/267774.html

猜你在找的Ruby相关文章