Closed cpanderson closed 2 years ago
@cpanderson hey! Sorry for late response! Yes, this should fix the issue. As far as I remember we didn't have file:///
protocol before. We only added it to fix some issues on Windows I guess. But I think we can bring that back and see how it works. Would you mind sending a PR?
P.S you don't need interpolation here, just
Launchy.open(messages.first.filepath)
@nashby the current gem does not include this fix, any way to monkey patch it?
@bindzus @cpanderson hey! Could you please test current master and see if it works for you? By default we don't add file://
prefix anymore so it should work with Big Sur (don't have it right now so would really appreciate a test). If you still want to add any prefix you can do it with following config:
LetterOpener.configure do |config|
config.file_uri_scheme = 'file://'
end
In delivery_method.rb on line 24 this...
Launchy.open("file:///#{messages.first.filepath}")
...throws an error in the log...
The file /Users/<...>/file:<...>/tmp/letter_opener/1606671849_901567_0e46b31/rich.html does not exist
Not sure if it's related to how Launchy uses /usr/bin/open and if that has changed but doing this fixes it...
Launchy.open("#{messages.first.filepath}")