# Available: google sitemap for rails project

**URL:** <https://www.ruby-forum.com/t/available-google-sitemap-for-rails-project/59081>\
**Category:** Rails\
**Created:** [April 28, 2006, 2:45pm UTC](https://www.ruby-forum.com/t/available-google-sitemap-for-rails-project/59081 "2006-04-28T14:45:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![raphael\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/7c8e57/32.png) [@raphael\_b](https://www.ruby-forum.com/u/raphael_b)\
**Post date:** [April 28, 2006, 2:45pm UTC](https://www.ruby-forum.com/t/available-google-sitemap-for-rails-project/59081/1 "2006-04-28T14:45:36Z")

</div>

Hi,

Google Sitemaps ([https://www.google.com/webmasters/sitemaps/](https://www.google.com/webmasters/sitemaps/)) is a way  
to help Google’s crawler on your website.

I’ve published a little script to generate, from a rails project, a  
urllist file usable with the Google sitemap generator.

You drop the script in your RAILS\_ROOT/lib directory, edit it to set  
the base url, and you’re set. Run it with

ruby script/runner “require ‘gen\_url\_list’”

Download and more info in a blog post at  
[http://www.myowndb.com/blog/?p=12](http://www.myowndb.com/blog/?p=12)

## Capabilities:

The script can work with controllers in subdirectories and can set the  
last modification date of the url based on the last modification date  
of the controller file.

## Limitations;

It doesn’t use the Rails Routes as I didn’t find how to use the  
url\_for method in the script ( it’s a controller instance method).

Hoping this can be helpful for someone.

cheers

Raph
