Help with Bizarre Error

I’m getting a very bizarre error:

NameError in LandlordsController#search

uninitialized constant Landlord

RAILS_ROOT: /var/rails/rental/public/…/config/…
Application Trace | Framework Trace | Full Trace

const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:inconst_missing’
send' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:inconst_missing’
#{RAILS_ROOT}/app/controllers/landlords_controller.rb:38:in `search’

Here is the call in the landlords_controller.rb file:

def search
@landlords = Landlord.find(:all, :order=>‘company_name’,
:conditions => [“company_id = ? AND active = 1”,

Landlord is a model class, that is defined in landlord.rb in the models

The really bizarre part is this: I made a duplicate of the application
directory and the copies are identical. When running in one of the app
directorys, the application runs fine. In the other directory, it give
the error. This same behavior occurs when using both lighttpd and

Ruby: 1.8.2
Rails: 1.1.6
MySQL: 4.1

Any ideas/help would be greatly appreciated.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs