ryanb / letter_opener

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

Will not initialize #202

Closed pixiitech closed 2 years ago

pixiitech commented 2 years ago

Letter_opener has never worked in my Rails project. I just upgraded to Rails 5.2 from 5.1. I have version letter_opener 1.8.1 added to my Gemfile but if I try to add the config file as specified in the README, I get uninitialized constant LetterOpener (NameError) I have this line added to config/environments/development.rb: config.action_mailer.delivery_method = :letter_opener however when trying to send an email using deliver_now I get this error: RuntimeError: Invalid delivery method :letter_opener

pixiitech commented 2 years ago

Ok it seems to work if I move it into the main gems group (instead of development only)