0
votes

While trying to upgrade Artifactory Pro from 3.8.0 to 4.x I run into problems using GEM repositories. While they work fine on the old version, I can't get any GEM from the 4.x server. I tried both export/import as well as replicating the repos from old to new server, but nothing works.

When trying to install GEMs with the new server added as GEM source, I always get the following output:

% gem install myfancygem
ERROR:  Could not find a valid gem 'myfancygem' (>= 0) in any repository
ERROR:  Possible alternatives: myfancygem

Any idea what could be wrong?

Thanks...

Dirk

1
Can you make sure that the repository is configured as GEM repository in Artifactory? Unlike Artifactory 3.x, Artifactory 4.x does not support multipackage per 1 repository, so in case that your repository had more than 1 type defined it might be that during the upgrade, the GEM type was not choosen. - Ariel
Do you see anything in the artifactory.log? when looking at the repository in the UI, do you see the GEM files? can you find them in the package search? - Dror Bereznitsky
Yes, all repositories containing GEMs are configured as such. - Dirk Heinrichs
No, there's nothing specific in the logs. - Dirk Heinrichs

1 Answers

2
votes

It is possible that you are facing this issue due to a fairly recent change in behavior with Gem repositories in Artifactory. In the late 4.x versions, Artifactory started relying on the "gem.name" and "gem.version" artifact properties for serving Gem install operations properly, whereas with versions 3.x and the early 4.x versions it did not. You should be able to confirm that if the uninstallable gems don't have those properties annotated on them via selecting the artifact in the Tree Browser and using the Properties tab.

This situation is fixable by re-annotating the missing properties. We can send you an Artifactory User Plugin that will do the job for you if you shoot us an email via [email protected] (you can mention this thread. Unfortunately, the plugin in question uses internal APIs so I am not able to publicly share it here). Otherwise, you will need to write a script that collectively annotates the gem files in your repository with those properties according to their respective name and version.