Skip to content

Rbenv default ruby issue on install #1699

Closed

Description

@abuxton

I am trying to install MDL v0.11.0

i get the following error during install

pre-commit
[INFO] Installing environment for git://github.com/markdownlint/markdownlint.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/usr/local/bin/bash', '/Users/abuxton/.rbenv/shims/gem', 'build', 'mdl.gemspec')
return code: 1
expected return code: 0
stdout: (none)
stderr:
    rbenv: version `default' is not installed (set by RBENV_VERSION environment variable)

seems to be the same issue as #369 on a previous version of pre-commit
pre-commit.log https://gist.github.com/abuxton/d29e6265f3230f838a746d7a5defd5e3

i have tried, ensuring local rbenv, I have tried pre-commit clean/uninstall and reinstall to no success, mdl will brew install mdl successfully and works fine.

Activity

  1. changed the title [-]Rbenv default ruby issue on hook install[/-] [+]Rbenv default ruby issue on install[/+] on Nov 17, 2020
  2. asottile commented on Nov 17, 2020

    @asottile
    Member

    ah yeah, this has regressed because it's difficult to test! pre-commit ~correctly identified that you're using shims globally so it shouldn't necessarily trust that ruby, but then used it anyway 😆 -- this if here needs to also apply to 'default':

    if language_version == 'system':

  3. asottile commented on Nov 17, 2020

    @asottile
    Member

    actually hmm this seems really strange -- pre-commit should still be creating an rbenv shim in that case so my suggested patch above isn't quite correct

  4. asottile commented on Nov 17, 2020

    @asottile
    Member

    @abuxton can you try out the patch in #1700 -- it fixed the case I tried locally but I'm not 100% it solves your usecase

  5. georgealton commented on Nov 18, 2020

    @georgealton

    I had exactly the same issue today in AWS CodeBuild.

    Tried the fix #1700 and it solves it for me.

  6. pbr0ck3r commented on Nov 20, 2020

    @pbr0ck3r

    Now that this has been merged in, when is the next planned package release?

  7. asottile commented on Nov 20, 2020

    @asottile
    Member

    Now that this has been merged in, when is the next planned package release?

    if you look at the release history, nothing is "planned", I maintain this in my free time :) if you or your company depend on this package I'd recommend sponsoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions