diff --git a/app/uploaders/cerfa_uploader.rb b/app/uploaders/cerfa_uploader.rb index 1f8371a38..0b798ec81 100644 --- a/app/uploaders/cerfa_uploader.rb +++ b/app/uploaders/cerfa_uploader.rb @@ -19,7 +19,11 @@ class CerfaUploader < CarrierWave::Uploader::Base end def cache_dir - '/tmp/tps-cache' + if Rails.env.production? + '/tmp/tps-cache' + else + '/tmp/tps-dev-cache' + end end # Add a white list of extensions which are allowed to be uploaded. diff --git a/app/uploaders/piece_justificative_uploader.rb b/app/uploaders/piece_justificative_uploader.rb index c3cd6a556..5f26b3d5f 100644 --- a/app/uploaders/piece_justificative_uploader.rb +++ b/app/uploaders/piece_justificative_uploader.rb @@ -19,7 +19,11 @@ class PieceJustificativeUploader < CarrierWave::Uploader::Base end def cache_dir - '/tmp/tps-cache' + if Rails.env.production? + '/tmp/tps-cache' + else + '/tmp/tps-dev-cache' + end end # Add a white list of extensions which are allowed to be uploaded. diff --git a/app/uploaders/procedure_logo_uploader.rb b/app/uploaders/procedure_logo_uploader.rb index dab2a2f79..fd1366e0d 100644 --- a/app/uploaders/procedure_logo_uploader.rb +++ b/app/uploaders/procedure_logo_uploader.rb @@ -22,7 +22,11 @@ class ProcedureLogoUploader < CarrierWave::Uploader::Base end def cache_dir - '/tmp/tps-cache' + if Rails.env.production? + '/tmp/tps-cache' + else + '/tmp/tps-dev-cache' + end end # Add a white list of extensions which are allowed to be uploaded. diff --git a/config/deploy.rb b/config/deploy.rb index 8f377a78a..6e25a2cf6 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -63,6 +63,7 @@ set :shared_paths, [ 'public/system', 'public/uploads', 'config/database.yml', + "config/fog_credentials.yml", 'config/initializers/secret_token.rb', "config/environments/#{ENV['to']}.rb", "config/initializers/token.rb", @@ -132,7 +133,7 @@ task :deploy => :environment do to :launch do queue "/etc/init.d/#{user} upgrade " - + queue "cd #{deploy_to}/#{current_path}/" queue "bundle exec rake db:seed RAILS_ENV=#{rails_env}" queue %[echo "-----> Rake Seeding Completed."]