To use my forked spreadsheet and ruby-ole gems, I add dependencies to my GEMFILE like below.
if !ENV['USE_ORIGINAL_DEPENDENCIES']
['spreadsheet', 'rubyzip', 'ruby-ole'].each do |library|
library_path = File.expand_path("../#{library}", __dir__)
if Dir.exist?(library_path) && !ENV['USE_GITHUB_REPOSITORY']
gem library, path: library_path
else
gem library, git: "https://github.com/taichi-ishitani/#{library}.git"
end
end
end
[!] There was an error while loading `spreadsheet.gemspec`: cannot load such file -- ole/storage
Does it try to require a relative path? That's been removed in Ruby 1.9. Bundler cannot continue.
# from /home/travis/build/rggen/rggen-spreadsheet-loader/vendor/bundle/ruby/2.4.0/bundler/gems/spreadsheet-576264365474/spreadsheet.gemspec:4
# -------------------------------------------
# $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
> require 'spreadsheet'
#
# -------------------------------------------
The spreadsheet.gemspec file loads spreadsheet.rb file to get Spreadsheet::VERSION constant.
The ruby-ole gem is loaded while loading spreadsheet.rb file and then this above error happened.
To fix above error, I created a new file named spreadsheet/version.rb and moved Spreadsheet::VERSION constant from spreadsheet.rb to spreadsheet/version.rb.
Also, I edited spreadsheet.gemspec to load spreadsheet/version.rb instead of spreadsheet.rb.
Hi,
To use my forked
spreadsheet
andruby-ole
gems, I add dependencies to my GEMFILE like below.However, gem installation failed due to following error: https://travis-ci.org/rggen/rggen-spreadsheet-loader/jobs/499367300#L904
The spreadsheet.gemspec file loads spreadsheet.rb file to get
Spreadsheet::VERSION
constant. Theruby-ole
gem is loaded while loading spreadsheet.rb file and then this above error happened.To fix above error, I created a new file named spreadsheet/version.rb and moved Spreadsheet::VERSION constant from spreadsheet.rb to spreadsheet/version.rb. Also, I edited spreadsheet.gemspec to load spreadsheet/version.rb instead of spreadsheet.rb.