From 9c630144f40f40587a0844e0d48216247debfc90 Mon Sep 17 00:00:00 2001 From: Christophe Bliard Date: Wed, 9 Oct 2024 16:01:29 +0200 Subject: [PATCH] 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. --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 0b12eec35412..5e3fb6ba9ed5 100644 --- a/Gemfile +++ b/Gemfile @@ -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"