Permalink
Browse files

deploy tweaks, upgrade rvm to .ruby- files for ruby version and gemse…

…t specification
  • Loading branch information...
1 parent f61b6fd commit ce23ec4e12c6e4a72fec62db68ec66ebcb46d47d Alexander Mekelburg committed Apr 29, 2013
Showing with 13 additions and 13 deletions.
  1. +1 −0 .ruby-gemset
  2. +1 −0 .ruby-version
  3. +0 −1 Gemfile
  4. +11 −12 config/deploy.rb
View
@@ -0,0 +1 @@
+rocky3
View
@@ -0,0 +1 @@
+ruby-1.9.3-p125
View
@@ -11,7 +11,6 @@ gem "aasm", "= 3.0.16"
gem "authlogic", "= 3.3.0"
-#gem "fastercsv", "= 1.5.0"
gem "daemons", "= 1.0.10"
gem "paperclip", "~> 3.0"
gem "mysql"
View
@@ -66,9 +66,12 @@
set :rvm_ruby_string, :local # use the same ruby as used locally for deployment
-set :rvm_autolibs_flag, "packages"
+set :rvm_autolibs_flag, "enable"
set :rvm_install_with_sudo, true
+before 'deploy:setup', 'rvm:install_rvm' # install RVM
+before 'deploy:setup', 'rvm:install_ruby'
+
before 'deploy', 'rvm:install_ruby' # install Ruby and create gemset (both if missing)
require "rvm/capistrano"
@@ -103,7 +106,7 @@
CMD
end
- desc "Link the database.yml, .env files, and newrelic.yml files into the current release path."
+ desc "Link the database.yml, .env.{environment} files, and newrelic.yml files into the current release path."
task :symlink_configs, :roles => [:app, :util], :except => {:no_release => true} do
run <<-CMD
cd #{latest_release} &&
@@ -115,10 +118,6 @@
CMD
run <<-CMD
cd #{latest_release} &&
- ln -nfs #{shared_path}/.env #{latest_release}/.env
- CMD
- run <<-CMD
- cd #{latest_release} &&
ln -nfs #{shared_path}/.env.#{rails_env} #{latest_release}/.env.#{rails_env}
CMD
end
@@ -200,20 +199,20 @@
desc "Run (or restart) worker processes on util server"
task :run_workers, :roles => :util do
- run "cd #{latest_release} && ruby script/rocky_runner stop"
- run "cd #{latest_release} && ruby script/rocky_pdf_runner stop"
+ run "cd #{latest_release} && bundle exec ruby script/rocky_runner stop"
+ run "cd #{latest_release} && bundle exec ruby script/rocky_pdf_runner stop"
# nasty hack to make sure it stops
run "pkill -f com.pivotallabs.rocky.PdfServer" rescue nil
sleep 5
- run "cd #{latest_release} && ruby script/rocky_pdf_runner start"
- run "cd #{latest_release} && ruby script/rocky_runner start"
+ run "cd #{latest_release} && bundle exec ruby script/rocky_pdf_runner start"
+ run "cd #{latest_release} && bundle exec ruby script/rocky_runner start"
unset(:latest_release)
end
desc "Stop worker processes on util server"
task :stop_workers, :roles => :util do
- run "cd #{latest_release} && ruby script/rocky_runner stop"
- run "cd #{latest_release} && ruby script/rocky_pdf_runner stop"
+ run "cd #{latest_release} && bundle exec ruby script/rocky_runner stop"
+ run "cd #{latest_release} && bundle exec ruby script/rocky_pdf_runner stop"
# nasty hack to make sure it stops
run "pkill -f com.pivotallabs.rocky.PdfServer" rescue nil
unset(:latest_release)

0 comments on commit ce23ec4

Please sign in to comment.