From: "byroot (Jean Boussier)" Date: 2021-10-15T11:01:50+00:00 Subject: [ruby-core:105642] [Ruby master Feature#17760] Where we should install a header file when `gem install --user`? Issue #17760 has been updated by byroot (Jean Boussier). Kind of yes. From my understanding the problem is that $INSTALL_FILES always install files in `site_ruby` https://github.com/ruby/digest/blob/1cb6bac1a6732a1415278b94fad2fdc695477dec/ext/digest/extconf.rb#L7-L9 So from my limited understanding I see two ways out of this: - Require that `site_ruby` is user writable (sounds weird) - Have a location defined by rubygems that acts as "user" site ruby. 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? e.g. I have `app1` with `digest 3.0.0` and `app2` with `digest 3.2.0`, both have `somegem-that-link-to-digest`, this means we'd need to compile that gem twice and link against different headers? Seems complicated. Maybe I should put this to the next developers meeting agenda. ---------------------------------------- Feature #17760: Where we should install a header file when `gem install --user`? https://bugs.ruby-lang.org/issues/17760#change-94132 * 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: