March 23, 2023

Maintaining my micromount database

These are notes for myself primarily. My micromount database is a ruby application that runs on a linux computer. The application uses a variety of ruby packages, including gtk3 and sqlite3.

I run Fedora, and ruby packages are always a problem. Do we get them from the Fedora package system, or via the ruby gem system?

Busted as of 8-4-2021

I haven't run the database for a while, have upgraded to the latest Fedora (which is Fedora 34 as of August, 2021) and I get the following when I try to start the application:

Ignoring atk-3.4.3 because its extensions are not built. Try: gem pristine atk --version 3.4.3
Ignoring glib2-3.4.3 because its extensions are not built. Try: gem pristine glib2 --version 3.4.3
Ignoring sqlite3-1.4.2 because its extensions are not built. Try: gem pristine sqlite3 --version 1.4.2
I get a lot of other chatter too, but the crucial issue seems to be that it cannot find the sqlite3 package. Indeed, if I just fire up ruby and type "require sqlite3" I get the same errors. Fedora does offer a package "rubygem-sqlite3.x86_64". I install it using the command
su
dnf install rubygem-sqlite3
But I continue to get the same error. I decide to take the hint given in the error and try:
su
gem pristine atk --version 3.4.3
gem pristine glib2 --version 3.4.3
gem pristine sqlite3 --version 1.4.2
This does not work (it says if "Failed to find gems").

So I try doing it as a plain old user (myself) and it works:

gem pristine atk --version 3.4.3
gem pristine glib2 --version 3.4.3
gem pristine sqlite3 --version 1.4.2
Who knows why this kind of crap is necessary. Python is not better with multiple versions of python and utter confusion about packages and python versions. There is only one answer. Shoot the developers! We don't want slick new versions that cause trouble, we want old crusty versions that work.

Here we go again 3-22-2023

This sort of thing makes me contemplate moving to Python. Or maybe just compiled C -- it honestly would be less work to maintain a compiled C application. Python has its own similar problems, but not as bad or as frequent as ruby.

As per notes above, the first thing is to do the following as user "tom":

gem pristine atk --version 3.4.3
gem pristine glib2 --version 3.4.3
gem pristine sqlite3 --version 1.4.2
And that does it! Well, that was only 5 minutes of work -- there were a bunch of other frightening errors related to sqlite3, but they are apparently all fixed by doing the "gem pristine" thing.

Here we go again 5-30-2023

Pretty much the same game as before. The crucial gem is sqlite3. I'm not even sure what "atk" is. Attempting the "gem pristine glib2 --version 3.4.3" now blows up with a bunch of compile errors. This is clearly not my problem, and curiously it doesn't matter. I can now type "micros" and my application runs just fine. Perhaps there is an unnecessary dependency on glib2?

But I can't leave well enough alone. I do this:

su
gem uninstall glib2
gem install glib2
The uninstall gets rid of 3.3.6, the install gives me 4.1.6. I get warned that atk and cairo depend on glib2. Note that there is confusion between packages installed by Fedora, gems installed by root, and gems installed by tom. I am still getting a warning about glib2-3.4.3, which apparently is installed by "tom". When I try (as tom) to uninstall glib2, I get the error "You don't have write permissions for the /usr/share/gems directory". This would seem to be a bug. I am feeling cranky, so I do this as "tom"
rm -rf /home/tom/.gem
And now my database starts up just fine, and without warning. On with the show.
Feedback? Questions? Drop me a line!

Tom's Mineralogy Info / tom@mmto.org