我正在尝试在 JRuby 循环中并行处理(使用 peach),但在平稳运行大约 30 秒后因 const_missing 错误而崩溃:
lib/ruby/gems/1.8/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:452:in `load_missing_constant'
lib/ruby/gems/1.8/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:106:in `const_missing_with_dependencies'
lib/ruby/gems/1.8/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:118:in `const_missing'
lib/ruby/gems/1.8/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:463:in `load_missing_constant'
lib/ruby/gems/1.8/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:122:in `const_missing'
我正在使用 jrub 1.5.2:
C:\projects\sami\build>jruby -v
jruby 1.5.2 (ruby 1.8.7 patchlevel 249) (2010-08-20 1c5e29d) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_11) [amd64-java]
我已经设置了我的环境以启用多线程:
config.cache_classes = true
config.threadsafe!
config.dependency_loading = true if $rails_rake_task
我还可以做些什么!?
TIA