From: "Eregon (Benoit Daloze)" Date: 2021-10-15T16:25:06+00:00 Subject: [ruby-core:105645] [Ruby master Feature#17760] Where we should install a header file when `gem install --user`? Issue #17760 has been updated by Eregon (Benoit Daloze). byroot (Jean Boussier) wrote in #note-8: > But then I suppose them that compile against `digest.h` would also need to know where to look, I'm really unsure how it's supposed to work. If I have 5 different versions of digest, which one should I compile against? Because digest is a default gem, I think there is a simple answer here: latest version wins. That's the behavior of default gems, if you `gem install some_default_gem`, RubyGems will then always use that version (instead of the version shipped with Ruby). When using bundler, I'd think it's possible to choose an explicit version, and bundler would resolve which one is used. Probably RubyGems and/or Bundler need to set CPATH to the header is found (seems better), or we need some explicit API in RubyGems and/or mkmf for a gem to ask headers for another gem (seems bad as then we have the version problem). ---------------------------------------- Feature #17760: Where we should install a header file when `gem install --user`? https://bugs.ruby-lang.org/issues/17760#change-94135 * Author: mrkn (Kenta Murata) * Status: Third Party's Issue * Priority: Normal ---------------------------------------- As `digest` have been made a default gem at Ruby 3.0, it can be installed by `gem install` command. When we install `digest`, `digest.h` is installed at the same directory as `ruby.h`. But when we use `gem install --user` for installing it, where should `digest.h` is installed in? Now, the location of `digest.h` is always the same directory as `ruby.h` regardless of whether we use `gem install --user`. It occurs permission error when non-root user uses `gem install --user` for installing `digest` on the system-ruby. -- https://bugs.ruby-lang.org/ Unsubscribe: