# Gem Namespaces

**URL:** <https://www.ruby-forum.com/t/gem-namespaces/84368>\
**Category:** Ruby\
**Created:** [February 3, 2007, 6:43pm UTC](https://www.ruby-forum.com/t/gem-namespaces/84368 "2007-02-03T18:43:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 3, 2007, 6:43pm UTC](https://www.ruby-forum.com/t/gem-namespaces/84368/1 "2007-02-03T18:43:59Z")

</div>

Hi–

I know I will probably be lambasted by the usual lambasting sort,  
nonetheless I think its worth suggesting that all gems have a project  
namespace. As things stand a project on Rubyforge can create gems with  
any name at all --which can readily conflict with gems in another  
project. A few projects in particular suck up lots of name real-  
estate, in just 3 projects alone one can find 59 gems, some with names  
as simple as “traits”.

I realize the community has done pretty well in working together to  
avoid conflicts. But as RubyForge grows this becomes increasingly more  
difficult – not to mention annoying.

So I’m thinking perhaps gems should be referenced with a namspece  
attached. For example instead of

gem install traits

do:

gem install codeforpeople:traits

Perhaps we could still use the former too, but if there is conflict  
the gem app can ask us which project is intended. Or something to that  
effect. Has anyone else considered remedies for this?

Thanks,  
T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 3, 2007, 6:50pm UTC](https://www.ruby-forum.com/t/gem-namespaces/84368/2 "2007-02-03T18:50:59Z")

</div>

On 2/3/07, Trans [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> the gem app can ask us which project is intended. Or something to that  
> effect. Has anyone else considered remedies for this?

RubyForge currently ensures that the only traits gem that will exist  
on RubyForge is the one from codeforpeople – because they were the  
first to release such. It’s not quite a namespace, but it prevents the  
conflict you were talking about.

There are, I think, worse problems than possible gem name collisions  
(require-able contents collisions are more likely, IMO).

-austin

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 3, 2007, 8:04pm UTC](https://www.ruby-forum.com/t/gem-namespaces/84368/3 "2007-02-03T20:04:08Z")

</div>

On Feb 3, 12:49 pm, “Austin Z.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> RubyForge currently ensures that the only traits gem that will exist  
> on RubyForge is the one from codeforpeople – because they were the  
> first to release such. It’s not quite a namespace, but it prevents the  
> conflict you were talking about.

That’s too bad, I think. For instance, I have my own rendition of  
rubyforge.rb that I made based on the Ara’s original. This script used  
to be tucked away in the Reap project, but I’m reorgainizing my tools  
and I was thinking of releasing this separately. But what wll I call  
it since “rubyforge” is already used? Are other’s going to be happy if  
I call it “rubyforge2” ?

> There are, I think, worse problems than possible gem name collisions  
> (require-able contents collisions are more likely, IMO).

Luckily if two projects have similar names it probably b/c they serve  
nearly the same purpose and you’d use only one or the other. But your  
right, that’ can be a problem too.

T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 4, 2007, 1:00am UTC](https://www.ruby-forum.com/t/gem-namespaces/84368/4 "2007-02-04T01:00:29Z")

</div>

On Sun, 2007-02-04 at 02:43 +0900, Trans wrote:

> I know I will probably be lambasted by the usual lambasting sort,  
> nonetheless I think its worth suggesting that all gems have a project  
> namespace. As things stand a project on Rubyforge can create gems with  
> any name at all --which can readily conflict with gems in another  
> project. A few projects in particular suck up lots of name real-  
> estate, in just 3 projects alone one can find 59 gems, some with names  
> as simple as “traits”.

A note on this - anyone on RubyForge can create and release a gem called  
anything they want. I could create a Rails 4.2 gem and release it on my  
“foo” project. It just won’t get deployed to the RubyForge gem index.  
But people can still come to my “foo” project and download the gem via  
the regular file download pages and then install it.

Another option is to set up a gem index on your project’s virtual host -  
[foo.rubyforge.org](http://foo.rubyforge.org) - and folks can install with gem --source.

Those options may alleviate the namespacing problem somewhat; food for  
thought, anyhow.

Yours,

tom

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 4, 2007, 1:55am UTC](https://www.ruby-forum.com/t/gem-namespaces/84368/5 "2007-02-04T01:55:32Z")

</div>

On Feb 3, 2007, at 11:02, Trans wrote:

> I have my own rendition of rubyforge.rb that I made based on the  
> Ara’s original. This script used to be tucked away in the Reap  
> project, but I’m reorgainizing my tools  
> and I was thinking of releasing this separately. But what wll I  
> call it since “rubyforge” is already used? Are other’s going to be  
> happy if I call it “rubyforge2” ?

Why don’t you instead adapt your changes into a patch and file it in  
the codeforpeople tracker? There’s no sense in having an extra  
version lying around just because you added one or two things.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 4, 2007, 2:37am UTC](https://www.ruby-forum.com/t/gem-namespaces/84368/6 "2007-02-04T02:37:39Z")

</div>

On Feb 3, 7:55 pm, Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> the codeforpeople tracker? There’s no sense in having an extra  
> version lying around just because you added one or two things.

It not just one or two things, though. It’s a good bit different in  
how it deals with config information. Mine was based on pre 0.0.0  
version and I made modification in scraping project information too  
but in a very different way than codeforpeople, ie. it doesn’t require  
the setup stage, but scrapes the info on the fly and just logs in  
automatically when you do stuff. I’d be happy to contribute it, but it  
is a significant shift in functionality (though the fundamentals are  
still the same – for example I recently reused the URI and post news  
code from the lastest codeforpeople version quite easily).

Aside, I sort of wish it didn’t use HTTPAccess2, it seems quite a  
hefty lib for what rubyforge.rb is using it for. But I’m not sure,  
maybe there’s no better option.

T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 5, 2007, 8:03pm UTC](https://www.ruby-forum.com/t/gem-namespaces/84368/7 "2007-02-05T20:03:59Z")

</div>

On Feb 3, 2007, at 17:37, Trans wrote:

> > Why don’t you instead adapt your changes into a patch and file it in  
> > still the same – for example I recently reused the URI and post news  
> > code from the lastest codeforpeople version quite easily).

Ryan implemented an auto-config, but still as a separate stage… It  
would have been nice to know about your patch before we did it. I’d  
still take a look.

> Aside, I sort of wish it didn’t use HTTPAccess2, it seems quite a  
> hefty lib for what rubyforge.rb is using it for. But I’m not sure,  
> maybe there’s no better option.

HTTPAccess2 has sessions stuff built-in. _shrug_.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 5, 2007, 11:48pm UTC](https://www.ruby-forum.com/t/gem-namespaces/84368/8 "2007-02-05T23:48:32Z")

</div>

On Feb 5, 2:15 pm, removed\_email\_address@domain.invalid wrote:

> On Tue, 6 Feb 2007, Eric H. wrote:
> 
> > Ryan implemented an auto-config, but still as a separate stage… It would  
> > have been nice to know about your patch before we did it. I’d still take a  
> > look.
> 
> i’m with eric. when you take a wrong turn on the trail turn back fast! not  
> that i’m saying YOU took a wrong turn, but we’ve forked and, the longer we  
> continue, the harder it will be. rubyforge cannot possibly by important  
> enough as a script to require a forked project right?

fair enough. I’ll send you a copy of mine and see waht we can work  
out.

> - debug support. i had to use this heavily as http-access2 itself had  
> several bugs i worked in runtime patches for
> 
> - cookie support
> 
> - redirection support
> 
> these were all things i had no interest in maintaining myself.

those are all good reasons.

> it would easy to replace http-access2 with something else if you have a  
> suggestion?

i don’t know of any.

t.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 5, 2007, 8:16pm UTC](https://www.ruby-forum.com/t/gem-namespaces/84368/9 "2007-02-05T20:16:02Z")

</div>

On Tue, 6 Feb 2007, Eric H. wrote:

> Ryan implemented an auto-config, but still as a separate stage… It would  
> have been nice to know about your patch before we did it. I’d still take a  
> look.

i’m with eric. when you take a wrong turn on the trail turn back fast!  
not  
that i’m saying YOU took a wrong turn, but we’ve forked and, the longer  
we  
continue, the harder it will be. rubyforge cannot possibly by important  
enough as a script to require a forked project right?

> > Aside, I sort of wish it didn’t use HTTPAccess2, it seems quite a hefty lib  
> > for what rubyforge.rb is using it for. But I’m not sure, maybe there’s no  
> > better option.
> 
> HTTPAccess2 has sessions stuff built-in. _shrug_.

i initiallly used http-access2 for 4 reasons

- proxy support

- debug support. i had to use this heavily as http-access2 itself  
had  
several bugs i worked in runtime patches for

- cookie support

- redirection support

these were all things i had no interest in maintaining myself.

it would easy to replace http-access2 with something else if you have a  
suggestion?

cheers.

-a
