# Ultrasphinx: Anonymous modules have no name to be referenced by

**URL:** <https://www.ruby-forum.com/t/ultrasphinx-anonymous-modules-have-no-name-to-be-referenced-by/132472>\
**Category:** Rails\
**Created:** [March 20, 2008, 3:03pm UTC](https://www.ruby-forum.com/t/ultrasphinx-anonymous-modules-have-no-name-to-be-referenced-by/132472 "2008-03-20T15:03:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![blinking\_bear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Post date:** [March 20, 2008, 3:03pm UTC](https://www.ruby-forum.com/t/ultrasphinx-anonymous-modules-have-no-name-to-be-referenced-by/132472/1 "2008-03-20T15:03:38Z")

</div>

I’m deploying an app to FreeBSD and when I run the ultrasphinx:configure  
rake task I get the output:

Anonymous modules have no name to be referenced by  
vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:402:in  
`to_constant_name' vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:214:in`qualified\_name\_for’  
vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:477:in  
`const_missing' vendor/plugins/ultrasphinx/lib/ultrasphinx/configure.rb:32:in`load\_constants’  
vendor/plugins/ultrasphinx/lib/ultrasphinx/configure.rb:39:in `run’  
vendor/plugins/ultrasphinx/tasks/ultrasphinx.rake:20

I can’t seem to figure out what the issue is. It works fine in  
development. Any ideas would be greatly appreciated.

thanks

---

<div class="post-metadata">

**Author:** ![blinking\_bear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Post date:** [April 1, 2008, 3:30pm UTC](https://www.ruby-forum.com/t/ultrasphinx-anonymous-modules-have-no-name-to-be-referenced-by/132472/2 "2008-04-01T15:30:30Z")

</div>

Wow!

I’ve got the same problem and didnt find anything on google.it seems  
just a few people have this issue.May there’s something to do with the  
sphinx lib version.What version are you using? 0.9.8rc2?

Thankz!

---

<div class="post-metadata">

**Author:** ![blinking\_bear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Post date:** [April 11, 2008, 9:12am UTC](https://www.ruby-forum.com/t/ultrasphinx-anonymous-modules-have-no-name-to-be-referenced-by/132472/3 "2008-04-11T09:12:06Z")

</div>

I have the same problem with sphinx-0.9.8-rc2

I was able to fix the problem by changing the last call in the  
load\_constants method from  
# Build the field-to-type mappings.  
Fields.instance.configure(MODEL\_CONFIGURATION)  
to  
# Build the field-to-type mappings.  
Ultrasphinx::Fields.instance.configure(MODEL\_CONFIGURATION)

Hope this helps

Chris

---

<div class="post-metadata">

**Author:** ![blinking\_bear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Post date:** [June 7, 2008, 10:24am UTC](https://www.ruby-forum.com/t/ultrasphinx-anonymous-modules-have-no-name-to-be-referenced-by/132472/4 "2008-06-07T10:24:49Z")

</div>

Thanks Chris! It helped me with sphinx-0.9.8-rc2 on Windows (using  
cygwin). I was following these instructions for installing and needed  
your help 🙂

> **[Installing Sphinx & Ultrasphinx on Windows](https://www.cordinc.com/blog/2008/03/installing-sphinx-ultrasphinx.html)**

Regards,  
Lenart

Chris Douglas wrote:

> I have the same problem with sphinx-0.9.8-rc2
> 
> I was able to fix the problem by changing the last call in the  
> load\_constants method from  
> # Build the field-to-type mappings.  
> Fields.instance.configure(MODEL\_CONFIGURATION)  
> to  
> # Build the field-to-type mappings.  
> Ultrasphinx::Fields.instance.configure(MODEL\_CONFIGURATION)
> 
> Hope this helps
> 
> Chris
