# Namespace conflicts

**URL:** <https://www.ruby-forum.com/t/namespace-conflicts/60480>\
**Category:** Ruby\
**Created:** [May 14, 2006, 3:13pm UTC](https://www.ruby-forum.com/t/namespace-conflicts/60480 "2006-05-14T15:13:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgreenly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Post date:** [May 14, 2006, 3:13pm UTC](https://www.ruby-forum.com/t/namespace-conflicts/60480/1 "2006-05-14T15:13:02Z")

</div>

Good morning, everyone.

I’m curious as to how I can resolve some namespace conflicts. I’m  
writing a  
Rails app (although this problem should be agnostic), and wrote a  
Payment  
model (which is a class for those that don’t use Rails) for my app.

I also have need to use the Payment gem from ruby forge, which uses  
‘Payment’ as the name for the module.

I obviously have a conflict here, but I’m wondering if anyone has any  
interesting ideas as to how I can solve it.

As far as I see it, I’ll need to rename one of the two objects.

Thanks to everyone,

Michael

---

<div class="post-metadata">

**Author:** ![mgreenly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Post date:** [May 14, 2006, 7:59pm UTC](https://www.ruby-forum.com/t/namespace-conflicts/60480/2 "2006-05-14T19:59:46Z")

</div>

Whoah. Thanks for that.

---

<div class="post-metadata">

**Author:** ![mgreenly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Post date:** [May 14, 2006, 6:22pm UTC](https://www.ruby-forum.com/t/namespace-conflicts/60480/3 "2006-05-14T18:22:18Z")

</div>

On May 14, 2006, at 9:12 AM, Michael G. wrote:

> I obviously have a conflict here, but I’m wondering if anyone has any  
> interesting ideas as to how I can solve it.
> 
> As far as I see it, I’ll need to rename one of the two objects.
> 
> Thanks to everyone,
> 
> Michael

Nest your app in it’s own namespace?

module Gorsuch  
class Payment \< ActiveRecord::Base  
…  
end  
end

Gorsuch::Payment.new #etc.
