$rails_rake_task not set correctly #4591

Closed
jviney opened this Issue Jan 21, 2012 · 0 comments

2 participants

@jviney

I am having trouble with a Rails 3.2 application always eager loading the application, even during a rake task. Previously, the $rails_rake_task variable was used by Rails to prevent this happening during startup.

Since 8ef1ec4 the value of $rails_rake_task is always set to nil.

During startup the value is set to true by Rails::Application#initialize_tasks, but at least in the startup of this app rails/application/finisher.rb is loaded after #initialize_tasks is called, and sets the value back to nil.

I've attached a different fix for the global variable warning that doesn't cause this problem.

@jviney jviney added a commit that referenced this issue Jan 21, 2012
@jviney jviney Fix `$rails_rake_task` global variable warning without replacing the …
…value of $rails_rake_task if it is already set.

Fixes #4591.
1d9357d
@josevalim josevalim added a commit that closed this issue Jan 22, 2012
@jviney jviney Fix `$rails_rake_task` global variable warning without replacing the …
…value of $rails_rake_task if it is already set.

Fixes #4591.

Signed-off-by: José Valim <jose.valim@gmail.com>
9ab2904
@josevalim josevalim closed this in 9ab2904 Jan 22, 2012
@stevenh512 stevenh512 referenced this issue in resque/resque Jun 6, 2012
Closed

config.threadsafe! and resque #611

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment