Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With auto-user-install feature, no warning about install directory not being in PATH #7058

Closed
duckinator opened this issue Oct 13, 2023 · 1 comment
Labels

Comments

@duckinator
Copy link
Member

Describe the problem as clearly as you can

If the installation directory isn't in my $PATH, RubyGems doesn't warn me -- but I thought it previously did that.

Did you try upgrading RubyGems?

Using master, as of 8072d99.

Post steps to reproduce the problem

  • Install RubyGems from source (I know 8072d99 is affected).
  • Do not set GEM_HOME.
  • Ensure you don't have write access to the normal install directory.
  • gem install boop

Which command did you run?

gem install boop

What were you expecting to happen?

I expected it to say it defaulted to user installation, then say the bin path isn't writable.

What actually happened?

puppy@orthrus:~$ gem install boop
Defaulting to user installation because default installation directory (/usr/local/lib/ruby/gems/3.1) is not writable.
Fetching boop-0.5.0.gem
Successfully installed boop-0.5.0
1 gem installed
puppy@orthrus:~$ echo $PATH
/home/puppy/.cargo/bin:/home/puppy/bin:/home/puppy/.local/bin:/home/puppy/.gem/ruby/bin:/home/puppy/.npm-global/bin:/home/puppy/go/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
puppy@orthrus:~$

Run gem env and paste the output below

Defaulting to user installation because default installation directory (/usr/local/lib/ruby/gems/3.1) is not writable.
RubyGems Environment:
  - RUBYGEMS VERSION: 3.5.0.dev
  - RUBY VERSION: 3.1.4 (2023-03-30 patchlevel 223) [amd64-freebsd13]
  - INSTALLATION DIRECTORY: /usr/home/puppy/.gem/ruby/3.1
  - USER INSTALLATION DIRECTORY: /home/puppy/.gem/ruby/3.1
  - RUBY EXECUTABLE: /usr/local/bin/ruby31
  - GIT EXECUTABLE: /usr/local/bin/git
  - EXECUTABLE DIRECTORY: /usr/home/puppy/.gem/ruby/3.1/bin
  - SPEC CACHE DIRECTORY: /home/puppy/.local/share/gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /usr/local/etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - amd64-freebsd-13
  - GEM PATHS:
     - /usr/home/puppy/.gem/ruby/3.1
     - /usr/local/lib/ruby/gems/3.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => true
     - :bulk_threshold => 1000
     - "gem" => "--suggestions --no-document"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/puppy/.cargo/bin
     - /home/puppy/bin
     - /home/puppy/.local/bin
     - /home/puppy/.gem/ruby/bin
     - /home/puppy/.npm-global/bin
     - /home/puppy/go/bin
     - /bin
     - /usr/bin
     - /sbin
     - /usr/sbin
     - /usr/local/bin
     - /usr/local/sbin
@duckinator
Copy link
Member Author

Turns out @voxik fixed this in #7100. With that PR, I now get:

puppy@orthrus:~/test$ gem install boop
Defaulting to user installation because default installation directory (/usr/local/lib/ruby/gems/3.1) is not writable.
Fetching boop-0.5.0.gem
WARNING:  You don't have /home/puppy/.local/share/gem/ruby/3.1/bin in your PATH,
          gem executables will not run.
Successfully installed boop-0.5.0
1 gem installed
puppy@orthrus:~/test$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant