Search code examples
ruby-on-railspostgresqlrubygemspostgresql-extensions

ERROR: While executing gem ... (OptionParser::InvalidOption) invalid option: --no-rdoc


While running the command pgxn install pgxn_utils

Getting the error:

INFO: best version: pgxn_utils 0.1.4
INFO: saving /var/folders/kn/b8b9x9yn683cjfkl1xd9jjwh0000gn/T/tmpnb50s2nv/pgxn_utils-0.1.4.zip
INFO: unpacking: /var/folders/kn/b8b9x9yn683cjfkl1xd9jjwh0000gn/T/tmpnb50s2nv/pgxn_utils-0.1.4.zip
INFO: building extension
make: Nothing to be done for `all'.
INFO: installing extension
gem install --no-rdoc --no-ri ./pkg/pgxn_utils-0.1.4.gem
ERROR:  While executing gem ... (OptionParser::InvalidOption)
    invalid option: --no-rdoc
make: *** [install] Error 1
ERROR: command returned 2: make PG_CONFIG=/Users/spartacus/.pgenv/pgsql/bin/pg_config install

How to solve this?


Solution

  • Yeah, so like rdoc and ri options were deprecated in favor of document 12 years ago, and then removed 5 years ago in rubygems 3 (ruby 2.6). pgxn_utils is still using them, and so failing for you.

    Probably you could give them a pull request to update it (and/or just fork it, fix it, and use your fork), or downgrade your ruby to pre 2.6.