没有发现我使用的sitemap_generator宝石,并有在配置/ 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
- 我改变了我的域名为localhost
的应用托管在heroku上。当我做了heroku run rake sitemap:refresh
我得到下面的结果
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
现在我试图找到sitemap.xml.gz文件及其无处在Heroku。我做了heroku run rake ls
,heroku run rake ls tmp
和heroku run rake ls public
,无处可寻。
在过去,我对sitemap.rb这两条线以及:
SitemapGenerator::Sitemap.public_path = 'tmp/'
SitemapGenerator::Sitemap.sitemaps_path = 'sitemaps/'
,但仍是网站地图是不会在这个文件夹中生成的。任何线索我做错了什么,并没有生成?
这是否意味着我应该创建站点地图并将其添加到S3? –
不像S3.It可以是任何永久文件系统 – sureshprasanna70