Uploading gems with Ruby 3

The Nexus gem does not work in Ruby 3. It is also archived, so I can’t submit a PR to fix the issue. This appears to be the official method of pushing gems to the Nexus Repository Manager based on this documentation. Is there another way to push gems to Nexus? I tried gem push but it appears that the API is different and gem push does not work.

you can push to it just fine using
gem push --host https://<user:password@ | token><nexus_url>/repository/<reponame>/ pkg/<gemarchive>.gem

Thanks for posting. I think I was missing the correct path back when I was trying to solve this.

it’s not working here with teh latest OSS 3.60.0-02, I got below prompt but after type in email and password,nothing happened,pls help @lzridge.04 @tmarien

I had the same problem, but I was able to upload gems using the Nexus API.

curl --fail-with-body -XPOST \
  'https://username:password@your.nexus.host/service/rest/v1/components?repository=your-gem-repository' \
  -H 'accept: application/json' -H 'Content-Type: multipart/form-data' \
  -F 'rubygems.asset=@your-gem.gem'