ActionMailer outside of Rails?

Does anyone know of issues using ActionMailer outside of Rails? I’m
already selectively using ActiveRecord, so I thought perhaps I could use
ActionMailer as well. (To solve one of those last minute “And could you
make the app email me if it throws any errors” questions that was never
in the original spec…)

When I built a single file to test with, it worked fine and I got my
mail. But then when I went to integrate that file with my existing app,
I started getting this error:

c:/newruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/vendor/text/format.rb:49:
Text is not a module (TypeError)

I am assuming that the actionmailer gem is conflicting with some other
package that I’m using. I’m trying to figure out how I can learn more
than that. Do I have a version mismatch someplace? Is this Text thing
something that’s part of standard Ruby, or is it being included by one
of the other gems in a way that is incompatible with how the mailer
wants to use it?

I’ve done a “gem update” so hopefully I have the most recent version of
everything that I’m using.

Thanks for any help!

D

Well I found this reference:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/127250

from Austin Z., who wrote the Text module to begin with, about
whether to use “unless defined?(Text)” in the module definition. And if
I modify the format.rb file with this fix it seems to do it (or, at
least, my error changes to something that I can fix).

That’s not a great solution to my problem but at least it gives me more
information on the cause.

Duane M. wrote:

Does anyone know of issues using ActionMailer outside of Rails? I’m
already selectively using ActiveRecord, so I thought perhaps I could use
ActionMailer as well. (To solve one of those last minute “And could you
make the app email me if it throws any errors” questions that was never
in the original spec…)

When I built a single file to test with, it worked fine and I got my
mail. But then when I went to integrate that file with my existing app,
I started getting this error:

c:/newruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/vendor/text/format.rb:49:
Text is not a module (TypeError)

I am assuming that the actionmailer gem is conflicting with some other
package that I’m using. I’m trying to figure out how I can learn more
than that. Do I have a version mismatch someplace? Is this Text thing
something that’s part of standard Ruby, or is it being included by one
of the other gems in a way that is incompatible with how the mailer
wants to use it?

I’ve done a “gem update” so hopefully I have the most recent version of
everything that I’m using.

Thanks for any help!

D

Duane M. wrote:

Does anyone know of issues using ActionMailer outside of Rails? I’m
already selectively using ActiveRecord, so I thought perhaps I could use
ActionMailer as well. (To solve one of those last minute “And could you
make the app email me if it throws any errors” questions that was never
in the original spec…)

Is this what your looking for?

http://www.agilewebdevelopment.com/plugins/exception_notifier

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs