rails/rails — Issue #3883: ActionMailer 2.3.14 is not Ruby 1.9.2 compatible...
Author: aselder
Created: 2011-12-07 01:11:55+00:00
State: open

The vendored version of TMail included with ActionMailer is not 1.9.2 compatible.

Specifically, TMail calls the is_binary_data? method on string which was removed in Ruby 1.9.2

See:
https://github.com/mikel/tmail/issues/11
http://apidock.com/ruby/String/is_binary_data%3F

I realize that this probably won't get fixed as 2.3.x isn't getting updated, but I thought this important enough to at least document and save people some pain.

Specifically, the code path we ran into was in calling the attachment methods on the results TMail::Mail.parse call

Exception EXCEPTION NoMethodError: undefined method `is_binary_data?' for #
"/opt/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.14/lib/action_mailer/vendor/tmail-1.2.7/tmail/quoting.rb:107:in `convert_to_with_fallback_on_iso_8859_1'",
"/opt/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.14/lib/action_mailer/vendor/tmail-1.2.7/tmail/quoting.rb:134:in `unquote_base64_and_convert_to'",
"/opt/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.14/lib/action_mailer/vendor/tmail-1.2.7/tmail/quoting.rb:25:in `unquoted_body'",
"/opt/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.14/lib/action_mailer/vendor/tmail-1.2.7/tmail/quoting.rb:54:in `body'",
"/opt/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.14/lib/action_mailer/vendor/tmail-1.2.7/tmail/attachments.rb:49:in `attachment'",
"/opt/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.14/lib/action_mailer/vendor/tmail-1.2.7/tmail/attachments.rb:37:in `block in attachments'",
"/opt/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.14/lib/action_mailer/vendor/tmail-1.2.7/tmail/attachments.rb:37:in `collect'",
"/opt/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.14/lib/action_mailer/vendor/tmail-1.2.7/tmail/attachments.rb:37:in `attachments'",