Commit d137a012
Changed files (3)
app
uploaders
config
app/uploaders/image_uploader.rb
@@ -6,7 +6,7 @@ class ImageUploader < CarrierWave::Uploader::Base
if Rails.env.production?
storage :fog
- if Rails.env.staging?
+ elsif Rails.env.staging?
storage :fog
elsif Rails.env.development?
storage :file
app/uploaders/photo_uploader.rb
@@ -12,7 +12,7 @@ class PhotoUploader < CarrierWave::Uploader::Base
# storage :fog
if Rails.env.production?
storage :fog
- if Rails.env.staging?
+ elsif Rails.env.staging?
storage :fog
elsif Rails.env.development?
storage :file
config/deploy.rb
@@ -1,15 +1,18 @@
+
set :stages, %w(production staging)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
set :application, "www.cakeside.com"
set :user, "cakeside"
-set :use_sudo, false
+set :group, "rvm"
+# set :use_sudo, false
set :scm, :git
set :repository, "git@cakeartist.unfuddle.com:cakeartist/cake.git"
set :deploy_to, "/home/cakeside/apps/#{application}"
set :deploy_via, :remote_cache
+set :deploy_env, 'production'
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require "rvm/capistrano"
@@ -17,17 +20,17 @@ require "rvm/capistrano"
set :rvm_ruby_string, '1.9.2-p290@cakeside'
set :rvm_type, :system
-namespace :deploy do
- task :start, :roles => :app do
- run "touch #{current_path}/tmp/restart.txt"
- end
+# namespace :deploy do
+# task :start, :roles => :app do
+# run "touch #{current_path}/tmp/restart.txt"
+# end
- task :stop, :roles => :app do
- # Do nothing.
- end
+# task :stop, :roles => :app do
+# # Do nothing.
+# end
- desc "Restart Application"
- task :restart, :roles => :app do
- run "touch #{current_path}/tmp/restart.txt"
- end
-end
+# desc "Restart Application"
+# task :restart, :roles => :app do
+# run "touch #{current_path}/tmp/restart.txt"
+# end
+# end