Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in pre-commit run [ERROR: Error installing fake_gem__-0.0.0.gem:] #116

Closed
kaveri-lolge opened this issue Nov 28, 2023 · 4 comments
Closed

Comments

@kaveri-lolge
Copy link

Hello Team,

I'm trying to run pre-commit run -a which fails with below error:

[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: ('/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby', '/usr/bin/gem', 'install', '--no-document', '--no-format-executable', '--no-user-install', '--install-dir', '/Users/kaveri.lolge/.cache/pre-commit/repod4b_9tky/rbenv-system/gems', '--bindir', '/Users/kaveri.lolge/.cache/pre-commit/repod4b_9tky/rbenv-system/gems/bin', 'fake_gem__-0.0.0.gem')
return code: 1
stdout:
    Successfully installed unicode-display_width-1.4.1
    Successfully installed ruby-progressbar-1.13.0
    Successfully installed rainbow-3.1.1
    Successfully installed powerpack-0.1.3
    Successfully installed ast-2.4.2
    Successfully installed parser-2.5.3.0
    Successfully installed parallel-1.23.0
    Building native extensions. This could take a while...
stderr:
    ERROR:  Error installing fake_gem__-0.0.0.gem:
        ERROR: Failed to build gem native extension.

Could you please help me fix this issue?

Thanks

@kaveri-lolge
Copy link
Author

Hello @jumanjiman , could you please help me here? I'm blocked because of this.

@nniehoff
Copy link

This appears to be a duplicate of #88

@kaveri-lolge
Copy link
Author

kaveri-lolge commented Nov 30, 2023

Hey @nniehoff , could you please explain how this appears to be duplicate of mentioned issue??

My Ruby version is ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22] which hasn't upgraded to v3.

My .pre-commit-config.yaml =>

python: python3
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.5.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-added-large-files
      - id: check-merge-conflict
      - id: detect-private-key
      - id: mixed-line-ending
      - id: check-yaml
  - repo: https://github.com/adrienverge/yamllint
    rev: v1.23.0
    hooks:
      - id: yamllint  # Configured in yamllint-config.yml
        name: Check yaml files with yamllint
        entry: yamllint -c yamllint-config.yml
        language: python
        additional_dependencies: ['yamllint']
        types: [yaml]
  - repo: https://github.com/Lucas-C/pre-commit-hooks
    rev: v1.1.7
    hooks:
      - id: forbid-tabs
  - repo: https://github.com/jumanjihouse/pre-commit-hooks
    rev: 2.0.2
    hooks:
      - id: markdownlint  # Configured in .mdlrc

@kaveri-lolge
Copy link
Author

This was fixed after I upgrade the ruby version to ruby 2.7.8p225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants