Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Rubygems setup

Christian Meier edited this page Jul 1, 2013 · 3 revisions

Using Nexus with Rubygems commands

whether you have a nexus hosted rubygems or nexus proxy or a nexus group you can add it as source to the rubygems system by (mind the trailing slash !!)

gem sources --add http://localhost:8081/nexus/content/repositories/my-repo/

now the list command list the gems from all configured sources including the nexus repository

gem list --remote

add nexus rubygems repository

with most rubygems command you can add another source url. to add nexus rubygems repositories as source use something like

gem list --source http://localhost:8081/nexus/content/repositories/my-repo/

if you want only the nexus url you can use something like

gem install --clear-source --source http://localhost:8081/nexus/content/repositories/my-repo/ rails

just use the nexus server

suppose you have

  • a nexus proxy to rubygems.org and
  • only rubygems.org configured for gem command

then you want to use just the proxy with all the gem commands.

gem sources  --remove http://rubygems.org/ --add http://localhost:8081/nexus/content/repositories/gems/

see the configured sources:

gem sources

Clone this wiki locally