Skip to content

Use .ruby-version file #458

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tjschuck
Copy link

This is pretty much the community standard now, and is supported by all the major version managers (rbenv, rvm, chruby, etc.) and tooling (Rubocop, the ruby/setup-ruby@v1 GitHub action, etc.)

Makes it a little more seamless to get up and running to make contributions.

This is pretty much the community standard now, and is supported by all the major version managers (rbenv, rvm, chruby, etc.) and tooling (Rubocop, the `ruby/setup-ruby@v1` GitHub action, etc.)
@@ -8,7 +8,7 @@
set :deploy_to, '/home/apps/t4c'

set :rvm_type, :user
set :rvm_ruby_version, '3.2.6'
set :rvm_ruby_version, File.read("#{File.dirname(__FILE__)}/../.ruby-version").strip
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This style recommended/documented here: https://github.com/capistrano/rbenv?tab=readme-ov-file#usage

@@ -6,7 +6,6 @@ require:
- rubocop-rspec

AllCops:
TargetRubyVersion: 3.2
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.rubocop.org/rubocop/configuration.html#setting-the-target-ruby-version

If a TargetRubyVersion is not specified in your config, then RuboCop will check your project for a series of other files where the Ruby version may be specified already. The files that will be checked are (in this order): *.gemspec, .ruby-version, .tool-versions, and Gemfile.lock.

uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

1 participant