Somewhat inspired by this thread on the TextDrive forums: http://forum.textdrive.com/viewtopic.php?id=4199
—
You can deploy the latest version of your Rails app to your remote host directly from Subversion, provided of course that you have a hosting company that allows SSH access to the server (like TextDrive).
Before starting this you should be comfortable with setting up your application with Subversion (as described here – HowtoUseRailsWithSubversion), and with deploying Rails applications generally on your remote host (one way is like this – LighttpdThePainlessWay, but the following procedure works equally well for applications deployed using Apache)
Once you have developed a production ready version of your application, and committed this version into Subversion, you should:
sites or apps.mv app_name app_name_oldsvn export http://path_to_your_repository/app_name/trunk app_nameThe export command checks out the latest revision of your application, but with all of the Subversion specific directories removed from the directory tree.
Now all that needs to be done is to make sure your configuration is set up properly.
dispatch.* files, points at your host’s Ruby installation (on TextDrive this is #!/usr/local/bin/ruby)RAILS_ENV = ENV['RAILS_ENV'] || 'production')Once that’s all done your application should be ready to be deployed using Lighttpd or Apache. This can be quite an involved process, but there’s lots of documentation detailing the necessary steps.
—
An alternative scenario to that described above would be; instead of exporting your application from Subversion, you could check out a working copy. This would have the advantage that once you have made changes to your app, you could simple update the working copy, and save having to shuffle your old version about. The only disadvantage of this I guess is that every directory will contain the Subversion meta information directories.
—
What about permissions? These are lost with the export, or can they be preserved in subversion?
Somewhat inspired by this thread on the TextDrive forums: http://forum.textdrive.com/viewtopic.php?id=4199
—
You can deploy the latest version of your Rails app to your remote host directly from Subversion, provided of course that you have a hosting company that allows SSH access to the server (like TextDrive).
Before starting this you should be comfortable with setting up your application with Subversion (as described here – HowtoUseRailsWithSubversion), and with deploying Rails applications generally on your remote host (one way is like this – LighttpdThePainlessWay, but the following procedure works equally well for applications deployed using Apache)
Once you have developed a production ready version of your application, and committed this version into Subversion, you should:
sites or apps.mv app_name app_name_oldsvn export http://path_to_your_repository/app_name/trunk app_nameThe export command checks out the latest revision of your application, but with all of the Subversion specific directories removed from the directory tree.
Now all that needs to be done is to make sure your configuration is set up properly.
dispatch.* files, points at your host’s Ruby installation (on TextDrive this is #!/usr/local/bin/ruby)RAILS_ENV = ENV['RAILS_ENV'] || 'production')Once that’s all done your application should be ready to be deployed using Lighttpd or Apache. This can be quite an involved process, but there’s lots of documentation detailing the necessary steps.
—
An alternative scenario to that described above would be; instead of exporting your application from Subversion, you could check out a working copy. This would have the advantage that once you have made changes to your app, you could simple update the working copy, and save having to shuffle your old version about. The only disadvantage of this I guess is that every directory will contain the Subversion meta information directories.
—
What about permissions? These are lost with the export, or can they be preserved in subversion?