# Constant error in active\_resource/base

**URL:** <https://www.ruby-forum.com/t/constant-error-in-active-resource-base/175562>\
**Category:** Rails\
**Created:** [September 15, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/constant-error-in-active-resource-base/175562 "2009-09-15T17:15:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![quinn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/51bf81/32.png) [@quinn](https://www.ruby-forum.com/u/quinn)\
**Post date:** [September 15, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/constant-error-in-active-resource-base/175562/1 "2009-09-15T17:15:35Z")

</div>

I am using activeresource 2.3.3

I was using ActiveResource today and it seemed to be choking on  
namespaced xml, like this:  
media:group

on line 1057 it erred with “Wrong constant name Media:group”

first i tried on line 1048  
name = name.to\_s.gsub(’:’,’/’)

which started failing in the same place but with: “Wrong constant name  
Media::Group”

so I added this on line 1048:  
name = name.to\_s.gsub(’:’,’\_’)

which got everything working again, but this seems a little fragile to  
me. Monkey patching a gem isn’t exactly the most ideal solution. Does  
anyone have a recommendation as to how to properly fix this? How am I  
“doing it wrong” as they say.
