ActionMailer failing test


#1

Hi all,

I have an app using rails 2.2.2 and engines from master branch commit
5a2fb6db.

I have an Emailer < ActionMailer::Base but I need to have some of the
templates in the app and some others in an engines plugin. But as soon
as I move some templates from app/views/emailer/ to
vendor/plugins/my_plugin/app/views/emailer/, it starts failing with
MissingTemplate.

running rake test in engines says:

Finished in 0.403761 seconds.

  1. Failure:
    test_should_work(ExceptionNotificationCompatibilityTest)

[./test/functional/exception_notification_compatibility_test.rb:25:in
`test_should_work’

/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb:60:in
`send

/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb:60:in
run']: Exception raised: Class: <ActionView::MissingTemplate> Message: <"Missing template exception_notifier/exception_notification.erb in view path /home/diego/repos/git/activerain/activeagent-mainline-master/vendor/plugins/engines/test_app/app/views:/home/diego/repos/git/activerain/activeagent-mainline-master/vendor/plugins/engines/test_app/vendor/plugins/test_plugin_mailing/app/views:/home/diego/repos/git/activerain/activeagent-mainline-master/vendor/plugins/engines/test_app/vendor/plugins/test_assets/app/views:/home/diego/repos/git/activerain/activeagent-mainline-master/vendor/plugins/engines/test_app/vendor/plugins/beta_plugin/app/views:/home/diego/repos/git/activerain/activeagent-mainline-master/vendor/plugins/engines/test_app/vendor/plugins/alpha_plugin/app/views:/home/diego/repos/git/activerain/activeagent-mainline-master/vendor/plugins/engines/test_app/app/views:"> ---Backtrace--- /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:95:infind_full_path’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:16:in
`initialize’

Is this working for anyone else? Is it just my setup or do we have a
real bug here? If this is failing for someone else too, I’ll be working
on a patch. But I’d prefer to avoid it if it’s only MY problem.

Thanks,
Diego


#2

Exactly the same problem with only using ExceptionNotifier. Please let
me know if you find a solution.

Thanks,
Eric

Diego Algorta wrote:

Hi all,

I have an app using rails 2.2.2 and engines from master branch commit
5a2fb6db.

I have an Emailer < ActionMailer::Base but I need to have some of the
templates in the app and some others in an engines plugin. But as soon
as I move some templates from app/views/emailer/ to
vendor/plugins/my_plugin/app/views/emailer/, it starts failing with
MissingTemplate.

running rake test in engines says:

Finished in 0.403761 seconds.

  1. Failure:
    test_should_work(ExceptionNotificationCompatibilityTest)

[./test/functional/exception_notification_compatibility_test.rb:25:in
`test_should_work’

/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb:60:in
`send

/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb:60:in
`run’]:
Exception raised:
Class: ActionView::MissingTemplate
Message: <"Missing template


#3

Hi,

This was caused by, I think, the ‘official’ plugin disappearing from
visibility to script/plugin (the svn servers for rubyonrails were
turned off). I’ve amended the test setup to use a direct URL to the
plugin, and all should be good now.

James


#4

Thanks James.

Also, it looks like the latest version of ExceptionNotifier, which is
available through github, fixes the problem. It’s good to go.

Eric

James A. wrote:

Hi,

This was caused by, I think, the ‘official’ plugin disappearing from
visibility to script/plugin (the svn servers for rubyonrails were
turned off). I’ve amended the test setup to use a direct URL to the
plugin, and all should be good now.

James