Skip to content

Commit

Permalink
Specify Ruby with .ruby-version in Gemfile
Browse files Browse the repository at this point in the history
`Gemfile` allows on to use a `file` argument to specify where to get the
Ruby version.

This commit implements this to get the Ruby version from
`.ruby-version`. This will reduce the number of edits to make when
upgrading the Ruby version in the future.

Ref:
- https://andycroll.com/ruby/read-ruby-version-in-your-gemfile/
  • Loading branch information
smaboshe committed Apr 26, 2024
1 parent 851907b commit bacfdae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"

ruby "3.0.7"
ruby file: ".ruby-version"

git_source(:github) do |repo_name|
"https://github.com/#{repo_name}.git"
Expand Down

0 comments on commit bacfdae

Please sign in to comment.