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

legacy version check doesn't support "ruby-2.5.0" format #69

Closed
gouthamvel opened this issue Jul 9, 2018 · 3 comments
Closed

legacy version check doesn't support "ruby-2.5.0" format #69

gouthamvel opened this issue Jul 9, 2018 · 3 comments

Comments

@gouthamvel
Copy link

I'm working on open source projects and they use .ruby-version file with format a bit different from asdf legacy version.

  $ cat .ruby-version
  ruby-2.5.0
  $ ruby -v
  ruby ruby-2.5.0 not installed

it works if I change the content to 2.5.0.

@Stratus3D
Copy link
Member

We will need to update the asdf-ruby code to parse this version format as well. Thanks for reporting this!

@kevinjalbert
Copy link
Contributor

Just wanted to say I ran into the same issue here and stumped me for a little bit. This was for a new Rails 5.2.1 project (so its likely to be a very common issue) as the .ruby-version comes pre-baked like this.

Stratus3D added a commit that referenced this issue Oct 2, 2018
Fix #69 - Filter out 'ruby-' in .ruby-version file
@rmoriz
Copy link
Contributor

rmoriz commented Nov 6, 2018

This does not work for me. Even with the latest asdf and asdf-ruby git repo checked out on zsh.

asdf: commit aa5f7f16800d773d2d1b6c76f323d2047d0db404 (HEAD, tag: v0.6.0)
asdf-ruby: commit b94f282 (HEAD -> master, origin/master, origin/HEAD)

.ruby-version generated by rails with content: ruby-2.5.3:

✗ asdf list ruby    
  2.5.3
✗ cat .ruby-version 
ruby-2.5.3%              
✗ ruby -v
ruby ruby-2.5.3 not installed

I suspect bin/get-version-from-legacy-file is not called at all. I can return or even delete the file without a notable difference.

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

No branches or pull requests

4 participants