gem.installed with rdoc & ri false fails due to those args being removed from gem
See original GitHub issueDescription of Issue/Question
It appears that the --no-rdoc
and --no-ri
options have been entirely removed from gem. This means that if you leave rdoc
and ri
options blank the default of False no longer works because those aren’t options any more.
If you set them both to true then it’s ok because the --no
options are removed from the cmd line execution & gem.installed works fine.
I routinely update the system gems for ruby, so this is probably something which doesn’t occur mainstream unless you do that, in particular I think it’s a rubygems > 3 issue (perhaps)
If not:
----------
ID: backup pkg install
Function: gem.installed
Name: backup
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1905, in call
**cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1830, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/states/gem.py", line 108, in installed
source=source):
File "/usr/lib/python2.7/dist-packages/salt/modules/gem.py", line 136, in install
runas=runas)
File "/usr/lib/python2.7/dist-packages/salt/modules/gem.py", line 64, in _gem
raise CommandExecutionError(ret['stderr'])
CommandExecutionError: ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --no-rdoc
Started: 23:50:09.745738
Duration: 1134.74 ms
Changes:
Setup
A simple example is:
backup pkg install:
gem.installed:
- name: backup
- version: 4.3.0
Steps to Reproduce Issue
Versions Report
Salt Version:
Salt: 2018.3.2
Dependency Versions:
cffi: 1.11.5
cherrypy: Not Installed
dateutil: 2.4.2
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.3
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.12 (default, Nov 12 2018, 14:36:49)
python-gnupg: 0.3.8
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
locale: UTF-8
machine: x86_64
release: 4.4.0-134-generic
system: Linux
version: Ubuntu 16.04 xenial
Of more interest though is:
vagrant@postgres01:~$ ruby --version
ruby 2.3.8p459 (2018-10-18 revision 65136) [x86_64-linux-gnu]
vagrant@postgres01:~$ gem --version
3.0.2
vagrant@postgres01:~$ gem list | grep rubygems
rubygems-update (3.0.2)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Gem install wrong number of arguments (given 4, expected 1)
Psych Gem was the culprit in my case; uninstalling psych before running any bundler/gem commands fixed it for me: Before: $ bundle update...
Read more >Command Reference - RubyGems Guides
The check command can list and repair problems with installed gems and specifications and will clean up gems that have been partially uninstalled....
Read more >class Gem::ConfigFile - Documentation for Ruby 3.2
gemrc is a YAML file that uses strings to match gem command arguments and symbols to match RubyGems options. Gem command arguments use...
Read more >config_file.rb - Apple Open Source
gemrc is a YAML file that uses strings to match gem command arguments and ... default arguments: # # install: --no-rdoc --no-ri #...
Read more >RVM not picking up /etc/gemrc - Server Fault
The reason is that you're supposed to use the name of the command you want to add those arguments to, not gem ....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sure, I’ll have a go at it first thing next week.
i see the code from that PR in the neon rc tag so it will be included in the neon 3000 release. since the fix is merged in I’ll go ahead and close here, but please let me know if i need to re-open