libvips / ruby-vips

Ruby extension for the libvips image processing library.
MIT License
832 stars 61 forks source link

Could not open library 'libvips.so.42': libvips.so.42: cannot open shared object file: No such file or directory #219

Closed jrae closed 4 years ago

jrae commented 4 years ago

Firstly thanks for vips and this gem! Great work.

Whilst writing this up, I'm not 100% sure this is the right place to ask for help but the error is the same as similar issues:

https://github.com/libvips/ruby-vips/issues/176 https://github.com/libvips/ruby-vips/issues/187

LoadError: Could not open library 'vips.so.42': vips.so.42: cannot open shared object file: No such file or directory.
Could not open library 'libvips.so.42': libvips.so.42: cannot open shared object file: No such file or directory

ruby-vips '2.0.17' ruby '~> 2.5.7' ffi - 1.11.3

I've tried multiple build packs to get ruby-vips deployed on heroku.

https://elements.heroku.com/buildpacks/brandoncc/heroku-buildpack-vips https://elements.heroku.com/buildpacks/alex88/heroku-buildpack-vips https://elements.heroku.com/buildpacks/verumex/heroku-buildpack-libvips

And building my own debian packages by following this blog

https://renchap.com/blog/post/building_recent_libvips_on_debian/

https://dronebase-buildpacks.s3.amazonaws.com/libvips-dev_8.6.3-1_amd64.deb https://dronebase-buildpacks.s3.amazonaws.com/libvips-tools_8.6.3-1_amd64.deb https://dronebase-buildpacks.s3.amazonaws.com/libvips42_8.6.3-1_amd64.deb

However this is the latest from heroku build logs..

-----> Detecting rake tasks
 !
 !     Could not detect rake tasks
 !     ensure you can run `$ bundle exec rake -P` against your app
 !     and using the production group of your Gemfile.
 !     rake aborted!
 !     LoadError: Could not open library 'vips.so.42': vips.so.42: cannot open shared object file: No such file or directory.
 !     Could not open library 'libvips.so.42': libvips.so.42: cannot open shared object file: No such file or directory

I have got this running locally with 'rails s' and managed to tile my high res image. However if a try and launch my server with foreman and sidkiq workers it fails to launch with:

23:39:11 assets_worker.1       | /bundle/gems/ffi-1.11.3/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library 'vips.so.42': vips.so.42: cannot open shared object file: No such file or directory. (LoadError)
23:39:11 assets_worker.1       | Could not open library 'libvips.so.42': libvips.so.42: cannot open shared object file: No such file or directory
23:39:11 assets_worker.1       |    from /bundle/gems/ffi-1.11.3/lib/ffi/library.rb:99:in `map'
23:39:11 assets_worker.1       |    from /bundle/gems/ffi-1.11.3/lib/ffi/library.rb:99:in `ffi_lib'
23:39:11 assets_worker.1       |    from /bundle/gems/ruby-vips-2.0.17/lib/vips.rb:528:in `<module:Vips>'
23:39:11 assets_worker.1       |    from /bundle/gems/ruby-vips-2.0.17/lib/vips.rb:525:in `<top (required)>'
23:39:11 assets_worker.1       |    from /bundle/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `require'
23:39:11 assets_worker.1       |    from /bundle/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `block in require'
23:39:11 assets_worker.1       |    from /bundle/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:240:in `load_dependency'
23:39:11 assets_worker.1       |    from /bundle/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `require'
23:39:11 assets_worker.1       |    from /bundle/gems/ruby-vips-2.0.17/lib/ruby-vips.rb:1:in `<top (required)>'
23:39:11 assets_worker.1       |    from /var/lib/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `require'
23:39:11 assets_worker.1       |    from /var/lib/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
23:39:11 assets_worker.1       |    from /var/lib/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `each'
23:39:11 assets_worker.1       |    from /var/lib/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `block in require'
23:39:11 assets_worker.1       |    from /var/lib/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `each'
23:39:11 assets_worker.1       |    from /var/lib/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `require'
23:39:11 assets_worker.1       |    from /var/lib/gems/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:114:in `require'
23:39:11 assets_worker.1       |    from /home/app/Sake/config/application.rb:16:in `<top (required)>'
23:39:11 assets_worker.1       |    from /bundle/gems/sidekiq-5.2.7/lib/sidekiq/cli.rb:280:in `require'
23:39:11 assets_worker.1       |    from /bundle/gems/sidekiq-5.2.7/lib/sidekiq/cli.rb:280:in `boot_system'
23:39:11 assets_worker.1       |    from /bundle/gems/sidekiq-5.2.7/lib/sidekiq/cli.rb:46:in `run'
23:39:11 assets_worker.1       |    from /bundle/gems/sidekiq-5.2.7/bin/sidekiq:12:in `<top (required)>'
23:39:11 assets_worker.1       |    from /bundle/bin/sidekiq:29:in `load'
23:39:11 assets_worker.1       |    from /bundle/bin/sidekiq:29:in `<main>'

Any tips would be appreciated. THanks

jcupitt commented 4 years ago

Hello @jrae,

Sorry, I'm not a Heroku expert :(

Where does your libvips.so.42 end up? If it's in one of the standard locations, you'll need to run ldconfig before ruby-vips can find it. If it's in a non-standard location, you'll need to set LD_LIBRARY_PATH to that directory.

I've made a dockerfile which builds and tests ruby-vips with the latest libvips on heroku18, if that's any help:

https://github.com/jcupitt/docker-builds/tree/master/ruby-vips-heroku18

You'll probably want to add some other loaders. It makes a libvips installed to /usr/local/vips, so it needs LD_LIBRARY_PATH to be set to /usr/local/vips/lib.

jrae commented 4 years ago

Thanks a lot for this response! Really helpful

So far I can't find libvips.so.42 on the instance I'm deploying to which explains a lot :/

find . -name *vips*
./usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/modules-Q16/coders/vips.la
./usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/modules-Q16/coders/vips.so
./app/vendor/bundle/ruby/2.5.0/gems/fog-openstack-0.1.2/tests/openstack/models/network/lb_vips_tests.rb
./app/vendor/bundle/ruby/2.5.0/gems/fog-openstack-0.1.2/lib/fog/openstack/models/network/lb_vips.rb
./app/vendor/bundle/ruby/2.5.0/gems/fog-openstack-0.1.2/lib/fog/openstack/requests/network/list_lb_vips.rb

Build logs look like it was installed

-----> Fetching .debs for libvips-dev
       Reading package lists...
       Building dependency tree...
       The following additional packages will be installed:
         ...
         libvips-doc libvips-tools libvips42 libvorbis0a libvorbisfile3
         ...
       Get:154 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libvips42 amd64 8.2.2-1 [650 kB]
       ...
       Get:160 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libvips-dev amd64 8.2.2-1 [829 kB]
       Get:161 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libvips-doc all 8.2.2-1 [228 kB]
       Get:162 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libvips-tools amd64 8.2.2-1 [33.5 kB]
       Fetched 101 MB in 10s (9,590 kB/s)
       Download complete and in download only mode
...
-----> Installing libvips42_8.2.2-1_amd64.deb
-----> Installing libvips-dev_8.2.2-1_amd64.deb
-----> Installing libvips-doc_8.2.2-1_all.deb
-----> Installing libvips-tools_8.2.2-1_amd64.deb
...
-----> Writing profile script
-----> Rewrite package-config files

For this run I was using one of the build packs again. I would have expected it to be added along side glib dependency

find . -name *glib-2.0*
./usr/lib/x86_64-linux-gnu/glib-2.0
./usr/share/glib-2.0
find: ‘./lost+found’: Permission denied
find: ‘./etc/ssl/private’: Permission denied
./lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2
./lib/x86_64-linux-gnu/libglib-2.0.so.0

(tried ldconfig but ran into permissions issues.. /sbin/ldconfig)

/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Read-only file system
...
Path variable: /tmp/build_b99920d5653d9580e99149abced93b2d/.apt/usr/bin:/usr/local/bin:/usr/bin:/bin:/tmp/codon/vendor/bin
/app/tmp/buildpacks/4e88fe351f64f40373034c7cf2473428fc755a3dd14f9746e4314794e0cca80e98d1fd19c3f1e29257554f1c278bd88c8643f16fc9fc9ed0a076684542205b0c/bin/compile: 

Thanks again, it has narrowed the search. I will share progress here in case it is useful

jrae commented 4 years ago

Finally found this buildpack which allows me to deploy with heroku-16 (behind due to other dependency issues).

https://github.com/zoras/heroku-buildpack-libvips

Thanks @zoras!

However I'm now seeing

Vips::Error: VipsOperation: class "dzsave" not found

At runtime. Tried installing

http://ftp.acc.umu.se/pub/GNOME/sources/libgsf/1.14/libgsf-1.14.46.tar.xz

with .vendor_urls based on this comment.

https://github.com/libvips/pyvips/issues/65#issuecomment-423081974

Still no joy. Will edit this comment when I find a solution.

jcupitt commented 4 years ago

Have a look at the output of libvips configure -- there's a line for libgsf.

If it can't find it, you probably need to adjust PKG_CONFIG_PATH.

giovannibonetti commented 4 years ago

Here where I work we have used this buildpack and it is working now! 🚀

AndiSusanto15 commented 3 years ago

Hello @jrae,

Sorry, I'm not a Heroku expert :(

Where does your libvips.so.42 end up? If it's in one of the standard locations, you'll need to run ldconfig before ruby-vips can find it. If it's in a non-standard location, you'll need to set LD_LIBRARY_PATH to that directory.

I've made a dockerfile which builds and tests ruby-vips with the latest libvips on heroku18, if that's any help:

https://github.com/jcupitt/docker-builds/tree/master/ruby-vips-heroku18

You'll probably want to add some other loaders. It makes a libvips installed to /usr/local/vips, so it needs LD_LIBRARY_PATH to be set to usr/local/vips/lib.

Thanks John, its work properly...

equivalent commented 3 years ago

This is what worked for me: https://elements.heroku.com/buildpacks/brandoncc/heroku-buildpack-vips

Screenshot from 2021-09-19 14-54-51

tjerk-git commented 2 years ago

I've added https://elements.heroku.com/buildpacks/brandoncc/heroku-buildpack-vips

But I still receive this error

Could not open library 'libvips.so.42': libpoppler-glib.so.8: cannot open shared object file: No such file or directory

configured an Aptfile with the following

libglib2.0-0
libglib2.0-dev
libpoppler-glib8

Been using

ruby "3.0.0"
gem "rails", "~> 7.0.0"

on Heroku with amazon S3 configured with ActiveStorage.

Any idea's?

limitlessmind commented 2 years ago

I've added https://elements.heroku.com/buildpacks/brandoncc/heroku-buildpack-vips

But I still receive this error

Could not open library 'libvips.so.42': libpoppler-glib.so.8: cannot open shared object file: No such file or directory

configured an Aptfile with the following

libglib2.0-0
libglib2.0-dev
libpoppler-glib8

Been using

ruby "3.0.0"
gem "rails", "~> 7.0.0"

on Heroku with amazon S3 configured with ActiveStorage.

Any idea's?

Did you ever track this down to get it to work? I'm having the same issue at Heroku.

jcupitt commented 2 years ago

I would ask on brandoncc's github. Eg. this issue:

https://github.com/brandoncc/heroku-buildpack-vips/issues/19

samvandamme commented 2 years ago

So I had the same problem on Heroku, took me a couple of hours to get this running. I am not using Docker.

I added this buildpack to my app: heroku buildpacks:add heroku-community/apt --index 1

And the Aptfile in my root directory contains:

libglib2.0-0
libglib2.0-dev
libpoppler-glib8
libheif-dev
libvips-dev
libvips

Note: This added 140MB to my slug size, but at least it runs now.

lucasslemos commented 2 years ago

sudo ldconfig

jon-sully commented 2 years ago

Yeah adding everything manually (with no buildpack) ended up working for me too, though it bloated by slug past the "soft limit" 300MB size too. We don't do any PDF stuff so I just went with

libglib2.0-0
libglib2.0-dev
libheif-dev
libvips-dev
libvips

And may try to pull out pieces until it breaks to lower the size. TBD.

jcupitt commented 2 years ago

You can remove GIFLIB from brandoncc's buildpack --- libvips ships with its own GIF decoder now. It won't make a substantial difference to the slug size though :(

I'll open an issue for this.

jon-sully commented 2 years ago

Thanks @jcupitt — I've seen your wisdom and many comments across a multitude of Vips libraries, packages, adapters, etc. and just wanted to give a proper thank you for all of your efforts 🙂

With Rails 7 now defaulting active storage to Vips > ImageMagick I imagine there's going to be a lot more uptake. I tried brandoncc's buildpack but was getting errors from it (same as these) so ended up just going the full-apt route.

jcupitt commented 2 years ago

Oh hey, no problem, it's nice to see my baby being useful.

Maybe ldconfig for Brandon's buildpack? I'm a bit unclear about slugs.

jon-sully commented 2 years ago

Sorry for the delay there John. Heroku's concept of a 'slug' I believe is just the total file size of the build container after the app's build completes (so all the app files + libs etc.).

The challenge with Heroku is that it's a tremendously slow cycle between trying a thing and seeing if it worked because there's no real way to halt a build and SSH in (etc) — you have to ship up a code change to the build script or something then wait for the build to run and see how it went. It's admittedly a little frustrating. Build packs are supposed to be the magic that makes it plug-and-play .. and usually they are! But in this case it's proving a tad challenging.

ldconfig is a small program to help set/configure the ld library path I imagine? Sorry, I'm hip to this stuff but tend to operate and work more up at the app layer than the system layer. Would you mind elaborating (or linking to a note somewhere if you already have!) on using that tool?

I saw someone mention in another thread (https://github.com/brandoncc/heroku-buildpack-vips/issues/8) that Heroku apps may work fine with Brandon's buildpack when using the Nodejs buildpack and making sure that buildpack is executed before the Ruby pack (they do run in order) but I've had no such luck.

jon-sully commented 2 years ago

Ended up figuring things out, John! Thought I could skip a dependency 😛 but no dice! The buildpack seems to work fine! And with it my slug increased by only 23 MB rather than 120+ MB. Yay!

jcupitt commented 2 years ago

I fixed up my docker build a bit:

https://github.com/jcupitt/docker-builds/tree/master/libvips-heroku18

It makes a 4MB tarball which runs on a bare heroku image and includes most useful file formats (including PDF, via PDFium) and disables all the dubious ones. The README has some notes.

With this test dockerfile:

FROM heroku/heroku:18

RUN apt-get update \
    && apt-get install -y ruby-dev

COPY libvips-heroku18.tar.gz /usr/local/src

RUN cd /usr/local/lib \
    && tar xf /usr/local/src/libvips-heroku18.tar.gz \
    && ldconfig 

RUN gem install ruby-vips

RUN ruby -e 'require "vips"; puts "ruby-vips: libvips #{Vips::LIBRARY_VERSION}"'

I see:

$ docker build -t libvips-heroku:18 -f Dockerfile.test .
Sending build context to Docker daemon   4.05MB
Step 1/6 : FROM heroku/heroku:18
...
---> 9beef2c73619
Step 6/6 : RUN ruby -e 'require "vips"; puts "ruby-vips: libvips #{Vips::LIBRARY_VERSION}"'
 ---> Running in f9980c32c39c
ruby-vips: libvips 8.12.2-Tue Jan 25 09:34:32 UTC 2022
Removing intermediate container f9980c32c39c
 ---> fda0e87ba4fa
Successfully built fda0e87ba4fa
Successfully tagged libvips-heroku:18
jon-sully commented 2 years ago

Oh awesome. Thanks John! @brandoncc I wonder if we might be able to update the heroku-buildpack-vips script with John's updates? 🤔

brandoncc commented 2 years ago

@jcupitt I'm wondering what the ramifications of switching from poppler to PDFium would be. I seem to remember that a long time ago I had some image "ghosting" issues and it was related to the PDF renderer that was being used. I remember it was the same engine that is used by Firefox. Would that be poppler or PDFium? I use the PDF capabilities of vips very heavily, so I am hesitant to make that change in the buildpack...

brandoncc commented 2 years ago

Actually, moving my question to your issue on the buildpack.

hidr0 commented 2 years ago

Hello, Is this a similar issue to mine?

https://github.com/libvips/ruby-vips/issues/329

E36lewis commented 2 years ago

Ran into this problem upgrading rails 6 to 7, this solved the problem. Followed the steps given with a little tweek to the Aptfile, I used:

libglib2.0-0
libpoppler-glib8
libvips

Instead so the slug size would be smaller by about 40mb

wdiechmann commented 2 years ago

ehh @jcupitt and @brandoncc could I 'pick your brains' for just a sec?

I'm trying to deploy a Rails 7 app using dokku and using the heroku-buildpack-vips and following the 'Usage' up until the 'Build script' which I cannot seem to wrap my head around, I'm left with this:

% git push sten
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (6/6), 551 bytes | 551.00 KiB/s, done.
Total 6 (delta 2), reused 0 (delta 0), pack-reused 0
-----> Set main to DOKKU_DEPLOY_BRANCH.
-----> Cleaning up...
-----> Building sten from herokuish
-----> Adding BUILD_ENV to build environment...
       BUILD_ENV added successfully
-----> Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
       Detected buildpacks: multi ruby nodejs
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-apt
=====> Detected Framework: Apt
-----> Detected Aptfile or Stack changes, flushing cache
-----> Updating apt caches
       Get:1 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease [91.7 kB]
       Get:2 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
       Get:3 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 Packages [390 kB]
       Get:4 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
       Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
       Get:6 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
       Get:7 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB]
       Get:8 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages [888 kB]
       Get:9 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [2087 kB]
       Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2543 kB]
       Get:11 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1181 kB]
       Fetched 20.3 MB in 2s (8474 kB/s)
       Reading package lists...
-----> Fetching .debs for libglib2.0-0
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 156 not upgraded.
       Need to get 1287 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libglib2.0-0 amd64 2.64.6-1~ubuntu20.04.4 [1287 kB]
       Fetched 1287 kB in 1s (1669 kB/s)
       Download complete and in download only mode
-----> Fetching .debs for libglib2.0-dev
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 156 not upgraded.
       Need to get 1506 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libglib2.0-dev amd64 2.64.6-1~ubuntu20.04.4 [1506 kB]
       Fetched 1506 kB in 1s (1913 kB/s)
       Download complete and in download only mode
-----> Fetching .debs for libpoppler-glib8
       Reading package lists...
       Building dependency tree...
       The following additional packages will be installed:
       libnspr4 libnss3 libpoppler97
       The following NEW packages will be installed:
       libnspr4 libnss3 libpoppler-glib8 libpoppler97
       0 upgraded, 4 newly installed, 0 to remove and 156 not upgraded.
       Need to get 2387 kB of archives.
       After this operation, 8363 kB of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libnspr4 amd64 2:4.25-1 [107 kB]
       Get:2 http://archive.ubuntu.com/ubuntu focal-security/main amd64 libnss3 amd64 2:3.49.1-1ubuntu1.8 [1256 kB]
       Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 libpoppler97 amd64 0.86.1-0ubuntu1 [915 kB]
       Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libpoppler-glib8 amd64 0.86.1-0ubuntu1 [109 kB]
       Fetched 2387 kB in 1s (2465 kB/s)
       Download complete and in download only mode
-----> Installing libglib2.0-0_2.64.6-1~ubuntu20.04.4_amd64.deb
-----> Installing libglib2.0-dev_2.64.6-1~ubuntu20.04.4_amd64.deb
-----> Installing libnspr4_2%3a4.25-1_amd64.deb
-----> Installing libnss3_2%3a3.49.1-1ubuntu1.8_amd64.deb
-----> Installing libpoppler-glib8_0.86.1-0ubuntu1_amd64.deb
-----> Installing libpoppler97_0.86.1-0ubuntu1_amd64.deb
-----> Writing profile script
-----> Rewrite package-config files
=====> Downloading Buildpack: https://github.com/brandoncc/heroku-buildpack-vips
=====> Detected Framework: vips (heroku-20 stack)
-----> Vendoring binaries
       Fetching /tmp/buildpackBaVv1/build/heroku-20.tar.gz
-----> Configuring build environment
-----> Building runtime environment
=====> Downloading Buildpack: https://github.com/brandoncc/heroku-buildpack-ruby
=====> Detected Framework: Ruby
-----> Installing bundler 2.3.10
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rails

       ###### WARNING:

       Your app was upgraded to bundler 2.3.10.
       Previously you had a successful deploy with bundler 2.2.33.

       If you see problems related to the bundler version please refer to:
       https://devcenter.heroku.com/articles/bundler-version#known-upgrade-issues

-----> Using Ruby version: ruby-3.0.1
-----> Installing dependencies using bundler 2.3.10
       Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
       Using rake 13.0.6
      ...8< (cut for brewity)...
       Using wicked_pdf 2.6.3
       Using wkhtmltopdf-binary 0.12.6.5
       Bundle complete! 45 Gemfile dependencies, 102 gems now installed.
       Gems in the groups 'development' and 'test' were not installed.
       Bundled gems are installed into `./vendor/bundle`
       Bundle completed (0.54s)
       Cleaning up the bundler cache.
-----> Installing node-v16.13.1-linux-x64
-----> Detecting rake tasks
remote: /tmp/buildpacko71lS/lib/language_pack/helpers/rake_runner.rb:100:in `load_rake_tasks!': Could not detect rake tasks (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError)
remote: ensure you can run `$ bundle exec rake -P` against your app
remote: and using the production group of your Gemfile.
remote: /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/definition.rb:481:in `materialize': Could not find rails-7.0.3.1, jquery-rails-4.5.0, mysql2-0.5.4, puma-5.6.4, ...8< (cut for brewity)..., crass-1.0.6 in any of the sources (Bundler::GemNotFound)
remote:         from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/definition.rb:190:in `specs'
remote:         from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/definition.rb:238:in `specs_for'
remote:         from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/runtime.rb:18:in `setup'
remote:         from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler.rb:151:in `setup'
remote:         from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/setup.rb:20:in `block in <top (required)>'
remote:         from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/ui/shell.rb:136:in `with_level'
remote:         from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/ui/shell.rb:88:in `silence'
remote:         from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/setup.rb:20:in `<top (required)>'
remote:         from <internal:/tmp/build/vendor/ruby-3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
remote:         from <internal:/tmp/build/vendor/ruby-3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
remote:         from /app/config/boot.rb:3:in `<top (required)>'
remote:         from /app/bin/rake:2:in `require_relative'
remote:         from /app/bin/rake:2:in `<main>'
remote:         from /tmp/buildpacko71lS/lib/language_pack/ruby.rb:967:in `rake'
remote:         from /tmp/buildpacko71lS/lib/language_pack/rails4.rb:69:in `block in run_assets_precompile_rake_task'
remote:         from /tmp/buildpacko71lS/lib/language_pack/base.rb:175:in `log'
remote:         from /tmp/buildpacko71lS/lib/language_pack/rails4.rb:63:in `run_assets_precompile_rake_task'
remote:         from /tmp/buildpacko71lS/lib/language_pack/ruby.rb:103:in `block in compile'
remote:         from /tmp/buildpacko71lS/lib/language_pack/ruby.rb:988:in `allow_git'
remote:         from /tmp/buildpacko71lS/lib/language_pack/ruby.rb:96:in `compile'
remote:         from /tmp/buildpacko71lS/lib/language_pack/rails2.rb:55:in `compile'
remote:         from /tmp/buildpacko71lS/lib/language_pack/rails3.rb:37:in `compile'
remote:         from /tmp/buildpacko71lS/lib/language_pack/rails4.rb:30:in `compile'
remote:         from /tmp/buildpacko71lS/lib/language_pack/rails6.rb:17:in `compile'
remote:         from /tmp/buildpacko71lS/bin/support/ruby_compile:19:in `block in <main>'
remote:         from /tmp/buildpacko71lS/lib/language_pack/base.rb:175:in `log'
remote:         from /tmp/buildpacko71lS/bin/support/ruby_compile:18:in `<main>'

       !
       !     Could not detect rake tasks
       !     ensure you can run `$ bundle exec rake -P` against your app
       !     and using the production group of your Gemfile.
       !     /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/definition.rb:481:in `materialize': Could not find rails-7.0.3.1, jquery-rails-4.5.0, mysql2-0.5.4, puma-5.6.4, ...8< (cut for brewity)..., crass-1.0.6 in any of the sources (Bundler::GemNotFound)
       !     from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/definition.rb:190:in `specs'
       !     from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/definition.rb:238:in `specs_for'
       !     from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/runtime.rb:18:in `setup'
       !     from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler.rb:151:in `setup'
       !     from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/setup.rb:20:in `block in <top (required)>'
       !     from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/ui/shell.rb:136:in `with_level'
       !     from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/ui/shell.rb:88:in `silence'
       !     from /tmp/build/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/setup.rb:20:in `<top (required)>'
       !     from <internal:/tmp/build/vendor/ruby-3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
       !     from <internal:/tmp/build/vendor/ruby-3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
       !     from /app/config/boot.rb:3:in `<top (required)>'
       !     from /app/bin/rake:2:in `require_relative'
       !     from /app/bin/rake:2:in `<main>'
       !
remote: 2022/08/17 15:32:17 exit status 1
To docker4:sten
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'docker4:sten'

Any idea how I get myself out of this jam? Skipping all the vips stuff and doing a deploy with only the 'standard' ruby and nodejs packs (dokku out-of-the-box stuff) all is good but as mentioned above, I get the LoadError: Could not open library 'vips.so.42':

Just cannot connect all the dots 😢

jcupitt commented 2 years ago
LoadError: Could not open library 'vips.so.42': 

I think your ffi gem is not generating the correct lib name (it should be libvips.so.42).

https://github.com/ffi/ffi/blob/master/lib/ffi/library.rb#L34-L55

Maybe your PLATFORM::LibPrefix is not being set correctly?

wdiechmann commented 2 years ago

wauw - that was fast 😃

% gem list | grep ffi
ffi (1.15.5)
public_suffix (4.0.7, 4.0.6)
% 

I use gem 'image_processing' which translates into

    image_processing (1.12.2)
      mini_magick (>= 4.9.5, < 5)
      ruby-vips (>= 2.0.17, < 3)

and what is even worse - doing a which vips on my MBAir M1 tells me that I don't have one - 😮

that, however, should not hinder me deploying - or?

how can I tell which PLATFORM::LibPrefix I'm using - never tried that!?

limitlessmind commented 2 years ago

That message is definitely due to not having vips installed. One, does it work locally for you?

Regarding Heroku, what does your aptfile look like?

On Aug 17, 2022, at 10:06 AM, Walther Diechmann @.***> wrote:



wauw - that was fast 😃

% gem list | grep ffi ffi (1.15.5) public_suffix (4.0.7, 4.0.6) %

I use gem 'image_processing' which translates into

image_processing (1.12.2)
  mini_magick (>= 4.9.5, < 5)
  ruby-vips (>= 2.0.17, < 3)

and what is even worse - doing a which vips on my MBAir M1 tells me that I don't have one - 😮

that, however, should not hinder me deploying - or?

— Reply to this email directly, view it on GitHubhttps://github.com/libvips/ruby-vips/issues/219#issuecomment-1218058533, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADTGUW5QSZVB56C7YZMONV3VZTWXDANCNFSM4KFPCQIA. You are receiving this because you commented.Message ID: @.***>

wdiechmann commented 2 years ago

UPDATE:

I kind'a realized how stupid it did sound "I don't have one" - so I muzzled forward with brew install vips (which to my big surprise installed the other half of the entire Internet) 😮

Now I have

% which vips
/opt/homebrew/bin/vips 

And so - when I removed my Gemfile.lock and bundled install-ed now (at least) my dev environment is not working (either)

LoadError (Could not open library 'glib-2.0.0': dlopen(glib-2.0.0, 0x0005): tried: 'glib-2.0.0' (no such file), '/usr/local/lib/glib-2.0.0' (no such file), '/usr/lib/glib-2.0.0' (no such file), '/Users/walther/Deling/Walther/src/randers_tegl/sten/src/glib-2.0.0' (no such file).
Could not open library '/opt/homebrew/lib/libglib-2.0.0.dylib': dlopen(/opt/homebrew/lib/libglib-2.0.0.dylib, 0x0005): tried: '/opt/homebrew/lib/libglib-2.0.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/opt/homebrew/Cellar/glib/2.72.3/lib/libglib-2.0.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))):

ffi (1.15.5) lib/ffi/library.rb:145:in `block in ffi_lib'
ffi (1.15.5) lib/ffi/library.rb:99:in `map'
ffi (1.15.5) lib/ffi/library.rb:99:in `ffi_lib'
ruby-vips (2.1.4) lib/vips.rb:45:in `<module:GLib>'
ruby-vips (2.1.4) lib/vips.rb:36:in `<main>'

I've been fighting this Apple MBair M1 since day one (the arm64 vs x86 battle that is) and to get MySQL to work I had to install it using brew86 (my alias for arch -x86_64 /usr/local/bin/brew) and perhaps this is why my dev env is now acting up (don't know); "sigh" live was easier when everybody was one the Intel boat (not that it was a better/faster/prettier boat, but stuff "just worked")

jcupitt commented 2 years ago

Ah didn't realize you were on M1, I thought this was heroku. See https://github.com/libvips/ruby-vips/issues/130#issuecomment-1210890935

jcupitt commented 2 years ago

brew install vips (which to my big surprise installed the other half of the entire Internet)

Yes, the homebrew vips package installs every possible libvips dependency. I queried this and the homebrew devs said they don't want it to fall back to building from source, so they don't want to omit any options at all if possible.

It means you can't use the homebrew binary on untrusted data, but probably no one does.

wdiechmann commented 2 years ago

ouch - I realized what a mess I'd drag myself into and quickly withdrew back to 'safer grounds' with gem 'mini_magick' but alas that now seems a dead end too 😟

anyway that's for me to keep digging into - must have taken another wrong turn somewhere on my hurried fallback 😆

thx for responding impressively fast 🤗

(I'm not even close to demonstrating the kind of *-fu that's required to start tearing apart/assembling stuff like vips, dokku, buildpacks, and what not; so I'll just stick to implementing stuff using toolchains that you guys dream up - and other guys writes blog posts about, eventually leading to guys like me get to make users happy using) 😄

2022-08-17T14:56:21.004083000Z app[web.1]: I, [2022-08-17T14:56:21.003728 #15]  INFO -- : [894c80bf-f873-44f5-8ea9-3b371e099ec1]   Disk Storage (1.1ms) Uploaded file to key: 0gmdiyfygqto97fp8u77i0aizw7k (checksum: 7OOCOay9KJedSUXKo6NeIQ==)
2022-08-17T14:56:21.006757000Z app[web.1]: I, [2022-08-17T14:56:21.006506 #15]  INFO -- : [894c80bf-f873-44f5-8ea9-3b371e099ec1] [ActiveJob] Enqueued ActiveStorage::PurgeJob (Job ID: 029d5a07-d9cd-4816-82c0-463ce331c5e8) to Async(default) with arguments: #<GlobalID:0x00005567522f46a8 @uri=#<URI::GID gid://speicher/ActiveStorage::Blob/354>>
2022-08-17T14:56:21.009336000Z app[web.1]: I, [2022-08-17T14:56:21.009079 #15]  INFO -- : [894c80bf-f873-44f5-8ea9-3b371e099ec1] [ActiveJob] Enqueued ActiveStorage::AnalyzeJob (Job ID: cfa8cd45-6a7e-4f3b-ab6a-26daf2b00ff2) to Async(default) with arguments: #<GlobalID:0x000055675235ee40 @uri=#<URI::GID gid://speicher/ActiveStorage::Blob/370>>
2022-08-17T14:56:21.022202000Z app[web.1]: I, [2022-08-17T14:56:21.021896 #15]  INFO -- : [894c80bf-f873-44f5-8ea9-3b371e099ec1]   Rendered application/show.html.haml (Duration: 10.2ms | Allocations: 5629)
2022-08-17T14:56:21.024503000Z app[web.1]: I, [2022-08-17T14:56:21.024289 #15]  INFO -- : [ActiveJob] [ActiveStorage::PurgeJob] [029d5a07-d9cd-4816-82c0-463ce331c5e8] Performing ActiveStorage::PurgeJob (Job ID: 029d5a07-d9cd-4816-82c0-463ce331c5e8) from Async(default) enqueued at 2022-08-17T14:56:21Z with arguments: #<GlobalID:0x0000556752449aa8 @uri=#<URI::GID gid://speicher/ActiveStorage::Blob/354>>
2022-08-17T14:56:21.026735000Z app[web.1]: I, [2022-08-17T14:56:21.026500 #15]  INFO -- : [894c80bf-f873-44f5-8ea9-3b371e099ec1] [ActiveJob] Enqueued GenerateLabelJob (Job ID: 20e8b0d3-f1d5-4655-ac73-9d9e31ee4ebc) to Async(default) with arguments: {:ids=>[1598], :account=>2, :user=>1, :when=>"20220817145621"}
2022-08-17T14:56:21.030069000Z app[web.1]: I, [2022-08-17T14:56:21.029691 #15]  INFO -- : [894c80bf-f873-44f5-8ea9-3b371e099ec1] [ActiveJob] Enqueued GeneratePdfJob (Job ID: 7de9251f-b925-4504-b7b5-463669164a85) to Async(default) with arguments: {:ids=>[1598], :account=>2, :user=>1, :when=>"20220817145621"}
2022-08-17T14:56:21.033973000Z app[web.1]: I, [2022-08-17T14:56:21.027288 #15]  INFO -- : [ActiveJob] [ActiveStorage::AnalyzeJob] [cfa8cd45-6a7e-4f3b-ab6a-26daf2b00ff2] Performing ActiveStorage::AnalyzeJob (Job ID: cfa8cd45-6a7e-4f3b-ab6a-26daf2b00ff2) from Async(default) enqueued at 2022-08-17T14:56:21Z with arguments: #<GlobalID:0x00005567524215d0 @uri=#<URI::GID gid://speicher/ActiveStorage::Blob/370>>
2022-08-17T14:56:21.035329000Z app[web.1]: I, [2022-08-17T14:56:21.035078 #15]  INFO -- : [ActiveJob] [GeneratePdfJob] [7de9251f-b925-4504-b7b5-463669164a85] Performing GeneratePdfJob (Job ID: 7de9251f-b925-4504-b7b5-463669164a85) from Async(default) enqueued at 2022-08-17T14:56:21Z with arguments: {:ids=>[1598], :account=>2, :user=>1, :when=>"20220817145621"}
2022-08-17T14:56:21.040799000Z app[web.1]: I, [2022-08-17T14:56:21.040435 #15]  INFO -- : [ActiveJob] [ActiveStorage::AnalyzeJob] [cfa8cd45-6a7e-4f3b-ab6a-26daf2b00ff2]   Disk Storage (0.4ms) Downloaded file from key: 0gmdiyfygqto97fp8u77i0aizw7k
2022-08-17T14:56:21.040985000Z app[web.1]: I, [2022-08-17T14:56:21.028318 #15]  INFO -- : [ActiveJob] [GenerateLabelJob] [20e8b0d3-f1d5-4655-ac73-9d9e31ee4ebc] Performing GenerateLabelJob (Job ID: 20e8b0d3-f1d5-4655-ac73-9d9e31ee4ebc) from Async(default) enqueued at 2022-08-17T14:56:21Z with arguments: {:ids=>[1598], :account=>2, :user=>1, :when=>"20220817145621"}
2022-08-17T14:56:21.043451000Z app[web.1]: I, [2022-08-17T14:56:21.043154 #15]  INFO -- : [894c80bf-f873-44f5-8ea9-3b371e099ec1] Completed 201 Created in 125ms (Views: 10.9ms | ActiveRecord: 13.5ms | Allocations: 90095)
2022-08-17T14:56:21.048010000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:51: warning: already initialized constant GLib::G_FREE
2022-08-17T14:56:21.048290000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:51: warning: previous definition of G_FREE was here
2022-08-17T14:56:21.048884000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:59: warning: already initialized constant GLib::LOG_FLAG_RECURSION
2022-08-17T14:56:21.048984000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:59: warning: previous definition of LOG_FLAG_RECURSION was here
2022-08-17T14:56:21.049064000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:60: warning: already initialized constant GLib::LOG_FLAG_FATAL
2022-08-17T14:56:21.049111000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:60: warning: previous definition of LOG_FLAG_FATAL was here
2022-08-17T14:56:21.049156000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:63: warning: already initialized constant GLib::LOG_LEVEL_ERROR
2022-08-17T14:56:21.049204000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:63: warning: previous definition of LOG_LEVEL_ERROR was here
2022-08-17T14:56:21.049248000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:64: warning: already initialized constant GLib::LOG_LEVEL_CRITICAL
2022-08-17T14:56:21.049291000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:64: warning: previous definition of LOG_LEVEL_CRITICAL was here
2022-08-17T14:56:21.049333000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:65: warning: already initialized constant GLib::LOG_LEVEL_WARNING
2022-08-17T14:56:21.049393000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:65: warning: previous definition of LOG_LEVEL_WARNING was here
2022-08-17T14:56:21.049443000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:66: warning: already initialized constant GLib::LOG_LEVEL_MESSAGE
2022-08-17T14:56:21.049485000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:66: warning: previous definition of LOG_LEVEL_MESSAGE was here
2022-08-17T14:56:21.049524000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:67: warning: already initialized constant GLib::LOG_LEVEL_INFO
2022-08-17T14:56:21.049565000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:67: warning: previous definition of LOG_LEVEL_INFO was here
2022-08-17T14:56:21.049608000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:68: warning: already initialized constant GLib::LOG_LEVEL_DEBUG
2022-08-17T14:56:21.049650000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:68: warning: previous definition of LOG_LEVEL_DEBUG was here
2022-08-17T14:56:21.049695000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:71: warning: already initialized constant GLib::GLIB_TO_SEVERITY
2022-08-17T14:56:21.049737000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:71: warning: previous definition of GLIB_TO_SEVERITY was here
2022-08-17T14:56:21.049783000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:86: warning: already initialized constant GLib::LOG_HANDLER
2022-08-17T14:56:21.049826000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:86: warning: previous definition of LOG_HANDLER was here
2022-08-17T14:56:21.049871000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:155: warning: already initialized constant GObject::GBOOL_TYPE
2022-08-17T14:56:21.049911000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:155: warning: previous definition of GBOOL_TYPE was here
2022-08-17T14:56:21.049954000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:156: warning: already initialized constant GObject::GINT_TYPE
2022-08-17T14:56:21.050005000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:156: warning: previous definition of GINT_TYPE was here
2022-08-17T14:56:21.050050000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:157: warning: already initialized constant GObject::GUINT64_TYPE
2022-08-17T14:56:21.050094000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:157: warning: previous definition of GUINT64_TYPE was here
2022-08-17T14:56:21.050139000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:158: warning: already initialized constant GObject::GDOUBLE_TYPE
2022-08-17T14:56:21.050185000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:158: warning: previous definition of GDOUBLE_TYPE was here
2022-08-17T14:56:21.050231000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:159: warning: already initialized constant GObject::GENUM_TYPE
2022-08-17T14:56:21.050274000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:159: warning: previous definition of GENUM_TYPE was here
2022-08-17T14:56:21.050322000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:160: warning: already initialized constant GObject::GFLAGS_TYPE
2022-08-17T14:56:21.050370000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:160: warning: previous definition of GFLAGS_TYPE was here
2022-08-17T14:56:21.050878000Z app[web.1]: I, [2022-08-17T14:56:21.048553 #15]  INFO -- : [ActiveJob] [ActiveStorage::AnalyzeJob] [cfa8cd45-6a7e-4f3b-ab6a-26daf2b00ff2] Skipping image analysis because the ruby-vips gem isn't installed
2022-08-17T14:56:21.050974000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:161: warning: already initialized constant GObject::GSTR_TYPE
2022-08-17T14:56:21.051092000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:161: warning: previous definition of GSTR_TYPE was here
2022-08-17T14:56:21.051143000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:162: warning: already initialized constant GObject::GOBJECT_TYPE
2022-08-17T14:56:21.051194000Z app[web.1]: /app/vendor/bundle/ruby/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:162: warning: previous definition of GOBJECT_TYPE was here
2022-08-17T14:56:21.067045000Z app[web.1]: I, [2022-08-17T14:56:21.066681 #15]  INFO -- : [ActiveJob] [ActiveStorage::AnalyzeJob] [cfa8cd45-6a7e-4f3b-ab6a-26daf2b00ff2] Performed ActiveStorage::AnalyzeJob (Job ID: cfa8cd45-6a7e-4f3b-ab6a-26daf2b00ff2) from Async(default) in 54.44ms
wdiechmann commented 2 years ago

That message is definitely due to not having vips installed. One, does it work locally for you? Regarding Heroku, what does your aptfile look like? On Aug 17, 2022, at 10:06 AM, Walther Diechmann @.> wrote:  wauw - that was fast 😃 % gem list | grep ffi ffi (1.15.5) public_suffix (4.0.7, 4.0.6) % I use gem 'image_processing' which translates into image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) and what is even worse - doing a which vips on my MBAir M1 tells me that I don't have one - 😮 that, however, should not hinder me deploying - or? — Reply to this email directly, view it on GitHub<#219 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADTGUW5QSZVB56C7YZMONV3VZTWXDANCNFSM4KFPCQIA. You are receiving this because you commented.Message ID: @.>

libglib2.0-0 libglib2.0-dev libpoppler-glib8

it installs perfectly - but later on in the build process something chokes on Could not detect rake tasks (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError) (and "the Internet" tells me to uninstall bundler and try with another bundler) but how can adding those 2 buildpacks ahead of ruby get (the rest of) the toolchain foobar-ed?

wdiechmann commented 2 years ago

@limitlessmind and @jcupitt

thank you so much for chipping in! I decided this was not the battle for me to engage in - so I withdrew to the safer coasts of "mini_magick", (to live another day so to speak)

again my sincere gratitude for being so attentive and willing to offer assistance ❤️

jcupitt commented 2 years ago

Ideally in the future Heroku will include a libvips binary. It seems it just missed Heroku 22, unfortunately. Maybe Heroku 24.

https://github.com/heroku/heroku-buildpack-ruby/issues/1200#issuecomment-1161296337