Home > Software engineering >  Letter opener web returns Errno::ENOENT on dev env
Letter opener web returns Errno::ENOENT on dev env

Time:10-26

In rails, I'm building a confirmable method for users when they sign-up with Devise Confirmable model. To check to see the letters drop in the inbox I installed the letter opener web gem and followed all the instructions here for letter opener web gem. We are using rails 7 and ruby 3.1 versions and running docker. And when I navigate to /mail, I get this error

Errno::ENOENT

Checked the letters with ls tmp/letter_opener if they are populated and I can confirm that all the folders are there.

How can I fix this error? Not sure what am I missing here. Thank you sincerely for all the help already.

CodePudding user response:

After running this command open tmp/letter_opener and I can confirm that the file on the error page that was missing was actually in tmp/letter_opener folder. But contents of that the mail folder 1665782476_873833_996e302 was empty and rails was looking for a .html file in there so that's why it was erroring out. I cleaned everything in the tmp/letter_opener folder and navigated to /mail and could successfully render the letter opener web interactive view.

  • Related