There is currently an error that is being raised when working on the gem:
[!] There was an error parsing `Gemfile`:
[!] There was an error while loading `zlib.gemspec`: No such file or directory @ rb_sysopen - /Users/colby/Github/zlib/zlib.c. Bundler cannot continue.
# from /Users/colby/Github/zlib/zlib.gemspec:3
# -------------------------------------------
# # frozen_string_literal: true
> source_version = File.open(File.join(__dir__, "zlib.c")) {|f|
# f.gets("\n#define RUBY_ZLIB_VERSION ")
# -------------------------------------------
. Bundler cannot continue.
There is currently an error that is being raised when working on the gem:
This is occurring because of the change in https://github.com/ruby/zlib/commit/c6d8649ebaf8c99c96402094bb648aabe87dc222 which looks for the
zlib.c
extension in the current folder. While this is correct in ruby-src project, this is not in the gem project aszlib.c
lives insideext/zlib
.This PR is adding a fix so that the gemspec can be loaded correctly in both projects by checking which file exists.