lib/capistrano/tasks/delayed_job_monit.rb
# Returns the correct PassengerRuby value taken directlyfrom the output of passenger-config.
#
Returns the correct PassengerRuby value taken directlyfrom the output of passenger-config.
Returns the correct PassengerRuby value taken directlyfrom the output of passenger - config .
def extract_correct_ruby
  within fetch(:deploy_to) do
    which_passenger_config = capture_remote_command( "which passenger-config" )
    ruby_command_output    = capture_remote_command( "#{ which_passenger_config } --ruby-command" )
    ruby_command_output.split(/\n/).select{ |line| line =~ /PassengerRuby/ui }.first.split(/Apache:\s/).last
  end
end
def extract_correct_ruby within fetch ( :deploy_to ) do which_passenger_config = capture_remote_command ( "which passenger-config" ) ruby_command_output = capture_remote_command ( "#{ which_passenger_config } --ruby-command" ) ruby_command_output . split ( / \n / ) . select { | line | line =~ / PassengerRuby /ui } . first . split ( / Apache: \s / ) . last end end
Returns the correct PassengerRuby value taken directlyfrom the output of passenger-config.
Returns the correct PassengerRuby value taken directlyfrom the output of passenger - config .
# Extract the correct PassengerRuby value to be put into vhost template directly from # the output of passenger-config: