Friday 15 August 2014

ruby on rails - Sitemap generation does not save file to storage -



ruby on rails - Sitemap generation does not save file to storage -

i'm getting sitemap going rails gem , having problem generating sitemap in production.

running rake command: rake sitemap:refresh in development creates sitemap.xml.gz file in public folder. navigate localhost:3000/sitemap.xml.gz , downloads zipped file.

when run in production (heroku-like command line dokku on digital ocean vm) get:

+ sitemap.xml.gz 6 links / 450 bytes sitemap stats: 6 links / 1 sitemaps / 0m00s pinging url 'https://www.myapp.com/sitemap.xml.gz': successful ping of google successful ping of bing

it appears file has been created, navigate www.myapp.com/sitemap.xml.gz , 404 response.

server say:

actioncontroller::routingerror (no route matches [get] "/sitemap.xml.gz"):

it appears request hitting rails stack when should served nginx. checked see if file exists:

filetest.exists?("public/sitemap.xml.gz")

it returns false seems sitemap not saved on file. there possibility file scheme read-only right now? how test that?

i believe dokku related "issue". dokku uses heroku buildpacks, , yields read-only file scheme on heroku.

i'd curious know if there's way modify behavior in dokku (seems unlikely if using heroku buildpacks), that's bit out of league.

i think best solution problem same on heroku - using amazon s3.

the sitemap_generator gem has docs on how set up.

ruby-on-rails digital-ocean dokku sitemap-generator-gem

No comments:

Post a Comment