Forum: Ferret stack level too deep for method missing when using drb

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2007-04-18 21:35
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:in
`find_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:in
`method_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:in
`method_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:in
`method_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:in
`perform'
(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:in
`main_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:in
`run'
(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:in
`initialize'
(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:in `start'
(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:in
`require'
(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:in
`find_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:in
`find_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:in `full_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
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2007-04-19 00:15
(Received via mailing list)
On Wed, Apr 18, 2007 at 09:35:44PM +0200, Pat Maddox 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
kraemer@webit.de | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
This topic is locked and can not be replied to.