desc "check if db exists on remote server. If not create it."
task :check_db do
on roles(:app) do |host|
puts "-"*100
puts capture("mysql -usomeuser -psomepassword #{fetch(:application)}_#{fetch(:rails_env)}")
end
endputs %x("mysql -usomeuser -psomepassword #{fetch(:application)}_#{fetch(:rails_env)}")DEBUG [242e1da5] Command: mysql -usomeuser -psomepassword app_name_dev_server
DEBUG [242e1da5] ERROR
DEBUG [242e1da5] 1049 (42000)
DEBUG [242e1da5] : Unknown database 'online_community_dev_server'That last line, or even the one before it, I can't seem to catch it to use in a condition statement.
Any thoughts would be greatly appreciated.
--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/e75b0b3e-6bda-4ea6-961a-55e50eb5fe86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/e6f569db-5514-49d2-b5d2-9ae279817dc5%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/0f241a2b-c31c-4b4b-8f8a-040dc376bb57%40googlegroups.com.