Rake task executing twice when only called once
<p>I've written a very simple rake task to try and locate the source of this problem.</p>

<pre><code>namespace :foo do
 task bar: :environment do
  puts 'RUNNING'
 end
end
</code></pre>

<p>When executed in the console <code>rake foo:bar</code> the output is:</p>

<pre><code>RUNNING
RUNNING
</code></pre>

<p>This occurs when I execute any rake task. Has anyone encountered anything like this before?</p>

<p>EDIT</p>

<p>The above rake task is all that is written in that .rake file.</p>

<p>Here is the Rakefile currently being used.</p>

<pre><code>require File.expand_path('../config/application', __FILE__)

OurApp::Application.load_tasks
</code></pre>

<p>Also here is the output from running a --trace.</p>

<pre><code>** Invoke foo:bar (first_time)
** Invoke environment (first_time)
** Execute environment
Hostname is: ourhost
** Execute foo:bar
RUNNING
RUNNING
</code></pre>