Use absolute path to load .ruby-version file

The ruby-lsp extension from VSCode editor sometimes tries to load this
`.ruby-version` file while its current working directory is not the root
of the repository. The ruby-lsp extension then fails to load.

By using an absolute path to load the `.ruby-version` file, this issue
is avoided.
This commit is contained in:
Christophe Bliard
2024-10-09 16:01:29 +02:00
parent 4b2c3f8041
commit 9c630144f4
+1 -1
View File
@@ -32,7 +32,7 @@ source "https://rubygems.org"
# then we can use the new bundler syntax `ruby file: '.ruby-version'`.
# https://github.com/heroku/heroku-buildpack-ruby/issues/1408#issuecomment-1841596215
ruby File.read(".ruby-version").strip
ruby File.read(File.expand_path(".ruby-version", __dir__)).strip
gem "actionpack-xml_parser", "~> 2.0.0"
gem "activemodel-serializers-xml", "~> 1.0.1"