Skip to content

Commit 601db3e

Browse files
committed
Ensure sorbet-runtime available for runner
1 parent f768913 commit 601db3e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/ruby_lsp/ruby_lsp_rails/runner_client.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ def initialize
4848
# If we can't set the session ID, continue
4949
end
5050

51-
stdin, stdout, stderr, wait_thread = Open3.popen3(
51+
env = {}
52+
if File.exist?(bundle_gemfile = ::Rails.root.join(".ruby-lsp/Gemfile"))
53+
env = { "BUNDLE_GEMFILE" => bundle_gemfile }
54+
end
55+
56+
# TODO: fix signature
57+
stdin, stdout, stderr, wait_thread = T.unsafe(Open3).popen3(
58+
env,
5259
"bin/rails",
5360
"runner",
5461
"#{__dir__}/server.rb",

0 commit comments

Comments
 (0)