Native gem compilation tries to mkdir in my ruby install dir
I'm trying to install with a ruby that I installed with nix. That means my ruby directory is read-only. I have a $GEM_HOME set to a writable location, and this works for other gems, even ones with naive extensions.
Here is the error I'm seeing
/nix/store/5r457z5rhswr14y86w5xg5mahv23xdb9-ruby-2.7.6/lib/ruby/2.7.0/fileutils.rb:250:in `mkdir': Permission denied @ dir_s_mkdir -
/nix/store/5r457z5rhswr14y86w5xg5mahv23xdb9-ruby-2.7.6/lib/ruby/site_ruby/2.7.0/arm64-darwin21/seven_zip_ruby (Errno::EACCES)
Very interestingly, I only see this error on ruby 2.7.6 and not ruby 2.7.3.
I'm not an expert on rubygems, but I am very surprised that this gem is trying to write anywhere other than $GEM_HOME
Even more weird, SO_TARGET_DIR = File.expand_path(File.join(RbConfig::CONFIG["sitearchdir"], "seven_zip_ruby")) is the same in both versions of ruby (well, not identical, since the rubies are at different paths. But in both cases they point to the nix store, which shouldn't be writable). Still searching for whats different between the two rubies.