Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
Christian Meier edited this page Nov 19, 2013 · 9 revisions

Nexus Hosted Ruby Gems

Nexus allows to run a rubygems repository where you can upload/download gems.

setup on nexus server

just login into nexus, i.e.

http://localhost:8081/nexus

go to repositories and add a hosted repository and choose as provider 'Rubygems'. you can allow redeployment of gems or not.

nexus gem command or gem extension

this command allows to upload gems to nexus hosted repository. having an extra gem command for this allows to continue using gem push ... for rubygems.org (which is kind of hardcoded into the push command) and gem nexus ... for the nexus repository.

install the nexus gem

gem install nexus

to upload (or push) a gem on a hosted nexus gem repository use

gem nexus my-1.0.gem

when doing the upload for the first time the url of the repo and the credentials are prompted. these data will be stored in $HOME/.gem/nexus.

in case you need to clear your credentials and/or nexus url just use --clear-config option:

gem nexus --clear-config

using nexus ruby repository with gem commands

add your hosted repository to [rubygems sources](Rubygems setup).

now you can install the gems from that repository with (where my is the name of gem you want to install from the nexus repository)

gem install my_gem

nexus web GUI

while browsing the repository pulldown menu allows you to delete files which only works on server side if the consistency of the repository can be maintained. i.e. you can not delete the specs.4.8.gz file or any file in quick/Marshal.4.8 which are the metadata, but you can delete any gem and the respective metadata will be updated as well.

scheduled task

there is scheduled task Rebuild Rubygems Metadata Files which uses only the uploaded gems to rebuild all the metadata files for the ruby repository. that can be handy if for some reason some files got corrupted.

enjoy !

Clone this wiki locally