We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 087260d + 259b08b commit 113ca9eCopy full SHA for 113ca9e
actiontext/lib/generators/action_text/install/install_generator.rb
@@ -62,7 +62,12 @@ def create_actiontext_files
62
def enable_image_processing_gem
63
if (gemfile_path = Pathname(destination_root).join("Gemfile")).exist?
64
say "Ensure image_processing gem has been enabled so image uploads will work (remember to bundle!)"
65
- uncomment_lines gemfile_path, /gem "image_processing"/
+ image_processing_regex = /gem ["']image_processing["']/
66
+ if File.readlines(gemfile_path).grep(image_processing_regex).any?
67
+ uncomment_lines gemfile_path, image_processing_regex
68
+ else
69
+ run "bundle add --skip-install image_processing"
70
+ end
71
end
72
73
0 commit comments