ciao!
ho creato un programmino in ruby che ha funzionato bene fino all'altro giorno, quando il sistema ha aggiornato a ruby 2.3.0.
dopo quell'aggiornamento ottengo questo errore:
codice:
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- zip (LoadError)
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /run/media/matte/MATTE8/Project/Ruby/RubyOnNas/CreateZip.rb:1:in `<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /run/media/matte/MATTE8/Project/Ruby/RubyOnNas/start.rb:1:in `<main>'
questo il file CreateZip.rb:
codice:
require 'zip'
class CreateZip
def compress(path, name)
path.sub!(%r[/$],'')
archive = File.join(path, name) + '.zip'
FileUtils.rm archive, :force=>true
Zip::File.open(archive, 'w') do |zipfile|
Dir["#{path}/**/**"].reject{|f|f==archive}.each do |file|
zipfile.add(file.sub(path+'/',''),file)
end
end
end
end
qualche idea??