Open dmsimard opened 3 years ago
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @None @johanwiren click here for bot help
I am able to reproduce the issue straight from CLI on fedora34:
# /usr/bin/gem install --user-install --no-document pluto
ERROR: Use --install-dir or --user-install but not both
I was confused because I am not specifying --install-dir
but if I check /usr/bin/gem install --help
I see the following at the end:
Defaults:
--both --version '>= 0' --document --no-force
--install-dir /usr/share/gems --lock
So it picks up --install-dir
from the defaults which conflicts with the --user-install
?
Edit: debian 10 also provides a default --install-dir (--install-dir /var/lib/gems/2.5.0
) but yet doesn't reproduce the issue.
I ended up finding that @robertdebock (hi long time no see!) filed this issue before the split out to community.general: https://github.com/ansible/ansible/issues/50434 which suggests a workaround by setting user_install: no
.
This can work but doesn't solve the use case where gems are expected to be installed in the user directory by default so I'll leave this issue opened.
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
Summary
Installing a gem with no arguments (other than
state: present
) yields the errorERROR: Use --install-dir or --user-install but not both
on Fedora 34. Doesn't reproduce on Debian 10. I would test on Debian 11 but cloud images aren't available yet.It is likely due to a change in one of the newer versions of rubygems.
Issue Type
Bug Report
Component Name
gem
Ansible Version
Configuration
Not relevant
OS / Environment
Fedora 34:
Debian 10:
Steps to Reproduce
Expected Results
gem installation should work.
Actual Results
Code of Conduct