Forum: Ruby on Rails Convert dynamic rails app to static html

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Johan V. (Guest)
on 2009-03-02 22:50
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...
Norm (Guest)
on 2009-03-02 22:56
(Received via mailing list)
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
Johan V. (Guest)
on 2009-03-02 23:01
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...
Hassan S. (Guest)
on 2009-03-02 23:04
(Received via mailing list)
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
Robby R. (Guest)
on 2009-03-02 23:22
(Received via mailing list)
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]
psujohn (Guest)
on 2009-03-03 00:02
(Received via mailing list)
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.
This topic is locked and can not be replied to.