Convert dynamic rails app to static html


#1

Can I convert a dynamic rails app to static html pages?

I’d like to build some small (portfolio) sites;

it would be nice if I could create them in Rails:
create a basic scaffold to add about 20 projects…

Afterwards, the site wouln’t d be updated anymore, so it doesn’t have to
be dynamic once it’s finished…

Can I generate static html files for every one of my 20 project-pages?

I guess this shouldn’t be that hard, since caching sort of uses the same
technique…


#2

Johan Van mol wrote:

Can I generate static html files for every one of my 20 project-pages?

I guess this shouldn’t be that hard, since caching sort of uses the same
technique…

You can just display source (ctl-u) for each page and save them to
files. They will be a static copy of what the system generated.

Norm


#3

Norm wrote:

You can just display source (ctl-u) for each page and save them to
files. They will be a static copy of what the system generated.

Hi, I know I can do it that way, but that isn’t very DRY,
since I would have to perform the same action over and over again for
each page…

Is Rails able to automate this?
That would be great…


#4

On Mon, Mar 2, 2009 at 1:01 PM, Johan Van mol
removed_email_address@domain.invalid wrote:

You can just display source (ctl-u) for each page and save them to
files. They will be a static copy of what the system generated.

Hi, I know I can do it that way, but that isn’t very DRY,
since I would have to perform the same action over and over again for
each page…

Is Rails able to automate this?

I can’t imagine much of a use case for Rails doing this, but why not
just use wget to grab a complete site image?


Hassan S. ------------------------ removed_email_address@domain.invalid


#5

Yes, wget would be a good option.

On Mon, Mar 2, 2009 at 1:03 PM, Hassan S.
<removed_email_address@domain.invalid

wrote:

Is Rails able to automate this?

I can’t imagine much of a use case for Rails doing this, but why not
just use wget to grab a complete site image?


Hassan S. ------------------------ removed_email_address@domain.invalid


Robby R.
Chief Evangelist, Partner

PLANET ARGON, LLC
design // development // hosting w/Ruby on Rails

http://planetargon.com/
http://robbyonrails.com/
http://twitter.com/planetargon
aim: planetargon

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]


#6

Just use something like HTTrack which will download the whole site
(follow all the links, get the images, css, js, etc) and convert all
the links for you.