ryanb / letter_opener

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

Error when run in vagrant vm #47

Closed yushun closed 12 years ago

yushun commented 12 years ago

I'm getting this error:

Failure in opening file:///vagrant/tmp/letter_opener/1347902079_5d48af6/plain.html with options {}: Unable to find a browser command.

When I try rails console Launchy.open("file://#{file}") It give the same error.

nashby commented 12 years ago

Hi, it doesn't look like an issue with letter_opener. Are you using Ubuntu in your vagrant setup, right? Could you try open some.html in your terminal?

ryanb commented 12 years ago

I don't think Launchy is designed to work inside a Vagrant VM since it needs direct access to a browser. There is a similar issue when using letter_opener in a separate staging server.

You may want to check out the fork of the project mentioned in (this pull request)[https://github.com/ryanb/letter_opener/pull/12]. I suggest someone make a gem called "remote_letter_opener" which does this since I don't plan to turn this into an engine at the moment.