Email templates not found on windows

Trying to get past a mailer ActionView::MissingTemplate issue in Rails 6(.1.4.1). I have a rails project that invokes mailers from the command line. My minimal test case works fine on linux but fails on windows (there are mailers that run on both platforms). Here’s the test case.


class Emailer < ActionMailer::Base
  default :from => ""
  def test_email 
      from: '',
      to: '',
      subject: 'test email',


<!DOCTYPE html>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <h3>This is a test email</h3>
    <p>Thanks for reading.</p>

and, test-email-bare.rb: Emailer.test_email.deliver_now

If I invoke: rails runner test-email-bare.rb

…on a linux deployment of the app, everything is fine, and the email gets delivered. But if I do the same thing on a windows deployment of the same code base, I get a the error:

C:/jeeves/Ruby/lib/ruby/gems/2.7.0/gems/actionmailer- `each_template': Missing template emailer/test_email with "mailer". Searched in: (ActionView::MissingTemplate)
  * "emailer"

procmon says that ruby does, in fact, find the template file (app/views/emailer/test_email.html.erb), so the actual problem may be elsewhere.

Some things I’ve searched for/tried already…

  • Yes, I created the files in app/views/layouts/mailer.*
  • Adding ‘layout “mailer”’ to the Emailer class
  • Adding template_path and template_name to the mail() call in test_email

Anyone seen anything like this? Thanks much!