Closed renich closed 2 years ago
Hi, thanks for your contribution.
I am not sure why is this needed. With Fedora's Ruby, gems are automatically installing "locally" for a user as opposed to system-wide.
I am also not sure about the bin path. When I install a gem (e.g. rspec) in a "fresh install" RubyGems generates executables that run the gem into the ~/bin/
directory and we do not need to add that into $PATH
, default bashrc from the bash
package has these lines included:
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
IOW the directory that the gem executables end up in is already handled. But I am not sure if it is handled by other shells.
Interesting thing: if you create/have a $HOME/.gemrc
(empty one suffices), suddenly gems want to get installed system-wide. And the binpath is also different for --user-install
under those circumstances...
Interesting thing: if you create/have a
$HOME/.gemrc
(empty one suffices), suddenly gems want to get installed system-wide. And the binpath is also different for--user-install
under those circumstances...
I was just going to check that.
What do we do?
What do we do?
To me, this seems like a bug, since we are not overriding the install
options.
Reporting this in Bugzilla against Fedora Ruby would be a start.
I am one of maintainers of Fedora Ruby, I can report it and take a look later.
As to this PR's content, this does not seem like a bad idea.
I think that the more appropriate section would be IMO gems-installation.md
as that part deals with gems.
And adjusting RubyGems behavior might be desirable whether you are running Ruby installed through DNF or rbenv or whatnot.
OK. I will move it to that then.
:S I got lost as well...
Of course @jackorp. Sorry, I got lost with all the changes, heh. I'll fix it right away.
LGTM. Thanks!
Added a method of asking rubygem to install it's gems to the user directory by default. Also added a suggestion to add the bin directory to the user's PATH.