Reputation: 3
How do I setup the letter opener gem to open mails on the browser using the docker toolbox for windows?
My app runs at 192.168.99.100
, the console shows the mail template but it does not open the browser tab with the content.
Besides that everything is running normally.
I've tried the initializer config file_uri_scheme
but it does not worked with the values that I tested, like:
file://tmp/letter_opener
file:////tmp/letter_opener
Thanks for the help
Upvotes: 0
Views: 639
Reputation: 61
At letter opener documentation we have a section called Configuration that mention WSL.
LetterOpener.configure do |config|
# To overrider the location for message storage.
# Default value is `tmp/letter_opener`
config.location = Rails.root.join('tmp', 'my_mails')
# To render only the message body, without any metadata or extra containers or styling.
# Default value is `:default` that renders styled message with showing useful metadata.
config.message_template = :light
# To change default file URI scheme you can provide `file_uri_scheme` config.
# It might be useful when you use WSL (Windows Subsystem for Linux) and default
# scheme doesn't work for you.
# Default value is blank
config.file_uri_scheme = 'file://///wsl$/Ubuntu-18.04'
end
Upvotes: 0