-
-
Notifications
You must be signed in to change notification settings - Fork 2k
#requires_sudo? logic with read-only files #3092
Comments
IIRC, git gems need to be writable. I believe (although I haven't checked) that it would be okay to do non-install commands like bundle exec for Gemfiles that don't contain git gems when the other gems are read only. That might be possible to allow without any big changes. On Thu, Jul 10, 2014 at 7:15 PM, pmahoney [email protected]
|
Can you clarify what you mean by "git gems need to be writeable"? Do you mean at run-time ("bundle exec") as opposed to install-time? I've not thoroughly tested things, but I am definitely able to run several good sized Rails apps with read-only gems and read-only git gems. I've been thinking about this a bit more. I see (in git.rb) the |
That seems like a reasonable approach to me. On Jul 11, 2014, at 8:53 PM, pmahoney [email protected] wrote:
|
Best I could do: #3097 |
I install gems into a user-writeable directory. Then I make this directory read-only for running my app (*). This trips up
#requires_sudo?
, which assumes sudo is required, and later the wrong path forgit
sources is used: git.rb:83.When I run
bundle show
, I get the error:(though if I remove
sudo
from$PATH
, or otherwise change the logic of#requires_sudo?
, everything works fine.)I'm not sure what I'd expect bundler to do in the ideal case. There are many times I want to use
bundle exec
orrequire bundler/setup
at a point where I actively do not want bundler to be installing anything, so it doesn't make sense to perform the "sudo" test. However I see that if gems were installed intouser_bundler_path
, then the "sudo" test would be needed to find them at runtime.(*) I'm experimenting with ways to manage gems with nix package manager, but that should be irrelevant in this case, though it makes its packages' files read-only.
The text was updated successfully, but these errors were encountered: