I am working to ensure that the Rails 2.3.8 application runs correctly under JRuby. Everything works fine until I turn on config.threadsafe! to achieve the concurrency that JRuby offers. This caused the modules / classes in lib / to stop loading automatically.
with config.threadsafe! included:
$ ruby script/runner -e production 'p Sim::Sim200Provisioner'
/Users/amchale/.rvm/gems/jruby-1.5.1@web-services/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:105:in `const_missing': uninitialized constant Sim::Sim200Provisioner (NameError)
from (eval):1
with config.threadsafe! disabled people:
$ ruby script/runner -e production 'p Sim::Sim200Provisioner'
Sim::Sim200Provisioner
This file lib / sim / sim200_provisioner.rb , where Sim - application / models / sim.rb . Normally in Rails there is no problem finding and downloading a file.
Do I need to manually require all of our libraries, or is there another Rails method that I am missing?