We're in the process of reworking AM to work with the new AbstractController. One design goal is making the path to standalone use more clear. For your case, try require "action_controller" before trying to do any AM stuff :) -- Yehuda
2009/10/6 GregD <gditr...@fuse.net> > > Hi everyone, > > Has anybody used ActionMailer outside rails? I have googled and found > some things, but I can not seem to get it to work for a stand-alone > app. > > The problem is setting the template_root. If I dont' set it, > ActionMailer can not find my mail templates. If I try and set it, I > get an uninitialized constant ActionView::Base::ActionController when > I: > > ActionMailer::Base.template_root = 'some-path' > > I'm putting action_mailer, action_pack, rack, and active_support in a > vendor subdir of the app, so I can ship it with the app and adding to > the LOAD_PATH at the beggining og the app. > > Appreciate any help here!!!!!! > > > Here is the full error: > > /home/gditric/sandbox/ffl/vendor/activesupport-2.3.4/lib/ > active_support/dependencies.rb:105:in `rescue in const_missing': > uninitialized constant ActionView::Base::ActionController (NameError) > from /home/gditric/sandbox/ffl/vendor/activesupport-2.3.4/lib/ > active_support/dependencies.rb:94:in `const_missing' > from /home/gditric/sandbox/ffl/vendor/actionpack-2.3.4/lib/ > action_view/base.rb:191:in `cache_template_loading?' > from /home/gditric/sandbox/ffl/vendor/actionpack-2.3.4/lib/ > action_view/paths.rb:5:in `type_cast' > from /home/gditric/sandbox/ffl/vendor/actionpack-2.3.4/lib/ > action_view/paths.rb:16:in `block in initialize' > from /home/gditric/sandbox/ffl/vendor/actionpack-2.3.4/lib/ > action_view/paths.rb:16:in `map!' > from /home/gditric/sandbox/ffl/vendor/actionpack-2.3.4/lib/ > action_view/paths.rb:16:in `initialize' > from /home/gditric/sandbox/ffl/vendor/actionpack-2.3.4/lib/ > action_view/base.rb:205:in `new' > from /home/gditric/sandbox/ffl/vendor/actionpack-2.3.4/lib/ > action_view/base.rb:205:in `process_view_paths' > from /home/gditric/sandbox/ffl/vendor/actionmailer-2.3.4/lib/ > action_mailer/base.rb:437:in `template_root=' > from ./ffl.rb:66:in `<main>' > > > > -- Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---