I am using the sitemap_generator gem and have the following configuration at config/sitemap.rb:
require 'rubygems'
require 'sitemap_generator'
SitemapGenerator::Sitemap.default_host = 'http://www.localhost.com'
SitemapGenerator::Sitemap.create do
add '/', :changefreq => 'daily', :priority => 0.9
add '/contact', :changefreq => 'weekly'
User.find_each do |user|
add users_path(user), lastmod: user.updated_at
end
end
SitemapGenerator::Sitemap.ping_search_engines
- I changed my domain to localhost
The app is hosted on heroku. When I do a heroku run rake sitemap:refresh
I get the following results
In '/app/public/':
+ sitemap.xml.gz 76 links / 1.53 KB
Sitemap stats: 76 links / 1 sitemaps / 0m00s
Pinging with URL 'http://www.localhost.com/sitemap.xml.gz':
Successful ping of Google
Successful ping of Bing
Pinging with URL 'http://www.localhost.com/sitemap.xml.gz':
Successful ping of Google
Successful ping of Bing
Now I try to find the sitemap.xml.gz file and its nowhere on heroku. I do a heroku run rake ls
, heroku run rake ls tmp
and heroku run rake ls public
and is nowhere to be found.
In the past I had these two lines on sitemap.rb as well:
SitemapGenerator::Sitemap.public_path = 'tmp/'
SitemapGenerator::Sitemap.sitemaps_path = 'sitemaps/'
but still the sitemaps were not generated on this folders. Any clue what I am doing wrong and is not generated?