LoadError (Expected model.rb to define Model)

software development

#1

Hello,

I’m having an error that occurs in production but does
not occur in development on my local machine. The situation is that there is a model (Article), and it uses act_as_ferret for search. The error is as follows (where I say {full server path}, that’s not what the error says, just my note):

LoadError (Expected {full server path}/article.rb to define Article):
/vendor/rails/activesupport/lib/active_support/dependencies.rb:
249:in load_missing_constant' /vendor/rails/activesupport/lib/active_support/dependencies.rb: 453:inconst_missing’
/vendor/rails/activesupport/lib/active_support/dependencies.rb:
465:in const_missing' /vendor/rails/activesupport/lib/active_support/dependencies.rb: 260:inload_missing_constant’
/vendor/rails/activesupport/lib/active_support/dependencies.rb:
469:in const_missing' /app/controllers/articles_controller.rb:12:inindex’
/vendor/rails/actionpack/lib/action_controller/base.rb:1158:in
send' /vendor/rails/actionpack/lib/action_controller/base.rb:1158:inperform_action_without_filters’
/vendor/rails/actionpack/lib/action_controller/filters.rb:697:in
call_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:689:inperform_action_without_benchmark’
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
68:in perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
68:in perform_action_without_rescue' /vendor/rails/actionpack/lib/action_controller/rescue.rb:199:inperform_action_without_caching’
/vendor/rails/actionpack/lib/action_controller/caching.rb:678:in
passenger_orig_perform_action' /vendor/rails/activerecord/lib/active_record/connection_adapters/ abstract/query_cache.rb:33:incache’
/vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in
cache' /vendor/rails/actionpack/lib/action_controller/caching.rb:677:inpassenger_orig_perform_action’
/dh/passenger/lib/passenger/railz/request_handler.rb:53:in
perform_action' /vendor/rails/actionpack/lib/action_controller/base.rb:524:insend’
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in
process_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:685:inprocess_without_session_management_support’
/vendor/rails/actionpack/lib/action_controller/
session_management.rb:123:in process' /vendor/rails/actionpack/lib/action_controller/base.rb:388:inprocess’
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
171:in handle_request' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb: 115:indispatch’
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
126:in dispatch_cgi' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:indispatch’
/dh/passenger/lib/passenger/railz/request_handler.rb:38:in
process_request' /dh/passenger/lib/passenger/abstract_request_handler.rb:163:inmain_loop’
/dh/passenger/lib/passenger/railz/application_spawner.rb:296:in
start_request_handler' /dh/passenger/lib/passenger/railz/application_spawner.rb:265:inhandle_spawn_application’
/dh/passenger/lib/passenger/utils.rb:152:in safe_fork' /dh/passenger/lib/passenger/utils.rb:150:infork’
/dh/passenger/lib/passenger/utils.rb:150:in safe_fork' /dh/passenger/lib/passenger/railz/application_spawner.rb:263:inhandle_spawn_application’
/dh/passenger/lib/passenger/utils.rb:152:in safe_fork' /dh/passenger/lib/passenger/utils.rb:150:infork’
/dh/passenger/lib/passenger/utils.rb:150:in safe_fork' /dh/passenger/lib/passenger/railz/application_spawner.rb:262:inhandle_spawn_application’
/dh/passenger/lib/passenger/abstract_server.rb:306:in __send__' /dh/passenger/lib/passenger/abstract_server.rb:306:inmain_loop’
/dh/passenger/lib/passenger/abstract_server.rb:157:in
start_synchronously' /dh/passenger/lib/passenger/abstract_server.rb:124:instart’
/dh/passenger/lib/passenger/abstract_server.rb:111:in fork' /dh/passenger/lib/passenger/abstract_server.rb:111:instart’
/dh/passenger/lib/passenger/railz/application_spawner.rb:177:in
start' /dh/passenger/lib/passenger/railz/framework_spawner.rb:270:inhandle_spawn_application’
/dh/passenger/lib/passenger/railz/framework_spawner.rb:263:in
synchronize' /dh/passenger/lib/passenger/railz/framework_spawner.rb:263:inhandle_spawn_application’
/dh/passenger/lib/passenger/abstract_server.rb:306:in __send__' /dh/passenger/lib/passenger/abstract_server.rb:306:inmain_loop’
/dh/passenger/lib/passenger/abstract_server.rb:157:in
start_synchronously' /dh/passenger/lib/passenger/abstract_server.rb:124:instart’
/dh/passenger/lib/passenger/abstract_server.rb:111:in fork' /dh/passenger/lib/passenger/abstract_server.rb:111:instart’
/dh/passenger/lib/passenger/railz/framework_spawner.rb:87:in
start' /dh/passenger/lib/passenger/spawn_manager.rb:224:inspawn_rails_application’
/dh/passenger/lib/passenger/spawn_manager.rb:219:in synchronize' /dh/passenger/lib/passenger/spawn_manager.rb:219:inspawn_rails_application’
/dh/passenger/lib/passenger/spawn_manager.rb:122:in
spawn_application' /dh/passenger/lib/passenger/spawn_manager.rb:253:inhandle_spawn_application’
/dh/passenger/lib/passenger/abstract_server.rb:306:in __send__' /dh/passenger/lib/passenger/abstract_server.rb:306:inmain_loop’
/dh/passenger/lib/passenger/abstract_server.rb:157:in
`start_synchronously’
/dh/passenger/bin/passenger-spawn-server:46

For this app, Rails is frozen at 2.0.2. All gems are included in /
vendor. Any help would be most appreciated. Thanks.

Jonathan