1 # frozen_string_literal: true
4 desc 'Generate 500.html'
6 I18n.with_locale(ENV['DEFAULT_LOCALE'] || I18n.default_locale) do
7 html = ApplicationController.render('errors/500', layout: 'error')
8 File.write(Rails.root.join('public', '500.html'), html)
13 if Rake::Task.task_defined?('assets:precompile')
14 Rake::Task['assets:precompile'].enhance do
15 Webpacker::Manifest.load
16 Rake::Task['assets:generate_500'].invoke