# 'private' gems/gems hierarchy

**URL:** <https://www.ruby-forum.com/t/private-gems-gems-hierarchy/48865>\
**Category:** Ruby\
**Created:** [November 25, 2005, 9:50pm UTC](https://www.ruby-forum.com/t/private-gems-gems-hierarchy/48865 "2005-11-25T21:50:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danyc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecd19e/32.png) [@danyc](https://www.ruby-forum.com/u/danyc)\
**Post date:** [November 25, 2005, 9:50pm UTC](https://www.ruby-forum.com/t/private-gems-gems-hierarchy/48865/1 "2005-11-25T21:50:08Z")

</div>

Greetings,  
_disclaimer: just installed rubygems, so no pratical experience and only  
skim some docs_

There has been some questions/comments about how to get ruby ‘accepted’  
in your work environment. I was hoping to use the ‘build it and they  
will come approach’. I.e. code some utilities to help in job function.  
In order to be successful, not only the utilities need to be useful,  
but ‘easy’ to distribute. The utilities would be very ‘corporate’  
specific. I would not need (and in some cases, not want) them to be  
'publicly available. I guess the gem could be ‘distributed’ on a  
private system, but then why ‘polute’ the gem ‘index/repository’ with  
those entries.

Is is currently possible to create/setup a hierarchy. I would like to  
use standard gem commands that would ‘query’ a private server first, but  
that could ‘redirect’ the query to the ‘public’ gem site, if query does  
not match on the private server.

Hope I am making some sense.  
Any pointers appreciated,  
Dany

---

<div class="post-metadata">

**Author:** ![danyc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecd19e/32.png) [@danyc](https://www.ruby-forum.com/u/danyc)\
**Post date:** [November 25, 2005, 10:06pm UTC](https://www.ruby-forum.com/t/private-gems-gems-hierarchy/48865/2 "2005-11-25T22:06:15Z")

</div>

From: “Dany C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> There has been some questions/comments about how to get ruby ‘accepted’  
> in your work environment. I was hoping to use the ‘build it and they  
> will come approach’. I.e. code some utilities to help in job function.  
> In order to be successful, not only the utilities need to be useful,  
> but ‘easy’ to distribute.

Sorry I can’t answer your gems question, but RubyScript2Exe is another  
way to make easily distributable ruby scripts:

[http://www.erikveen.dds.nl/rubyscript2exe/index.html#6.0.0](http://www.erikveen.dds.nl/rubyscript2exe/index.html#6.0.0)

Hope this helps,

Bill

---

<div class="post-metadata">

**Author:** ![danyc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecd19e/32.png) [@danyc](https://www.ruby-forum.com/u/danyc)\
**Post date:** [November 25, 2005, 10:38pm UTC](https://www.ruby-forum.com/t/private-gems-gems-hierarchy/48865/3 "2005-11-25T22:38:47Z")

</div>

Dany C. wrote:  
…

> Is is currently possible to create/setup a hierarchy. I would like to  
> use standard gem commands that would ‘query’ a private server first, but  
> that could ‘redirect’ the query to the ‘public’ gem site, if query does  
> not match on the private server.

You can specify what URL to use to fetch gems. For your case, you could  
set this to a local network URL.

(Some folks already do stuff like this, releasing beta or unstable gems  
by hosting them on public, though non-standard, gem server locations. )

I _think_ it is possible to set this in a gem config file so that users  
do not have to type it out on each gem install. Or wrap it in script so  
that users can more easily opt to install from the local net or the  
public gem repositories.

James

–

[http://www.ruby-doc.org](http://www.ruby-doc.org) - Ruby Help & Documentation  
[Ruby Code & Style](http://www.artima.com/rubycs/) - Ruby Code & Style: Writers wanted  
[http://www.rubystuff.com](http://www.rubystuff.com) - The Ruby Store for Ruby Stuff  
[http://www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys  
[http://www.30secondrule.com](http://www.30secondrule.com) - Building Better Tools

---

<div class="post-metadata">

**Author:** ![danyc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecd19e/32.png) [@danyc](https://www.ruby-forum.com/u/danyc)\
**Post date:** [November 25, 2005, 11:55pm UTC](https://www.ruby-forum.com/t/private-gems-gems-hierarchy/48865/4 "2005-11-25T23:55:38Z")

</div>

danyc wrote:

> There has been some questions/comments about how to get ruby ‘accepted’  
> in your work environment. I was hoping to use the ‘build it and they  
> will come approach’. I.e. code some utilities to help in job function.  
> In order to be successful, not only the utilities need to be useful,  
> but ‘easy’ to distribute. The utilities would be very ‘corporate’  
> specific. I would not need (and in some cases, not want) them to be  
> 'publicly available. I guess the gem could be ‘distributed’ on a  
> private system, but then why ‘polute’ the gem ‘index/repository’ with  
> those entries.
> 
> Is is currently possible to create/setup a hierarchy. I would like to  
> use standard gem commands that would ‘query’ a private server first, but  
> that could ‘redirect’ the query to the ‘public’ gem site, if query does  
> not match on the private server.

Yes, it is easy to setup a private gem server. See  
[http://docs.rubygems.org/read/chapter/18#page81](http://docs.rubygems.org/read/chapter/18#page81) for details.

To use your own repository, just specify the --source parameter on the  
gem command line to point to your URL you have setup.

Currently, RubyGems will attempt to satisfy all of its dependencies from  
a single source. This limitation will be removed in the future.

– Jim W.
