To edit pages or tickets please login with username/password: aaf/aaf

Ticket #191 (closed defect: fixed)

Opened 10 months ago

Last modified 8 months ago

acts_as_ferret generetas strange erros in production mode for Rails 2.0.1

Reported by: aaf Assigned to: jk
Priority: major Milestone: 0.5
Component: 0plugin Version:
Keywords: Cc:

Description

Hi,

Im using acts_as_ferret 0.4.3 with ferret server 0.11.6 with Ruby 1.8.6 and Rails 2.0.1 and it successfully works in development mode. Into production mode when running any action action related to a model for whom ferret was enabled (acts_as_ferret :fields => ..) I get an error like :

LoadError? (Expected .../app/models/ModelName.rb to define ModelName?): of course inside ModelName?.rb I have the ModelName? class defined and inheriting ActiveRecord::Base.

I might be wrong but all my searches came down to ferret. If I remove the acts_as_ferret :fiels line from my Models everuthing works fine.

Please tell me if anyone else encountered the same behavior when moving to Rails >2.0

(it worked fine for Rails 1.2.3 and Rails 1.2.5)

Attachments

server_manager.rb.patch (0.9 kB) - added by aaf on 01/12/08 00:09:04.

Change History

01/06/08 21:09:23 changed by jk

  • status changed from new to assigned.

Hi, I didn't do any testing of aaf with Rails 2.x yet. Atm the test suite runs fine with Rev. 7358 (which was quite some time before 2.0). I'll try to check against the latest release asap.

01/06/08 21:37:23 changed by jk

Update: Tests run fine with 2.0.2 What happens when you open a console in production mode and just load the model class in question by typing it's name?

01/10/08 15:22:21 changed by aaf

Different user, same problem -- stopped working when I upgraded to 2.0.2 in production only (same version works fine in dev). Error in prod console is:

LoadError?: Expected /usr/local/rails/MYPROJ/releases/20080110001338/app/models/MYMODEL.rb to define MYMODEL

from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:249:in `load_missing_constant' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in `const_missing' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:465:in `const_missing' from (irb):1

(follow-up: ↓ 5 ) 01/11/08 11:08:22 changed by aaf

  • priority changed from major to critical.
  • milestone set to 0.5.

Identical issue. Using 2.0.2. Any updates or solutions?

(in reply to: ↑ 4 ) 01/11/08 23:17:26 changed by aaf

  • priority changed from critical to major.

Replying to aaf:

Identical issue. Using 2.0.2. Any updates or solutions?

Error caused by the ferret_server not starting. Start manually and pass the rails root argument. Then start Rails in production mode. It will then work. This can be fixed by updating the server manager to automatically determine the Rails root (better).

Model caching in production mode is troublesome though, since it requires making sure the drb server is running first, otherwise the bad model is cached.

01/12/08 00:09:04 changed by aaf

  • attachment server_manager.rb.patch added.

02/02/08 20:53:08 changed by jk

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in trunk - the DRb server now raises a more descriptive error mentioning the --root option. Thanks for tracking this down, and for the patch.

In addition the application won't bail out anymore when the DRb server isn't running, but log an error instead to ferret_index.log and continue to work, without index updates and with empty search results (see Ticket #149)

To edit pages or tickets please login with username/password: aaf/aaf