We are building a site with our in house Rails CMS, however the client is hosted on 1and1, which according to their support staff has no support for RoR. The site will be infrequently updated, however so it seems like good sense to enter the content into the DB using our CMS and then write some sort of export controller to write the static site to a folder structure that we can then rsync to the client''s server. Has anyone done this before? - Ben ___________________ Ben Jackson Diretor de Desenvolvimento +55 (21) 9997-0593 ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org http://www.incomumdesign.com
On 7/29/05, Benjamin Jackson <ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote:> We are building a site with our in house Rails CMS, however the client > is hosted on 1and1, which according to their support staff has no > support for RoR. The site will be infrequently updated, however so it > seems like good sense to enter the content into the DB using our CMS > and then write some sort of export controller to write the static site > to a folder structure that we can then rsync to the client''s server. > Has anyone done this before?I would use page caching for that. It does that anyway. Then, just sync your public directory with your host. I''d probably write a script to clear all the cached HTML files and then hit each site to get rails to regenerate the page cache. -- rick http://techno-weenie.net
On 29 Jul 2005, at 20:03, Rick Olson wrote:> On 7/29/05, Benjamin Jackson <ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote: > >> We are building a site with our in house Rails CMS, however the >> client >> is hosted on 1and1, which according to their support staff has no >> support for RoR. The site will be infrequently updated, however so it >> seems like good sense to enter the content into the DB using our CMS >> and then write some sort of export controller to write the static >> site >> to a folder structure that we can then rsync to the client''s server. >> Has anyone done this before? > > I would use page caching for that. It does that anyway. Then, just > sync your public directory with your host. > > I''d probably write a script to clear all the cached HTML files and > then hit each site to get rails to regenerate the page cache.How does that help the Rails CMS''s contents work on a server which doesn''t support RoR? Use mod_rewrite proxying, or something? Perhaps I missed your point. :) Benjamin, you might consider the Blogger approach to this same problem. Write an export controller which can FTP to the remote site and upload everything that way. A lot less manual than doing an rsync each time, and simpler than cronning something to do it. Of course, you have to do the work on the export controller up front ;-) The Net::FTP module is pretty cute though. Pete
We ran into this problem for our Railsday project - in the end one of the easiest methods was to use wget in recursive suck mode. No need to reinvent! Joshua On 7/30/05, Peter Cooper <peter-kB4nxRGAR8jpCd0h4Hqbjlpr/1R2p/CL@public.gmane.org> wrote:> > On 29 Jul 2005, at 20:03, Rick Olson wrote: > > > On 7/29/05, Benjamin Jackson <ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote: > > > >> We are building a site with our in house Rails CMS, however the > >> client > >> is hosted on 1and1, which according to their support staff has no > >> support for RoR. The site will be infrequently updated, however so it > >> seems like good sense to enter the content into the DB using our CMS > >> and then write some sort of export controller to write the static > >> site > >> to a folder structure that we can then rsync to the client''s server. > >> Has anyone done this before? > > > > I would use page caching for that. It does that anyway. Then, just > > sync your public directory with your host. > > > > I''d probably write a script to clear all the cached HTML files and > > then hit each site to get rails to regenerate the page cache. > > How does that help the Rails CMS''s contents work on a server which > doesn''t support RoR? Use mod_rewrite proxying, or something? Perhaps > I missed your point. :) > > Benjamin, you might consider the Blogger approach to this same > problem. Write an export controller which can FTP to the remote site > and upload everything that way. A lot less manual than doing an rsync > each time, and simpler than cronning something to do it. Of course, > you have to do the work on the export controller up front ;-) The > Net::FTP module is pretty cute though. > > Pete > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I see your point, the trick IMHO would be in syncing the routes and the mod_rewrite config. Not trivial (I think). On the other hand you could write out all the directory structures and just have an index page in each directory... On Jul 29, 2005, at 9:35 PM, Peter Cooper wrote:> On 29 Jul 2005, at 20:03, Rick Olson wrote: > >> On 7/29/05, Benjamin Jackson <ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote: >> >>> We are building a site with our in house Rails CMS, however the >>> client >>> is hosted on 1and1, which according to their support staff has no >>> support for RoR. The site will be infrequently updated, however so it >>> seems like good sense to enter the content into the DB using our CMS >>> and then write some sort of export controller to write the static >>> site >>> to a folder structure that we can then rsync to the client''s server. >>> Has anyone done this before? >> >> I would use page caching for that. It does that anyway. Then, just >> sync your public directory with your host. >> >> I''d probably write a script to clear all the cached HTML files and >> then hit each site to get rails to regenerate the page cache. > > How does that help the Rails CMS''s contents work on a server which > doesn''t support RoR? Use mod_rewrite proxying, or something? Perhaps I > missed your point. :) > > Benjamin, you might consider the Blogger approach to this same > problem. Write an export controller which can FTP to the remote site > and upload everything that way. A lot less manual than doing an rsync > each time, and simpler than cronning something to do it. Of course, > you have to do the work on the export controller up front ;-) The > Net::FTP module is pretty cute though. > > Pete > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >___________________ Ben Jackson Diretor de Desenvolvimento +55 (21) 9997-0593 ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org http://www.incomumdesign.com