Skip to content

Commit f9303df

Browse files
committed
Inline logic
1 parent 47c0766 commit f9303df

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

lib/language_pack/ruby.rb

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ def setup_language_pack_environment(ruby_layer_path:, gem_layer_path:, bundle_pa
323323
ENV["PATH"] += ":bin"
324324
ENV["JRUBY_OPTS"] = env('JRUBY_BUILD_OPTS') || env('JRUBY_OPTS')
325325
end
326-
setup_ruby_install_env(ruby_layer_path)
326+
# Ruby binstub path
327+
ENV["PATH"] = [File.expand_path("#{ruby_layer_path}/#{slug_vendor_ruby}/bin"), ENV["PATH"]].join(":")
327328

328329
# By default Node can address 1.5GB of memory, a limitation it inherits from
329330
# the underlying v8 engine. This can occasionally cause issues during frontend
@@ -613,22 +614,6 @@ def self.install_ruby(install_path: , ruby_version: , stack:, arch: , metadata:,
613614
io.error message
614615
end
615616

616-
# find the ruby install path for its binstubs during build
617-
# @return [String] resulting path or empty string if ruby is not vendored
618-
def ruby_install_binstub_path(ruby_layer_path = ".")
619-
@ruby_install_binstub_path ||=
620-
if ruby_version
621-
"#{ruby_layer_path}/#{slug_vendor_ruby}/bin"
622-
else
623-
""
624-
end
625-
end
626-
627-
# setup the environment so we can use the vendored ruby
628-
def setup_ruby_install_env(ruby_layer_path = ".")
629-
ENV["PATH"] = "#{File.expand_path(ruby_install_binstub_path(ruby_layer_path))}:#{ENV["PATH"]}"
630-
end
631-
632617
# installs vendored gems into the slug
633618
def install_bundler_in_app(bundler_dir)
634619
FileUtils.mkdir_p(bundler_dir)

0 commit comments

Comments
 (0)