From 7e3a8a13f393d1c1a544efabd4031ddb163732d4 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Tue, 14 Jan 2025 15:38:55 -0500 Subject: [PATCH] Search for ffi in the gemfile --- dockerfile-rails.gemspec | 2 +- lib/generators/dockerfile_generator.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfile-rails.gemspec b/dockerfile-rails.gemspec index 71d0c65..14a8a92 100644 --- a/dockerfile-rails.gemspec +++ b/dockerfile-rails.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "dockerfile-rails" - spec.version = "1.7.1" + spec.version = "1.7.2" spec.authors = [ "Sam Ruby", ] diff --git a/lib/generators/dockerfile_generator.rb b/lib/generators/dockerfile_generator.rb index 5b8bb28..ebcb3ae 100644 --- a/lib/generators/dockerfile_generator.rb +++ b/lib/generators/dockerfile_generator.rb @@ -741,7 +741,7 @@ def build_packages packages = %w(build-essential libyaml-dev) packages += @@packages["build"] if @@packages["build"] packages += %w(nodejs npm) if (node_version == "lts") && (not using_execjs?) - packages << "libffi-dev" if @@packages["ffi"] + packages << "libffi-dev" if @gemfile.include?("ffi") # add databases: sqlite3, postgres, mysql packages << "pkg-config" if options.sqlite3? || @sqlite3