[openstreetmap/openstreetmap-website] update to image_optim gem (#2990)

Omar Bitar notifications at github.com
Wed Dec 2 01:32:40 UTC 2020


When running the current master, the console will output the following: -
```console
=> Booting Puma
=> Rails 6.0.3.4 application starting in development
=> Run `rails server --help` for more startup options
pngcrush worker: `pngcrush` not found; please provide proper binary or disable this worker (--no-pngcrush argument or `:pngcrush => false` through options)
advpng worker: `advpng` not found; please provide proper binary or disable this worker (--no-advpng argument or `:advpng => false` through options)
optipng worker: `optipng` not found; please provide proper binary or disable this worker (--no-optipng argument or `:optipng => false` through options)
pngquant worker: `pngquant` not found; please provide proper binary or disable this worker (--no-pngquant argument or `:pngquant => false` through options)
jhead worker: `jhead` not found, `jpegtran` not found; please provide proper binary or disable this worker (--no-jhead argument or `:jhead => false` through options)
jpegoptim worker: `jpegoptim` not found; please provide proper binary or disable this worker (--no-jpegoptim argument or `:jpegoptim => false` through options)
jpegtran worker: `jpegtran` not found; please provide proper binary or disable this worker (--no-jpegtran argument or `:jpegtran => false` through options)
gifsicle worker: `gifsicle` not found; please provide proper binary or disable this worker (--no-gifsicle argument or `:gifsicle => false` through options)
svgo worker: `svgo` not found; please provide proper binary or disable this worker (--no-svgo argument or `:svgo => false` through options)
Puma starting in single mode...
* Version 5.0.4 (ruby 2.7.0-p0), codename: Spoony Bard
* Min threads: 5, max threads: 5
* Environment: development
* Listening on http://127.0.0.1:3000
* Listening on http://[::1]:3000
Use Ctrl-C to stop
```
according to [image_optim_rails ](https://github.com/toy/image_optim_rails/blob/master/README.markdown) documentation, another gem needs to be added, which will  get latest versions of most recent binaries for image_optim
```ruby
gem 'image_optim_pack'
```
this will remove all of the errors except for one. 
 ```console
svgo worker: `svgo` not found; please provide proper binary or disable this worker (--no-svgo argument or `:svgo => false` through options)
```
according to [image_optim](https://github.com/toy/image_optim/blob/master/README.markdown) documentation, `pngout` and `svgo` binaries need to be installed separately (which they already are). so I just ended up switching gems from 
```ruby
gem 'image_optim_pack'
```
to 
```ruby
gem 'image_optim'
gem 'image_optim_pack'
```
and that resolved the issue, so why not change to that gem? I'm willing to create a pull request if the maintainers approve of this change.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2990
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20201201/eccd25b0/attachment-0001.htm>


More information about the rails-dev mailing list