Autoloading not working when using rake task

Hi,

I have a problem when I’m doing rake tasks. This behavior happens only
on one machine, on another three ones all works fine (three is on
ubuntu, problem one is under debian); totally identical environment (I
guess).

I’m using translator gem, loading through config.gem in environment.rb
file. Server and script/console - works fine, this happens only when
I’m doing rake tasks (in both: development and production). I’ve
researched that problem for a while (6 hours since I’ve started to get
this problem, and research how to fix it), and now I’m at 90% sure
that the problem is in the autoload method.

When I’m executing for example rake db:migrate I’m getting this
exception:

stacktrace:

rake aborted!
undefined method translate' for classActionView::Base’
/opt/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/
active_support/core_ext/module/aliasing.rb:33:in alias_method' /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/ active_support/core_ext/module/aliasing.rb:33:inalias_method_chain’
/opt/ruby/lib/ruby/gems/1.8/gems/translator-1.0.0/lib/translator.rb:
288
/opt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' /opt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
/opt/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/
active_support/dependencies.rb:156:in require' /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/ active_support/dependencies.rb:521:innew_constants_in’
/opt/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/
active_support/dependencies.rb:156:in require' /opt/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/ gem_dependency.rb:208:inload’
/opt/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:307:in
load_gems' /opt/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:307:ineach’
/opt/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:307:in
load_gems' /opt/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:164:inprocess’
/opt/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
send' /opt/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:inrun’
/home/deploy/somesite.com/releases/20100421143409/config/
environment.rb:5
/opt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' /opt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
/opt/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/
active_support/dependencies.rb:156:in require' /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/ active_support/dependencies.rb:521:innew_constants_in’
/opt/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/
active_support/dependencies.rb:156:in require' /opt/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:4 /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:incall’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:ineach’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain’
/opt/ruby/lib/ruby/1.8/monitor.rb:242:in synchronize' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in
invoke_prerequisites' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:ineach’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
invoke_prerequisites' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:ininvoke_with_call_chain’
/opt/ruby/lib/ruby/1.8/monitor.rb:242:in synchronize' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in
invoke_prerequisites' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:ineach’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
invoke_prerequisites' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:ininvoke_with_call_chain’
/opt/ruby/lib/ruby/1.8/monitor.rb:242:in synchronize' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
invoke' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:ineach’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:inrun’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:inrun’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/opt/ruby/bin/rake:19:in `load’
/opt/ruby/bin/rake:19

Please help me.
Will be very appreciate!

Anyone, where to dig?

On Apr 21, 8:17 pm, Dmitry P. [email protected]