Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not loading custom maintenance.html #57

Open
ig-martinez opened this issue Feb 18, 2019 · 1 comment
Open

Not loading custom maintenance.html #57

ig-martinez opened this issue Feb 18, 2019 · 1 comment

Comments

@ig-martinez
Copy link

I've been trying to load a custom html file, but haven't had any luck :/

I've tried many different configurations, changing the config.maintenance_pages_path, config.default_maintenance_page but nothing has worked, I'm assuming I'm doing something wrong.

The file seems to be loaded, but I made a few modifications that doesn't show


<header>
      <h1>This is not what the header looks like</h1>
 </header>
2.4.1 :001 > File.expand_path(Turnout::MaintenancePage::HTML.new.send(:custom_path))
"/Users/imartinez/my-fertility-ror-backend/public/maintenance.html"

This is how my initializer looks like

Turnout.configure do |config|
  config.app_root = config.app_root
  config.named_maintenance_file_paths = {default: config.app_root.join('tmp', 'maintenance.yml').to_s}
  config.maintenance_pages_path = config.app_root.join('public').to_s
  config.default_maintenance_page = Turnout::MaintenancePage::HTML
  config.default_reason = "The site is temporarily down for maintenance.\nPlease check back soon."
  config.default_allowed_paths = ['^/admin/','^/admin','^/assets', '^/rails/info/routes', '^/api/v1/maintenance_messages']
  config.default_response_code = 503
  config.default_retry_after = 7200
end
@adamcrown
Copy link
Collaborator

Hi @imartinezingsw. Sorry for the long wait in responding to this.

This seems especially strange to me:

The file seems to be loaded, but I made a few modifications that doesn't show

Are you still having this issue? Turnout should be reading from the file with every request. So I don't really see how this could be a problem with the gem. You could try restarting Rails and also running rm -rf ./tmp/* ./tmp/.* to see if that helps though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants