How to upgrade rails application on client server

We ship our rails application to customer and customer deploy on their
own server.
If we release a new version that include bug fixes, and we want to apply
to those bug fixes to all clients.
What is the good approach?

If you have a network connection to your customer you should give capistrano a try. Using capistrano you can deploy to multiple servers at the same time. You need to checkin your app into a repository like svn or git from which your customers servers will then checkout and updates the deltas.
No need to have capistrano on the customers server. capistano works over ssh and runs commands on the target servers.

The most secure way is to have a vpn connection to the ccustomer site although this is not a must. But it avoids to open a ssh port on both sides which is always a risk.

If you have a network connection to your customer you should give capistrano
a try. Using capistrano you can deploy to multiple servers at the same time.
You need to checkin your app into a repository like svn or git from which
your customers servers will then checkout and updates the deltas.
No need to have capistrano on the customers server. capistano works over ssh
and runs commands on the target servers.

The most secure way is to have a vpn connection to the ccustomer site
although this is not a must. But it avoids to open a ssh port on both sides
which is always a risk.

Provided the root user is disabled on the machines and ssh login with
passwords is also disabled (use keys instead) then I believe an open
port for ssh can be considered secure.

Colin

We went the route of ssh / access and failed horribly. We moved the code base to jruby and started releasing Warable files . This way, updates go in with a single click along with all the bundled latest gems. Try it out.

How you do it depends a lot on whether you can push the updates or do the customers want to pull the updates at a time of their choosing etc.
In my app I put a 'update' link which fetches (ftp) files from my server and then installs them on the customers server. This process lets the customer decide when he can have an interruption including a restart of the server. If you can push the update whenever you want a capistrano based solution may work.

Norm

Thanks for the answers.
@ Vivek Sampara how do you deal with migration? because customer have
existing data that can't be lost.

Not speaking for @ Vivek Sampara but --

how do you deal with migration? because customer have
existing data that can't be lost.

Migrations are migrations; that has nothing to do with how the app
is being distributed.

Basically you have the servlet container (e.g. Tomcat) deploy the
WAR file, and then you run migrations as needed.

But my question is: if the customer can install the app to start with,
why is updating it any different? Surely that required some technical
ability on someone's part...

This is yet another good reason to use capistrano. capistrano recipes allow to define comands to be performed on the target server, so it’s easy to add a mysqldump command for backup and a a rake task to perform the migration.
And, usually I warn my customers before upgrading them and agree a ‘service window’. That’s good practice anway.
Finally, a lot depends on your customer relationship. If your customer doesn’ trust you you need to go with a different solution.