# 1.2.1 errors?

**URL:** <https://www.ruby-forum.com/t/1-2-1-errors/83635>\
**Category:** Engines Development\
**Created:** [January 28, 2007, 3:49am UTC](https://www.ruby-forum.com/t/1-2-1-errors/83635 "2007-01-28T03:49:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben\_wiseley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/45deac/32.png) [@ben\_wiseley](https://www.ruby-forum.com/u/ben_wiseley)\
**Post date:** [January 28, 2007, 3:49am UTC](https://www.ruby-forum.com/t/1-2-1-errors/83635/1 "2007-01-28T03:49:13Z")

</div>

Any ideas on this? On a “from scratch, do nothing app” I’m getting  
this error when mixing engines plugin and the exception\_notification  
plugin…

Engines by themselves work and exception\_notification by itself works  
but I can’t seem to combine the two

I read through the news site on engines and didn’t see this covered…  
anyone have any ideas.

- Upgraded to Rails 1.2.1 (and updated all gems)

- Did a Rails rails12test

- script/plugin install  
[http://dev.rubyonrails.org/svn/rails/plugins/exception\_notification/](http://dev.rubyonrails.org/svn/rails/plugins/exception_notification/)

- set that up like you normally do (enviroment/application settings)

- put up a dummy controller… app runs fine

- ruby script/plugin install  
[http://svn.rails-engines.org/plugins/engines](http://svn.rails-engines.org/plugins/engines)

- added the line to environment:  
config.plugins = %W( engines exception\_notification )

- run app and I get a:

ben-wiseleys-computer:~/dev/rail12test wiseleyb$ mongrel\_rails start  
\*\* Starting Mongrel listening at 0.0.0.0:3000  
\*\* Starting Rails with development environment…  
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active\_support/dependencies.rb:250:in  
`load_missing_constant': Expected /Users/wiseleyb/dev/rail12test/config/../vendor/plugins/exception_notification/lib/exception_notifier.rb to define ExceptionNotifier (LoadError) from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:453:in `const\_missing’  
from  
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active\_support/dependencies.rb:465:in  
`const_missing' from /Users/wiseleyb/dev/rail12test/config/environment.rb:61 from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem\_original\_require’  
from  
/opt/local/lib/ruby/vendor\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:155:in `rails’  
from  
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:112:in  
`cloaker_' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in `call’  
… 6 levels…  
from  
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in  
`run' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 from /opt/local/bin/mongrel_rails:18:in `load’  
from /opt/local/bin/mongrel\_rails:18

---

<div class="post-metadata">

**Author:** ![ben\_wiseley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/45deac/32.png) [@ben\_wiseley](https://www.ruby-forum.com/u/ben_wiseley)\
**Post date:** [January 28, 2007, 11:36am UTC](https://www.ruby-forum.com/t/1-2-1-errors/83635/2 "2007-01-28T11:36:46Z")

</div>

Hi Ben,

The main release of the engines plugin hasn’t yet been updated to work  
with Rails 1.2. Instead, could you use SVN to check out the 1.2  
release branch?

svn co [http://svn.rails-engines.org/engines/branches/rb\_1.2](http://svn.rails-engines.org/engines/branches/rb_1.2)  
vendor/plugins/engines

That should work, but if you do experience any problems please post  
back to list list, or onto the issue tracker (see the docs)

Thanks

James

---

<div class="post-metadata">

**Author:** ![ben\_wiseley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/45deac/32.png) [@ben\_wiseley](https://www.ruby-forum.com/u/ben_wiseley)\
**Post date:** [January 28, 2007, 6:00pm UTC](https://www.ruby-forum.com/t/1-2-1-errors/83635/3 "2007-01-28T18:00:08Z")

</div>

James,

Seems to be working pretty well on both of our fairly large apps that  
are using engines.

The only problem I’ve run into so far is with mailers…

In engines/lib/engines/rails\_extransion/templates.rb in method  
render\_with\_engine\_additions(opts) at line 133 I had to make this  
small change

```
    template_path_for_method =

```

Dir[“#{template\_path}/#{opts[:file]}.\*”].first ||  
Dir[“#{template\_path}/#{opts[:file]}”].first

My Input data (if it helps) was:

For opts.to\_yaml:

:body:  
notification\_type: new\_comment  
blog\_entry\_title: asdf  
comment\_by\_html: " by [Ben  
Wiseley](http://activerain.com/wiseleyb)"  
comment: asdf  
  
blog\_entry\_url: [http://localhost:3000/blogsview/33218/asdf](http://localhost:3000/blogsview/33218/asdf)  
comment\_by\_text: " by Ben Wiseley"  
:file: blog\_notification\_email.text.html.rhtml

And for template\_path.to\_yaml:

* * *

“{/Users/wiseleyb/dev/activerain/activeagent/app/views/emailer,/Users/wiseleyb/dev/activerain/activeagent/vendor/plugins/active\_engine/app/views/emailer,/Users/wiseleyb/dev/activerain/activeagent/vendor/plugins/acts\_as\_ferret/app/views/emailer,/Users/wiseleyb/dev/activerain/activeagent/vendor/plugins/exception\_notification/app/views/emailer,/Users/wiseleyb/dev/activerain/activeagent/vendor/plugins/engines/app/views/emailer}”

---

<div class="post-metadata">

**Author:** ![ben\_wiseley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/45deac/32.png) [@ben\_wiseley](https://www.ruby-forum.com/u/ben_wiseley)\
**Post date:** [January 28, 2007, 6:58pm UTC](https://www.ruby-forum.com/t/1-2-1-errors/83635/4 "2007-01-28T18:58:21Z")

</div>

Hi Ben,

There’s currently a ticket for this on the issue tracker  
([http://dev.rails-engines.org/engines-plugin/tickets/263](http://dev.rails-engines.org/engines-plugin/tickets/263)), but since I  
don’t use ActionMailer day-to-day, it’s not trivial for me to  
replicate this error. Could you add a failing test case to the test  
application ([http://svn.rails-engines.org/test/engines/rails\_1.2](http://svn.rails-engines.org/test/engines/rails_1.2)) and  
submit it as a patch to that ticket?

Failing that, a zip of the failing mailer model, mail views and so on  
would also be useful.

Thanks - this seems to be the only blocker before I release 1.2 🙂

---

<div class="post-metadata">

**Author:** ![ben\_wiseley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/45deac/32.png) [@ben\_wiseley](https://www.ruby-forum.com/u/ben_wiseley)\
**Post date:** [January 28, 2007, 10:17pm UTC](https://www.ruby-forum.com/t/1-2-1-errors/83635/5 "2007-01-28T22:17:00Z")

</div>

James,

Updated the ticket that mentions this with a zip file that can be used  
to  
test this. Sorry - kind of new to the patch thing with open source  
projects  
and am not sure what exactly people are supposed to do :). Tried to  
check  
in to your project but it wouldn’t let me so I sent a zip file instead.  
README.txt has details on how to get the unit test to pass. There’s  
also  
some basic UI stuff included for mucking about from the browser if it  
helps.

[http://dev.rails-engines.org/tickets/263](http://dev.rails-engines.org/tickets/263)

Thanks for all your work on Engines… this has made my work much easier  
and  
DRYer.

-ben

---

<div class="post-metadata">

**Author:** ![ben\_wiseley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/45deac/32.png) [@ben\_wiseley](https://www.ruby-forum.com/u/ben_wiseley)\
**Post date:** [January 29, 2007, 12:19am UTC](https://www.ruby-forum.com/t/1-2-1-errors/83635/6 "2007-01-29T00:19:19Z")

</div>

Thanks for that Ben,

The reason I hadn’t picked up on this was because of some changes in  
ActionMailer (namely picking up method\_name.text.whatever.rhtml  
templates). The way ActionMailer::Base has been put together, it’s  
quite tricky to untangle it into a state where we can start to make it  
play nice with plugins. The fixes suggested on that ticket work with  
_implicit_ multipart mails, but not with explict ones (where parts are  
defined via part “text/plain” { … } ), or so it seems.

I’ll have a think, but if anyone comes up with a general fix (plus  
tests), please do throw them up against this ticket.

James
