Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Set unicorn executable file

  • Loading branch information...
commit 1ca241cb4fa9efbac4fd92ddcfbe8170d713dcff 1 parent 1ae4d1a
Dan Sosedoff sosedoff authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/capistrano-unicorn/capistrano_integration.rb
5 lib/capistrano-unicorn/capistrano_integration.rb
View
@@ -23,6 +23,7 @@ def process_exists?(pid_file)
_cset(:unicorn_pid, "#{fetch(:current_path)}/tmp/pids/unicorn.pid")
_cset(:app_env, (fetch(:rails_env) rescue 'production'))
_cset(:unicorn_env, (fetch(:app_env)))
+ _cset(:unicorn_bin, "unicorn")
namespace :unicorn do
desc 'Start Unicorn'
@@ -39,7 +40,7 @@ def process_exists?(pid_file)
config_path = "#{current_path}/config/unicorn/#{unicorn_env}.rb"
if remote_file_exists?(config_path)
logger.important("Starting...", "Unicorn")
- run "cd #{current_path} && BUNDLE_GEMFILE=#{current_path}/Gemfile bundle exec unicorn -c #{config_path} -E #{app_env} -D"
+ run "cd #{current_path} && BUNDLE_GEMFILE=#{current_path}/Gemfile bundle exec #{unicorn_bin} -c #{config_path} -E #{app_env} -D"
else
logger.important("Config file for \"#{unicorn_env}\" environment was not found at \"#{config_path}\"", "Unicorn")
end
@@ -84,7 +85,7 @@ def process_exists?(pid_file)
logger.important("No PIDs found. Starting Unicorn server...", "Unicorn")
config_path = "#{current_path}/config/unicorn/#{unicorn_env}.rb"
if remote_file_exists?(config_path)
- run "cd #{current_path} && BUNDLE_GEMFILE=#{current_path}/Gemfile bundle exec unicorn -c #{config_path} -E #{app_env} -D"
+ run "cd #{current_path} && BUNDLE_GEMFILE=#{current_path}/Gemfile bundle exec #{unicorn_bin} -c #{config_path} -E #{app_env} -D"
else
logger.important("Config file for \"#{unicorn_env}\" environment was not found at \"#{config_path}\"", "Unicorn")
end
Please sign in to comment.
Something went wrong with that request. Please try again.