pre-commit-hooks icon indicating copy to clipboard operation
pre-commit-hooks copied to clipboard

CalledProcessError: command: ('/usr/bin/ruby', '/usr/bin/gem', 'install', '--no-document', '--no-format-executable', 'fake_gem__-0.0.0.gem')

Open Tronyxsystem opened this issue 5 years ago • 2 comments

Since upgrade ruby v3 I got this error when I try to do git commit/push =>

[INFO] Installing environment for https://github.com/jumanjihouse/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/usr/bin/ruby', '/usr/bin/gem', 'install', '--no-document', '--no-format-executable', 'fake_gem__-0.0.0.gem')
return code: 1
expected return code: 0
stdout: (none)
stderr:
    ERROR:  While executing gem ... (NoMethodError)
        undefined method `request' for nil:NilClass

My .pre-commit-config.yaml =>

---
repos:
 - repo: https://github.com/pre-commit/pre-commit-hooks
   rev: v3.4.0
   hooks:
    - id: trailing-whitespace
    - id: end-of-file-fixer
    - id: check-added-large-files
 - repo: https://github.com/jumanjihouse/pre-commit-hooks
   rev: 2.1.5
   hooks:
    - id: markdownlint
 - repo: https://github.com/adrienverge/yamllint.git
   rev: v1.26.0
   hooks:
    - id: yamllint

Tronyxsystem avatar Apr 23 '21 13:04 Tronyxsystem

The version of ruby may need to be lower than v3.

clownrat6 avatar Jun 11 '21 14:06 clownrat6

I can confirm version 3.0.0 works with ruby 3 and ubuntu 22.04 (docker image)

oNaiPs avatar Sep 19 '22 10:09 oNaiPs