Previously working Nexus no longer finds gems in Rubygems proxy repository for older stack

Thanks in advance for reading this. We have a product on a very old stack now – Jruby (ruby 2.2.2) and rails 3.2. We moved to Nexus to decouple from and, and it’s been working well for a couple of years. Now, a fresh gemset can find our bundler gem (1.17.3) from the nexus repo, but nothing after that, even for gems that have both gemsepec and gem in the repo. I had a similar problem earlier this year that I resolved by updating the nexus to 3.51, clearing the caches and rebuilding the indices. I just updated to 3.53 and purged/rebuilt, but that magic doesn’t work this time. The log file request.log isn’t very helpful, nor audit.log.

Any idea what it might be or better logging to find out why it thinks the gems are not present?

Hi Jeff,

Likely this relates to the removal of the dependencies API by Dependency API Deprecation - RubyGems Blog and in Nexus 3.53 we included support for /versions and /info/{gemName}.

If you use a sufficiently old version of bundler it may be trying to use the deprecated endpoints which they’ve had periods they return 404 for.

If you use a version of bundler that supports the new endpoints then this may indicate a bug in our implementation, or an issue with the particular gems you’re installing. You should be able to use -V on bundle install to get verbose output which may explain what the issue is.

versions includes rows for gems listing the available versions as well as the checksum for info/{gemName}
info/{gemName} (i.e. info/rails) should a row for each version which ought to include dependencies, requirements and the gem sha256

Thanks Matthew. It was even failing ‘gem install xxxx -v x.y.z’. However, another build environment pointed at the same repo was working. I surmised that the gemset on the failing system was corrupt somehow, and copied it over from the working system. This seems to have resolved the issue.

To follow up on this; I was confused. If the gem is already present in the gemset, bundle works. If not in your gems, it will fail whether you try ‘bundle install’ or ‘gem install’. Our bundler is indeed quite old at 1.17.3 and the gem command is 2.4.8 from ruby- The only way around it is to manually install from rubygems with something like:

gem install code ray -v 1.1.2 --source=

We’re working on getting off this old stack.