%w[development production staging test].each do |env|
  desc "Runs the following task in the #{env} environment"
  task env do
    RAILS_ENV = ENV['RAILS_ENV'] = env
  end
end

%w[development production staging test].each do |env|
  desc "Runs the following task in the #{env} environment"
  task env do
    RAILS_ENV = ENV['RAILS_ENV'] = env
    Rails.env = RAILS_ENV if defined?(Rails)
  end
end


Set Rails.env as well as RAILS_ENV
Set Rails.env as well as RAILS_ENV

Recent SunspotSolr has switched to reading this to detect which block in
sunspot.yml it should use for configuration
