Stack level too deep for method missing when using drb

I set up ferret and it’s running fine normally. Now I want to hook up
the backgroundrb server. However whenever I try to do a search, I get
this error:

(druby://localhost:9010) /usr/local/lib/ruby/1.8/drb/drb.rb:1075:in
method_missing' (druby://localhost:9010) ./vendor/plugins/acts_as_ferret/lib/remote_index.rb:20:infind_id_by_contents’
(druby://localhost:9010)
./vendor/plugins/acts_as_ferret/lib/ferret_server.rb:68:in
method_missing' (druby://localhost:9010) /usr/local/lib/ruby/1.8/drb/drb.rb:1078:inmethod_missing’
(druby://localhost:9010)
./vendor/plugins/acts_as_ferret/lib/remote_index.rb:20:in
find_id_by_contents' (druby://localhost:9010) ./vendor/plugins/acts_as_ferret/lib/ferret_server.rb:68:inmethod_missing’

(druby://localhost:9010)
./vendor/plugins/acts_as_ferret/lib/remote_index.rb:20:in
find_id_by_contents' (druby://localhost:9010) ./vendor/plugins/acts_as_ferret/lib/ferret_server.rb:68:inmethod_missing’
(druby://localhost:9010) /usr/local/lib/ruby/1.8/drb/drb.rb:1552:in
perform_without_block' (druby://localhost:9010) /usr/local/lib/ruby/1.8/drb/drb.rb:1512:inperform’
(druby://localhost:9010) /usr/local/lib/ruby/1.8/drb/drb.rb:1586:in
main_loop' (druby://localhost:9010) /usr/local/lib/ruby/1.8/drb/drb.rb:1582:inmain_loop’
(druby://localhost:9010) /usr/local/lib/ruby/1.8/drb/drb.rb:1578:in
main_loop' (druby://localhost:9010) /usr/local/lib/ruby/1.8/drb/drb.rb:1427:inrun’
(druby://localhost:9010) /usr/local/lib/ruby/1.8/drb/drb.rb:1424:in
run' (druby://localhost:9010) /usr/local/lib/ruby/1.8/drb/drb.rb:1344:ininitialize’
(druby://localhost:9010) /usr/local/lib/ruby/1.8/drb/drb.rb:1624:in
start_service' (druby://localhost:9010) ./vendor/plugins/acts_as_ferret/lib/ferret_server.rb:45:instart’
(druby://localhost:9010) (eval):55
(druby://localhost:9010)
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
eval' (druby://localhost:9010) /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb:45 (druby://localhost:9010) /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
(druby://localhost:9010) script/runner:3
#{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/remote_index.rb:20:in
find_id_by_contents' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:82:infind_id_by_contents’
#{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:134:in
ar_find_by_contents' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:128:infind_records_lazy_or_not’
#{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:54:in
find_by_contents' #{RAILS_ROOT}/app/models/video.rb:257:infull_text_search’

I’m using AAF from
svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret
and the ferret 0.11.4 gem. Rails 1.2.3. Any ideas?

Pat

On Wed, Apr 18, 2007 at 09:35:44PM +0200, Pat M. wrote:

I set up ferret and it’s running fine normally. Now I want to hook up
the backgroundrb server. However whenever I try to do a search, I get
this error:

[…]

I’m using AAF from
svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret
and the ferret 0.11.4 gem. Rails 1.2.3. Any ideas?

We had this some days before on the list. The cause seems to be that
models get loaded during Rails initialization, before the server gets
loaded. So these models think they don’t run in the server, leading to
the endless loop.

To fix this, upgrade to aaf trunk and run your server with the
environment
variable FERRET_USE_LOCAL_INDEX set to ‘1’.

Jens


Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[email protected] | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa