bridgetownrb / bridgetown

A next-generation progressive site generator & fullstack framework, powered by Ruby
https://www.bridgetownrb.com
MIT License
1.13k stars 114 forks source link

Add `.ruby-version` to new site repo #468

Closed jaredcwhite closed 2 years ago

jaredcwhite commented 2 years ago

When a new project is created, add the current Ruby version to a new .ruby-version file.

manuelgomes commented 2 years ago

Perhaps including detection of ruby management via asdf as to generate a .tool-versions instead?

While asdf can read .ruby-version given the legacy_version_file = yes configuration, this would make the process entirely seamless for the user.

jaredcwhite commented 2 years ago

Thanks for mentioning that @manuelgomes. One of the reasons though it's actually important to include .ruby-version is to ensure hosting services and other users—whether using RVM, rbenv, asdf, or something else—will switch to the correct Ruby version. .tool-versions would only benefit the asdf user. Maybe we can just document the legacy_version_file = yes tip in our installation instructions/default readme template.

jaredcwhite commented 2 years ago

Resolved in commit https://github.com/bridgetownrb/bridgetown/commit/0f66a7ebf706f278a40b0cf7add934ea251466f5