I've written a very simple rake task to try and locate the source of this problem.
namespace :foo do
task bar: :environment do
puts 'RUNNING'
end
end
When executed in the console rake foo:bar the output is:
RUNNING
RUNNING
This occurs when I execute any rake task. Has anyone encountered anything like this before?
EDIT
The above rake task is all that is written in that .rake file.
Here is the Rakefile currently being used.
require File.expand_path('../config/application', __FILE__)
OurApp::Application.load_tasks
Also here is the output from running a --trace.
** Invoke foo:bar (first_time)
** Invoke environment (first_time)
** Execute environment
Hostname is: ourhost
** Execute foo:bar
RUNNING
RUNNING