ankane / ahoy_email

First-party email analytics for Rails
MIT License
1.11k stars 137 forks source link

NoMethodError attr_accessor Mail::Message:Class when updating to 1.0.1 #114

Closed mbodlund closed 6 years ago

mbodlund commented 6 years ago

Updated from 1.0.0 to 1.0.1 and when sending mails I get

NoMethodError (private method `attr_accessor' called for Mail::Message:Class):

This happens even if I AhoyEmail.default_options[:message] = false

mbodlund commented 6 years ago

In v 1.0.0

UtilityMailer.with(to: 'test@domain.com') => #<ActionMailer::Parameterized::Mailer:0x00007fe28edc1608 @mailer=UtilityMailer, @params={:to=>"test@domain.com"}>

In v 1.0.1

UtilityMailer.with(to: 'test@domain.com') NoMethodError: private method `attr_accessor' called for Mail::Message:Class

ankane commented 6 years ago

Hey @mbodlund, thanks for reporting 👍 Looks like that method is private in earlier versions of Ruby. Fixed on master.

mbodlund commented 6 years ago

Super - thx. Sorry for leaving out the Ruby version. Was a bit short on time yesterday.