Well, why does it all of a sudden want to write that lock file? It isn’t like $SNAP has been writable with core20… something in your app behaves different in core22
You are correct. The part (Asciidoctor) that we are adding to our app (Hugo) behaves differently under core22. We have no control over the Asciidoctor pacakge.
Asciidoctor is a Ruby gem. When you install the Asciidoctor package, it installs Ruby as a dependency. With core20, the dependency is satisfied with Ruby 2.7.0. With core22, the dependency is satisfied with Ruby 3.0.0.
Again, we can’t control the Asciidoctor package, so I’m looking for suggestions:
Is there an interface that we can add?
Do we need to move to classic confinement?
Is there an idiomatic way to install a Ruby gem in core22 (the ruby plugin was last available in core18)?
i guess no interface could help with this since the problem is with ruby pointing to $SNAP ("/snap/hugo/16159/…") which is a readonly filesystem (squashfs) image.
i’m not a ruby programmer or expert but i would assume it might have a way to tell it where/how to install the gems … if you could make it use some writable space like $SNAP_COMMON or $SNAP_DATA instead of $SNAP, that should work …
I reached the same conclusion, but have been unable to craft something that works. I can find a few examples of snapcraft+ruby+gem for core18 via the ruby plugin, but none with core20 or later.