Rbenv shim fallback to system package

51 views Asked by At

I have two active projects on my local machine, running on different ruby versions. Both projects use wicked_pdf with wkhtmltopdf dependency, however project A is using gem wkhtmltopdf-binary and project B is relying on system level installation of wkhtmltopdf package (it is deployed from alpine image, so wkhtmltopdf-binary does not work there).

Now the fun bit. Because of wkhtmltopdf-binary gem in project A, rbenv created a shim for wkhtmltopdf which is much higher in my PATH than system-level installation. So, when I try to run tests in project B, it is now complaining that wkhtmltopdf is not present in ruby 3.0.5 (present in 3.1.1), despite being installed system-wide.

Is there any way of telling rbenv to fallback to system installation when bin is not available for current ruby version? Or do I need to do some internal hackery in project B only to get around alpine limitations?

0

There are 0 answers