Sitemaps help search engines to index your website by displaying all the links to the site. A really nice guy called Josh Owens has written a rails sitemap plugin that helps you create a dynamic rails sitemap.
I was working with a rails 2.3.8 app so to install via github and generate:
$> ruby script/plugin install git://github.com/queso/sitemap.git
$> ruby script/generate sitemap_migration
Then go to http://yoursite.com/sitemap_settings where you should see the following settings page:

Just fill that in and then move to the widgets page:

Here i have a list of articles that are created and i want all of them added to the sitemap dynamically whenever an article is created or updated so i'll create an article widget. For full instructions check out the github page for the sitemap plugin.