ryanb / letter_opener

Preview mail in the browser instead of sending.
MIT License
3.71k stars 236 forks source link

Unable to interpret 'file:////xxx/rich.html' as a path or URL #194

Closed damienlethiec closed 2 years ago

damienlethiec commented 2 years ago

Hi there,

I have just joined a new projet and, when using Letter Opener, the tmp file is generated but I get the following error: "Unable to interpret 'file:////xxx/rich.html' as a path or URL".

The path is valid, the file can be viewed if I paste it is my browser.

Any idea of the reason and how to fix it?

Rails version: 6.1.4.4 Letter Opener version: 1.7.0

nashby commented 2 years ago

hey @damienlethiec. It's hard to say what's wrong. Probably there're some characters in your path that prevent Launchy to open it. What Launchy version do you have? Can you open it with Launchy.open(your_path)?

damienlethiec commented 2 years ago

Hello :) Thanks so much for the answer ! The problem was that I had a space in the name of one of the folder in my path. Appartently Launchy cannot read them. It is fixed now :)

nashby commented 2 years ago

@damienlethiec Launchy supports it, just tested it (we also have spec for this) so that's strange. Closing this for now but feel free to post more info if you want us to take closer look, thanks!