# Problem with ActionMailer#template\_root in Rails 2.1

**URL:** <https://www.ruby-forum.com/t/problem-with-actionmailer-template-root-in-rails-2-1/145833>\
**Category:** Rails\
**Created:** [August 14, 2008, 10:58am UTC](https://www.ruby-forum.com/t/problem-with-actionmailer-template-root-in-rails-2-1/145833 "2008-08-14T10:58:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![g0nzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/3bc359/32.png) [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Post date:** [August 14, 2008, 10:58am UTC](https://www.ruby-forum.com/t/problem-with-actionmailer-template-root-in-rails-2-1/145833/1 "2008-08-14T10:58:05Z")

</div>

Hi,

I’m using sms\_fu plugin and after upgrading Rails to 2.1 it breaks.

There’s ActionMailer (in vendor/plugins/sms\_fu/lib) that has  
template\_root method defined:

def template\_root  
“#{File.dirname( **FILE** )}/…/views”  
end

but when trying to create an email I get the following error:  
ActionView::TemplateFinder::InvalidViewPath: Unprocessed view path  
found: “/myapp/vendor/plugins/sms\_fu/lib/…/views”. Set your view  
paths with #append\_view\_path, #prepend\_view\_path, or #view\_paths=.

When I remove template root it says it can’t find a view, which is  
understood. The problem is that ActionMailer doesn’t have  
append\_view\_path method, so I’m not sure how to tell Rails to use  
vendor/plugins/sms\_fu/views as well.

Any ideas how to fix it?

---

<div class="post-metadata">

**Author:** ![g0nzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/3bc359/32.png) [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Post date:** [August 14, 2008, 11:00am UTC](https://www.ruby-forum.com/t/problem-with-actionmailer-template-root-in-rails-2-1/145833/2 "2008-08-14T11:00:26Z")

</div>

On Aug 14, 10:57 am, szimek [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Any ideas how to fix it?  
> Just found out that the plugin was updated to be compatible with Rails  
> 2.1 🙂
