# Error on production server using namespaces

**URL:** <https://www.ruby-forum.com/t/error-on-production-server-using-namespaces/119692>\
**Category:** Ferret\
**Created:** [November 9, 2007, 9:36am UTC](https://www.ruby-forum.com/t/error-on-production-server-using-namespaces/119692 "2007-11-09T09:36:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![francois](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@francois](https://www.ruby-forum.com/u/francois)\
**Post date:** [November 9, 2007, 9:36am UTC](https://www.ruby-forum.com/t/error-on-production-server-using-namespaces/119692/1 "2007-11-09T09:36:26Z")

</div>

Hello,

I’ve been using the acts\_as\_ferret plugin quite successfully on my rail  
application… until i needed to add namespaces to it! Could anybody  
help me on this?

At first, my application had only one part, related to people/companies  
called “Entities”. Everything was fine, my ferret was happy.  
Then, I had to add a new part : “Publications”. I decided to split the  
application :

- The common part, with administration pages, user management,…
- The Entities part (still ferret-powered)
- The Publications part (ferret-free)

I did so by creating subfolders in my controllers / models / helpers /  
views:  
The common part stays where it is.  
The entities go to the Entities sub folder.  
The publications go to the Publications sub folder.

I got all this little world to work fine locally on my development  
environment.

Now, when it comes to deploying it to the production server, it seems to  
all go wrong. My ferret gets sick and tries to ruin everything:

NameError (uninitialized constant Entities):  
(druby://198.145.115.78:9010)  
/var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active\_support/dependencies.rb:266:in  
`load_missing_constant' (druby://198.145.115.78:9010) /var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in`const\_missing’  
(druby://198.145.115.78:9010)  
/var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active\_support/dependencies.rb:464:in  
`const_missing' (druby://198.145.115.78:9010) /var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/inflector.rb:250:in`constantize’  
(druby://198.145.115.78:9010)  
/var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active\_support/core\_ext/string/inflections.rb:148:in  
`constantize' (druby://198.145.115.78:9010) ./script/../config/../vendor/plugins/acts_as_ferret/lib/ferret_server.rb:112:in`with\_class’  
(druby://198.145.115.78:9010)  
./script/…/config/…/vendor/plugins/acts\_as\_ferret/lib/ferret\_server.rb:78:in  
`ensure_index_exists' /vendor/plugins/acts_as_ferret/lib/remote_index.rb:16:in`send’  
/vendor/plugins/acts\_as\_ferret/lib/remote\_index.rb:16:in  
`method_missing' /vendor/plugins/acts_as_ferret/lib/act_methods.rb:182:in`acts\_as\_ferret’  
/app/models/entities/spec.rb:36  
/usr/lib/ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in`require’  
/var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active\_support/dependencies.rb:495:in  
`require' /var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in`new\_constants\_in’  
/var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active\_support/dependencies.rb:495:in  
`require' /var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:104:in`require\_or\_load’  
/var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active\_support/dependencies.rb:248:in  
`load_missing_constant' /var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in`const\_missing’  
/app/controllers/entities/spec\_controller.rb:112:in `view' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in`send’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/base.rb:1095:in  
`perform_action_without_filters' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in`call\_filter’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/filters.rb:638:in  
`call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in`call’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/filters.rb:637:in  
`call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in`call\_filter’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/filters.rb:638:in  
`call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in`call’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/filters.rb:637:in  
`call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in`call\_filter’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/filters.rb:438:in  
`call' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in`call\_filter’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/filters.rb:638:in  
`call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in`call’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/filters.rb:637:in  
`call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in`perform\_action\_without\_benchmark’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/benchmarking.rb:66:in  
`perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in`measure’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/benchmarking.rb:66:in  
`perform_action_without_rescue' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in`perform\_action’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/base.rb:430:in  
`send' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in`process\_without\_filters’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/filters.rb:624:in  
`process_without_session_management_support' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in`process’  
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/base.rb:330:in  
`process' /var/lib/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in`dispatch’  
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in  
`process' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in`synchronize’  
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in  
`process' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in`process\_client’  
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in`process\_client’  
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in`initialize’  
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in`run’  
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in  
`initialize' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in`new’  
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in`run’  
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in  
`each' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in`run’  
/var/lib/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:127:in `run' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in`run’  
/var/lib/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:243  
/usr/local/bin/mongrel\_rails:18:in `load’  
/usr/local/bin/mongrel\_rails:18

I can see two lines that are directly related to my code:

```
/app/controllers/entities/spec_controller.rb:112:in `view'

```

Which is :  
110 def view  
111 begin  
112 @spec = Entities::Spec.find(params[:id])

and

```
/app/models/entities/spec.rb:36

```

Which is :  
36 acts\_as\_ferret :remote =\> true

Could anybody tell me what’s wrong with my ferret? Is there more  
information i could provide to make troubleshooting easier?

Thank you,

Francois

---

<div class="post-metadata">

**Author:** ![francois](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@francois](https://www.ruby-forum.com/u/francois)\
**Post date:** [November 9, 2007, 10:02am UTC](https://www.ruby-forum.com/t/error-on-production-server-using-namespaces/119692/2 "2007-11-09T10:02:26Z")

</div>

I forgot something:

Removing the ‘:remote =\> true’ parameter from the acts\_as\_ferret line  
makes it work fine… as long as only one user is online at a time, as  
the drb server won’t be used then.

Francois
