Question

Why is letter_opener not working?

Hello,

I’m just starting with a DO droplet, using Ubuntu 18.04, where I installed my Rails app as environment = “development” . In my local machine I set the gem “letter_opener”, to access and debug the emails that has to be sent, and the same configuration is on the droplet (with specific hosts, of course). But for some reason, the emails doesn’t seem to be sent, also I can’t see them in the browser… Anyone would have had the same issue? Did I miss something in my configuration? Thx in advance for your help!


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Apparently I’m not the only one having this issue… It seems that the best option would be to dockerize the application, switching from letter_opener to mailcatcher gem^^

jarland
DigitalOcean Employee
DigitalOcean Employee badge
March 26, 2019

Greetings!

It can be difficult to say what is different between the staging and production environments here, it could be the most seemingly insignificant thing that just happens to impact your use case in the right way. I welcome anyone with more experience with letter_opener to weigh in, but I wanted to also do my best to find an answer for you. I found a GitHub issue that seems a bit dated, but had a lot of advice which may be helpful:

https://github.com/ryanb/letter_opener/issues/1

If you do find the answer there, I hope you will comment back so that it helps someone else later :)

Jarland

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.