Commit e72f753d
Changed files (3)
app/uploaders/image_uploader.rb
@@ -7,8 +7,15 @@ class ImageUploader < CarrierWave::Uploader::Base
# include CarrierWave::ImageScience
# Choose what kind of storage to use for this uploader:
- storage :file
+ # storage :file
# storage :s3
+ if Rails.env.production?
+ storage :fog
+ elsif Rails.env.development?
+ storage :file
+ else
+ storage :file
+ end
# Override the directory where uploaded files will be stored.
# This is a sensible default for uploaders that are meant to be mounted:
Gemfile
@@ -17,9 +17,7 @@ gem 'rmagick'
gem 'bcrypt-ruby'
gem 'json'
gem 'thinking-sphinx'
-#gem 'postgres'
-#gem 'postgres-pr'
-# gem 'pg'
+gem 'fog'
# Use unicorn as the web server
# gem 'unicorn'
Gemfile.lock
@@ -43,10 +43,22 @@ GEM
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
+ excon (0.6.3)
faraday (0.6.1)
addressable (~> 2.2.4)
multipart-post (~> 1.1.0)
rack (< 2, >= 1.1.0)
+ fog (0.9.0)
+ builder
+ excon (~> 0.6.1)
+ formatador (>= 0.1.3)
+ json
+ mime-types
+ net-scp (>= 1.0.4)
+ net-ssh (>= 2.1.4)
+ nokogiri (>= 1.4.4)
+ ruby-hmac
+ formatador (0.1.4)
heroku (2.3.3)
launchy (>= 0.3.2)
rest-client (~> 1.6.1)
@@ -69,6 +81,9 @@ GEM
multi_xml (0.2.2)
multipart-post (1.1.2)
net-ldap (0.2.2)
+ net-scp (1.0.4)
+ net-ssh (>= 1.99.1)
+ net-ssh (2.1.4)
nokogiri (1.4.6)
oa-basic (0.2.6)
oa-core (= 0.2.6)
@@ -152,6 +167,7 @@ GEM
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.6.0)
+ ruby-hmac (0.4.0)
ruby-openid (2.1.8)
ruby-openid-apps-discovery (1.2.0)
ruby-openid (>= 2.1.7)
@@ -182,6 +198,7 @@ DEPENDENCIES
bcrypt-ruby
carrierwave
devise
+ fog
heroku
jquery-rails
json