I'm trying to use Capistrano to deploy a web application. Part of the
deployment involves editing xml files on the target server. As an
initial step, I'm attempting to read an XML file with the following
task:

task :printxml, :hosts => "[EMAIL PROTECTED]" do
   execute_on_servers(options) do |servers|
        servers.each do |server|
           fileloc = "/opt/jboss/server/default/conf/test.xml"
           doc = REXML::Document.new File.new(fileloc )
           puts doc
        end
   end
end

The file does indeed exist on the remote machine - yet when I run the
task, I get an error message stating "No such file or directory".
However, if I replace the 'fileloc' location with a local file path,
it works (this means it is looking on the local machine for the file,
not the remote machine). How do I get Capistrano to look on the remote
machine for the file?

Additionally, where can I find documentation on the
"execute_on_servers" method? I couldn't find much of any on the web
apart from a few blogs.

Thanks in advance for assistance - I'm fairly new to Ruby and more so
with Capistrano.
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to