Skip to content
Browse files

alright fix this finally, sorry. load ar_mailer after environment to …

…avoid lazy loading issue with Actionmailer in Rails 2.3
  • Loading branch information...
1 parent 68c8793 commit b918cb58ade290f66dd69e7093508425f89a9651 @adzap committed Jul 6, 2009
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/action_mailer/ar_sendmail.rb
View
8 lib/action_mailer/ar_sendmail.rb
@@ -3,11 +3,6 @@
require 'smtp_tls' unless Net::SMTP.instance_methods.include?("enable_starttls_auto")
require 'rubygems'
-module ActionMailer; end
-# This should get loaded by the environment later but for some reason fails with
-# the github namespaced gem and succeeds with a local gem build install.
-require 'action_mailer/ar_mailer'
-
##
# Hack in RSET
@@ -41,6 +36,8 @@ def reset
# * --daemon
# * --mailq
+module ActionMailer; end
+
class ActionMailer::ARSendmail
##
@@ -254,6 +251,7 @@ def self.process_args(args)
Dir.chdir options[:Chdir] do
begin
require 'config/environment'
+ require 'action_mailer/ar_mailer'
rescue LoadError
usage opts, <<-EOF
#{name} must be run from a Rails application's root to deliver email.

0 comments on commit b918cb5

Please sign in to comment.
Something went wrong with that request. Please try again.