I'm using sitemap_generator gem, and everything works fine, except that when running my rake task:
heroku run rake sitemap:refresh --remote live
I get the following results:
In '/app/public/':
+ sitemap.xml.gz 2409 links / 20.5 KB
Sitemap stats: 2,409 links / 1 sitemaps / 0m04s
Pinging with URL 'http://www.decorissimo.es/sitemap.xml.gz':
Successful ping of Google
Successful ping of Bing
Pinging with URL 'http://www.decorissimo.es/sitemap.xml.gz':
Successful ping of Google
Successful ping of Bing
2409 links. But then I go to
mysite.com/sitemap.xml.gz
And the sitemap there has only 199 links.
My sitemap.rb
require 'rubygems'
require 'sitemap_generator'
SitemapGenerator::Sitemap.default_host = "http://www.mywebe.com"
SitemapGenerator::Sitemap.create do
Photo.find_each do |photo|
add user_photo_path(photo.user_id, photo.id), :lastmod => photo.updated_at
end
User.find_each do |user|
add user_path(user.id), :lastmod => user.updated_at
end
end
SitemapGenerator::Sitemap.ping_search_engines # Not needed if you use the rake tasks
Any ideas?
Thanks!