# Rails to static site

**URL:** <https://www.ruby-forum.com/t/rails-to-static-site/63364>\
**Category:** Rails\
**Created:** [June 14, 2006, 4:47pm UTC](https://www.ruby-forum.com/t/rails-to-static-site/63364 "2006-06-14T16:47:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [June 14, 2006, 4:47pm UTC](https://www.ruby-forum.com/t/rails-to-static-site/63364/1 "2006-06-14T16:47:36Z")

</div>

For users without an internet connection we are thinking about  
converting a  
rather large site to a DVD. As dynamic solutions with databases seem  
hard  
(see another thread) we are also considering a static html version. The  
site is clearly convertible to a static version, I can make sure that  
all  
search functions are turned off.  
Can the conversion itself optimized with Rails? Do you know solutions to  
make a site static e.g. with different user agents? Or by treating the  
requests as some different output format? (I’m thinking in the direction  
of  
the current HTML/XML output constructions…)

Bart

---

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [June 14, 2006, 11:46pm UTC](https://www.ruby-forum.com/t/rails-to-static-site/63364/2 "2006-06-14T23:46:52Z")

</div>

Bart B. wrote:

> For users without an internet connection we are thinking about  
> converting a  
> rather large site to a DVD. As dynamic solutions with databases seem  
> hard  
> (see another thread) we are also considering a static html version. The  
> site is clearly convertible to a static version, I can make sure that  
> all  
> search functions are turned off.  
> Can the conversion itself optimized with Rails? Do you know solutions to  
> make a site static e.g. with different user agents? Or by treating the  
> requests as some different output format? (I’m thinking in the direction  
> of  
> the current HTML/XML output constructions…)

If you can set it up so the site displays all the pages you want to put  
in the static version as a user clicks through it, you could use HTTrack

> **[HTTrack Website Copier - Free Software Offline Browser (GNU GPL)](http://www.httrack.com/)**
>
> HTTrack is a free (GPL, libre/free software) and easy-to-use offline browser utility. It allows you to download a World Wide Web site from the Internet to a local directory, building recursively all directories, getting HTML, images, and other files...

to make the static site for the DVD.

–Al Evans

---

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [June 15, 2006, 3:38pm UTC](https://www.ruby-forum.com/t/rails-to-static-site/63364/3 "2006-06-15T15:38:56Z")

</div>

On 6/14/06, Bart B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> For users without an internet connection we are thinking about converting a  
> rather large site to a DVD. As dynamic solutions with databases seem hard  
> (see another thread) we are also considering a static html version. The  
> site is clearly convertible to a static version, I can make sure that all  
> search functions are turned off.  
> Can the conversion itself optimized with Rails? Do you know solutions to  
> make a site static e.g. with different user agents? Or by treating the  
> requests as some different output format? (I’m thinking in the direction of  
> the current HTML/XML output constructions…)

wget might be your friend here. [Wget - GNU Project - Free Software Foundation](http://www.gnu.org/software/wget/) for  
more information.

I think the line you’re looking for is something like:

wget --convert-links --recursive [http://myserver/](http://myserver/)

But the manual pages and the examples should help work out exactly  
what you’ll need.

Matt

---

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [June 16, 2006, 4:50pm UTC](https://www.ruby-forum.com/t/rails-to-static-site/63364/4 "2006-06-16T16:50:41Z")

</div>

Wow. Nobody on the whole list has used dbmodel?

---

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [June 15, 2006, 7:35pm UTC](https://www.ruby-forum.com/t/rails-to-static-site/63364/5 "2006-06-15T19:35:16Z")

</div>

Greetings from a (hopefully) new Rails developer!

Just trying to use the dbmodel gem. I installed the gem, and  
installation  
went fine, but when I try to actually use the gem using

W:\BookingCalendar\>ruby script/generate dbmodel bookingcal.xml

I get the message:

Couldn’t find ‘dbmodel’ generator

Has anyone used this gem and received the same error message?

* * *

---

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [June 16, 2006, 5:29pm UTC](https://www.ruby-forum.com/t/rails-to-static-site/63364/6 "2006-06-16T17:29:44Z")

</div>

On 6/16/06, Steve L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Wow. Nobody on the whole list has used dbmodel?

Never even heard of it… 😉

> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–
