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

Rbenv default ruby issue on install #1699

Closed
abuxton opened this issue Nov 17, 2020 · 6 comments
Closed

Rbenv default ruby issue on install #1699

abuxton opened this issue Nov 17, 2020 · 6 comments
Labels

Comments

@abuxton
Copy link

@abuxton abuxton commented Nov 17, 2020

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.

@abuxton abuxton changed the title Rbenv default ruby issue on hook install Rbenv default ruby issue on install Nov 17, 2020
@asottile
Copy link
Member

@asottile asottile commented Nov 17, 2020

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':

@asottile asottile added bug ruby labels Nov 17, 2020
@asottile
Copy link
Member

@asottile asottile commented Nov 17, 2020

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

@asottile
Copy link
Member

@asottile asottile commented Nov 17, 2020

@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

@georgealton
Copy link

@georgealton georgealton commented Nov 18, 2020

I had exactly the same issue today in AWS CodeBuild.

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

@pbr0ck3r
Copy link

@pbr0ck3r pbr0ck3r commented Nov 20, 2020

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

@asottile
Copy link
Member

@asottile asottile commented Nov 20, 2020

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants