-
Notifications
You must be signed in to change notification settings - Fork 7
Hosted
Nexus allows to run a rubygems repository where you can upload/download gems.
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.
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
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
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.
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 !