Permalink
Browse files

Fixed env variables, hooray rubber.profile

  • Loading branch information...
1 parent 0fed9fb commit a66389b3e5a19e49d2f1121877015b374d437c95 @karlbright karlbright committed Oct 19, 2012
Showing with 6 additions and 3 deletions.
  1. +3 −3 config/initializers/carrierwave.rb
  2. +3 −0 config/rubber/common/rubber.profile
@@ -1,10 +1,10 @@
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS', # required
- :aws_access_key_id => ENV['aws_access_key_id'], # required
- :aws_secret_access_key => ENV['aws_secret_access_key'], # required
+ :aws_access_key_id => ENV['AWS_ACCESS_KEY_ID'], # required
+ :aws_secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'], # required
}
- config.fog_directory = ENV['aws_s3_bucket']
+ config.fog_directory = ENV['AWS_S3_BUCKET']
config.fog_public = true # optional, defaults to true
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} # optional, defaults to {}
end
@@ -6,6 +6,9 @@
# convenience to simply running rails console, etc with correct env
export RUBBER_ENV=<%= Rubber.env %>
export RAILS_ENV=<%= Rubber.env %>
+export AWS_ACCESS_KEY_ID=<%= rubber_env.aws_access_key_id %>
+export AWS_SECRET_ACCESS_KEY=<%= rubber_env.aws_secret_access_key %>
+export AWS_S3_BUCKET=<%= rubber_env.aws_s3_bucket %>
alias current="cd <%= current_path %>"
alias release="cd <%= Rubber.root %>"

0 comments on commit a66389b

Please sign in to comment.