Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to check for image processing deps #1689

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hopsoft
Copy link

@hopsoft hopsoft commented Sep 11, 2024

If vips or imagemagick is unhealthy, misconfigured, or missing, it can block the completion of bin/setup. In the case of an unhealthy or misconfigured system it can cause all Rails scripts to segfault and exit instantly without guideance on how to proceed.

This PR addresses the concern by ensuring the user has these dependencies installed on their system and that they're working before proceeding.

  • imagemagick
  • vips
ruby bin/setup-scripts/check_image_dependencies.rb

--------------------------------------------------------------------------------
Checking Image Processing Dependencies


Checking vips...
vips is installed: 

Checking ImageMagick...
ImageMagick is not installed or not found in PATH.
Try `brew install imagemagick` on macOS or `sudo apt-get install imagemagick` on Ubuntu.
Would you like to continue without ImageMagick? [y/N]

You've chosen not to continue without ImageMagick. Goodbye

@jagthedrummer
Copy link
Contributor

Thanks for this @hopsoft! There's not really any reason to have both of them installed is there? If not, maybe we should check for both of them first, and if we find one, just proceed? And if both are missing then show a message for how to install one or the other? Or both? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants