Zip / zip (LoadError) - Destroyer or rails 4.0

I just added the gem 'carrierwave' and it broke the 4.0 safety rails. I added the rubyzip gem, but this will not solve the problem. I can no longer run the tests, and I cannot figure out how to solve this problem.

guard --debug

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** 
+6
source share
3 answers

I needed to update the gem 'selenium-webdriver', '2.0.0 ' to the gem 'selenium-webdriver', '~> 2.35.1 ', and the problem all goes away.

Similar question ruby on rails tutorial section 3.2 rspec testing error

+29
source

Adding gem "zip-zip", "~> 0.1" and gem "rubyzip", "~> 1.0.0" should fix the problem.

+3
source

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.

+2
source

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


All Articles