[Rubygems-developers] Specifying a remote source
gsinclair at soyabean.com.au
Sat Jun 12 22:38:44 EDT 2004
Something we've occasionally talked about is incorporating arbitrary
remote sources into the overall operation of 'gem'. Well, now it's
come up on ruby-talk:103355, from Joel VanderWerf:
> Is it possible to set up one's own gem repository and select it from
> the gem command line? I'm looking for ways of distributing software
> that is of no real interest to the ruby community, but is needed by
> a few people where I work.
If Rich didn't have a lock on the repository, I'd probably implement
something, but it's probably best to scope it out anyway. Also, with
the pending rearrangement of commands, it's probably easier and/or
Here are some thoughts.
In the following command, http://joel:8808 becomes one available
source for whatever command is performed. 'blah' will be installed,
but from any available source, not necessarily the one specified.
gem --source http://joel:8808 install blah
In the following command, '--source http://joel:8808 ' is a specific
argument to the 'install' command, so it is the *only* source used.
gem install blah --source http://joel:8808
Likewise, to list the gems available in that particular place:
gem list --source http://joel:8808
And to list gems available at the usual places *plus* Joel's machine:
gem --source http://joel:8808 list
Finally, you can specify additional sources in the config file:
With that config file, all gem commands are implicitly
gem --source http://joel:8808 --source http://sam:8808 ...
Does that sound reasonable?
If the above functionality were implemented, the next logical step
gem install-all --source http://joel:8808
which would be a great feature. I'm sure Rich would agree, as he has
to maintain a consistent Ruby setup among hundreds of machines.
More information about the Rubygems-developers