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

Support ".ruby-version" as fallback for Ruby version #568

Closed
FranklinYu opened this issue May 21, 2017 · 1 comment
Closed

Support ".ruby-version" as fallback for Ruby version #568

FranklinYu opened this issue May 21, 2017 · 1 comment

Comments

@FranklinYu
Copy link

FranklinYu commented May 21, 2017

Currently if Ruby version is not specified in Gemfile, it fallback to default version (2.3.4 currently). See this Gist for description of .ruby-version file. Currently my .ruby-version looks like ruby-2.4.1.

I think this method is related.

@schneems
Copy link
Contributor

schneems commented May 22, 2017

This isn't the place for that functionality. We get our Ruby version from Bundler. The best way to do it would have bundle update --ruby also generate a .ruby-version that you can use locally. Or alternatively have ruby version managers that do switching read in the version from Gemfile.lock, actually that would be better.

That being said you can build this yourself with:

# Gemfile
ruby File.read(".ruby-version")

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