title: ENV variables not being read sinatra
body: <p>So i am trying to serve my static assets from Amazon s3 locally and for Heroku, I was loading a yml file but that doesn't work as Heroku doesn't accept symlinks.</p>
  
  <p>So i was given the suggestion to use ENV variables as Heroku also uses these. I have a rake task to precompile the assets to AWS. two problems at the moment</p>
  
  <p>1) My ENV variables are not being read.(Fog directory can't be blank, Aws access key can't be blank, Aws secret access key can't be blank</p>
  
  <p>2) When running a rake task i also get the error 'already initialized constant VALID_CHARACTER'</p>
  
  <p>So the activesupport constant is being loaded twice?</p>
  
  <p>My setup</p>
  
  <p>env.rb</p>
  
  <pre><code>ENV['aws_bucket'] = 'bucketname'
  ENV['aws_access_key'] = 'myaccesskey'
  ENV['aws_secret_key'] = 'mysecretkey'
  </code></pre>
  
  <p>Rakefile</p>
  
  <pre><code>require 'bundler/setup'
   Bundler.require(:default)
   require './env' if File.exists?('env.rb')
  
  
  AssetSync.configure do |con|
  con.fog_provider = 'AWS'
  con.fog_region = 'eu-west-1'
  con.fog_directory = ENV['aws_bucket']
  con.aws_access_key_id = ENV['aws_access_key']
  con.aws_secret_access_key = ENV['aws_secret_key']
  con.prefix = "assets"
  con.public_path = Pathname("./public")   
  end
  
  namespace :assets do
   desc "Precompile assets"
  task :precompile do
  AssetSync.sync
  end
  </code></pre>
  
  <p>Gemfile</p>
  
  <pre><code>source :rubygems
  gem 'sinatra'
  gem 'pony'
  gem 'sinatra-flash'
  gem 'heroku'
  gem 'asset_sync', git: 'git://github.com/ejholmes/asset_sync.git', branch: 'sinatra'
  </code></pre>
  
  <p>UPDATE</p>
  
  <p>AssetSync has activesupport in it's gemspec so that's getting included any way. It seems to be conflicting with the constant defined in the mail gem from the pony gemspec.</p>
  
  <p>So with the Pony gem removed i can precompile assets locally, but when i try and compile for heroku nothing happens, it starts the rake task but then just goes back to the terminal ready for a new command.</p>
  
  <p>The other thing is i need Pony for my mailer, how can i get around this?</p>