Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Before you start, you will need to have Docker installed and running. You can [d

Run `bin/dup` to build and create the docker container. This will also set up the Rails application within the container and start the container. You will only have to run this command once. After initial setup, use `bin/dstart` to start an existing container - using `bin/dup` will recreate an existing container and reset the database.

**Note:** The Docker setup includes ImageMagick automatically. If you're using native installation, you must install ImageMagick separately (see [native-installation-instructions.md](./native-installation-instructions.md)).

### 4. Start the app

Run `bin/dserver` to start the Rails server.
Expand Down
21 changes: 21 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
if Rails.env.development?
# Check for ImageMagick before seeding
imagemagick_available = system('convert --version > /dev/null 2>&1') ||
system('magick --version > /dev/null 2>&1')

unless imagemagick_available
Rails.logger.error "=" * 80
Rails.logger.error "ERROR: ImageMagick is required to run db:seed"
Rails.logger.error "=" * 80
Rails.logger.error ""
Rails.logger.error "The seed task processes sponsor logo images, which requires ImageMagick."
Rails.logger.error ""
Rails.logger.error "Install ImageMagick:"
Rails.logger.error " macOS: brew install imagemagick"
Rails.logger.error " Ubuntu/Debian: apt-get install imagemagick"
Rails.logger.error " Windows: https://imagemagick.org/script/download.php"
Rails.logger.error ""
Rails.logger.error "See native-installation-instructions.md for details."
Rails.logger.error "=" * 80
exit 1
end

begin
Rails.logger.info 'Running migrations...'
Rails.application.config.log_level = :info
Expand Down
2 changes: 1 addition & 1 deletion native-installation-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ brew install postgresql
brew services start postgresql
```

Install other dependencies:
Install required dependencies:
```
brew install imagemagick
```
Expand Down