Skip to content

Commit 4f19d3c

Browse files
committed
require libyaml-dev for Ruby >= 3.4.1
1 parent f48c9f2 commit 4f19d3c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/generators/dockerfile_generator.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,12 @@ def generate_app
410410
missing = Set.new(base_packages + build_packages) -
411411
Set.new(dockerfile.scan(/[-\w]+/))
412412

413-
# https://github.com/docker-library/ruby/pull/497
414-
# https://github.com/rails/rails/pull/54237
415-
missing.delete("libyaml-dev")
416-
missing.delete("yaml-dev")
413+
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("3.4.1")
414+
# https://github.com/docker-library/ruby/pull/497
415+
# https://github.com/rails/rails/pull/54237
416+
missing.delete("libyaml-dev")
417+
missing.delete("yaml-dev")
418+
end
417419

418420
unless missing.empty?
419421
message = "The following packages are missing from the Dockerfile: #{missing.to_a.join(", ")}"

0 commit comments

Comments
 (0)