Does Gemfile need to include svg?

On my dev environment Sidekiq was whining that

svgo worker: `svgo` not found; please provide proper binary or disable this worker (--no-svgo argument or `:svgo => false` through options)

I finally did a gem install svg and restarted sidekiq. The message seems to have gone away (it only ever showed up sometimes, so I’m not entirely convinced).

Does Gemfile need to include:

gem 'svg'

So that bundle install would have installed it?

I can’t tell if this fixed my problem with image URLs not getting baked on my import or if that’s coincidence.

إعجاب واحد (1)

The image tools are usually provided by the Docker image. Take a look at the Dockerfile and the install scripts install-gifsicle, install-pngcrush and install-pngquant. I’m not sure if all of those are still used by Discourse.

I installed the following packages on my Ubuntu development VM in order to get rid of the warnings.

sudo apt install advancecomp jhead jpegoptim libjpeg-turbo-progs optipng npm nodejs-legacy
sudo npm install svgo -g

Some of them are already installed by the script mentioned in the Beginners Guide to Install Discourse on Ubuntu for Development.

4 إعجابات

Thanks, @gerhard. Apparently I installed node some other way. Figuring out whether and when to install stuff via apt vs npm seems frought.

Egads. I think I installed node.js this weekend for some other reason some other way, so now I have npm@2.15.9 installed in /usr/bin and npm@3.3.6 in ~/.nvm/versions/node/v5.0.0/bin/npm.

Personal problems aside, @techAPJ, neither the Ubuntu Development Guide nor install-rails/linux mentions svgo. Perhaps you could update one of those?