lib/ors/helpers.rb in ors-0.0.6 vs lib/ors/helpers.rb in ors-0.0.7
- old
+ new
@@ -44,10 +44,10 @@
def start_server server
info "[#{server}] starting unicorn..."
execute_command server, %(source ~/.rvm/scripts/rvm),
%(cd #{deploy_directory}),
- %(bundle exec #{unicorn} -c config/unicorn.rb -D -E #{environment})
+ %(if [ -f config.ru ]; then RAILS_ENV=#{environment} bundle exec unicorn -c config/unicorn.rb -D -E #{environment}; else RAILS_ENV=#{environment} bundle exec unicorn_rails -c config/unicorn.rb -D -E #{environment}; fi)
end
def stop_server server
info "[#{server}] stopping unicorn..."