Forum: Rails Engines development What is the state of support for rails 2.2?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ned Schwartz (Guest)
on 2008-11-05 23:25
(Received via mailing list)
I am trying to help get the project Adva-CMS ( up
date and ready for Rails 2.2.

Adva relies heavily on Engines and uses a fork that Sven Fuchs made to
timestamped migrations to work.

I see that the incompatibility with rails 2.2 has been addressed on the
branch on github:

My question is, what state is edge Engines in? and is the timestamped
migrations issue fixed in edge Engines?

I would like to re-integrate the base Engines repo into Adva-CMS if I
but if it is not feasible, I could patch Sven's fork and keep using

Please advise
James Adam (Guest)
on 2008-11-06 12:02
(Received via mailing list)
The simplest way to check the state of edge engines is to check out
the edge branch and run the tests:

   $ git clone git://
   $ git checkout edge
   $ rake test RAILS=edge

At the moment, there seems to be an issue with the templating - one of
the ActionMailer unit tests is failing, and a bunch of functional
tests are also failing. The functional failures are due to the removal
of a method we were relying on to determine what was being rendered
('first_render'). I suspect that these errors might be hiding another
minor template error.

The branch which contains Samuel Williams' patch for timestamped
migrations ('use_rails_own_migration_mechanism') isn't merged with
edge or master yet, although I expect to merge it soon (potentially
this afternoon).

If you have any problems running the tests, let me know. Hope that

Ned Schwartz (Guest)
on 2008-11-06 23:01
(Received via mailing list)
well... I get one unit test error and 6 functional errors.
The unit test error is is in ./test/unit/action_mailer_test.rb:34:in


> ActionView::MissingTemplate: Missing template
> plugin_mail/mail_from_plugin.erb

The functional test errors are all the same:

ActionView::TemplateError: undefined method `first_render' for
> #<ActionView::Base:0x236b670>

Here is a pastie of the full test results

If anyone has any idea about these that would be great... in the mean
I have been trying to track them down.

Thanks all,

Ned Schwartz (Guest)
on 2008-11-07 22:18
(Received via mailing list)
I have a question... the first
error, `test_should_be_able_to_create_mails_from_plugin', seems to be
by  there being a missing template in
the error is:
ActionView::MissingTemplate: Missing template
plugin_mail/mail_from_plugin.erb in view path

What confuses me, is that there is a
standard mail_from_plugin.text.plain.erb template.

I copied this template into a file called mail_from_plugin.html.erb and
same test passed.

Does anyone have any idea why this is? Also I am not sure if there is a
reason that just the plain text template is in there and not the
template. Is this test testing particularly for the plain text template?

Ned Schwartz (Guest)
on 2008-11-07 22:40
(Received via mailing list)
The second series of errors were all related to #first_render being
from ActionView::Base.
i noticed a ticket was opened in lighthouse about this so I responded

 however, I thought I would continue this conversation here as well.

Hi, I tried globally changing the <%= self.first_render %> to <%=
self.instance_variable_get(:@_first_render) %>

this seems to work pushing the errors to failures:

<"namespace/app_and_plugin/a_view (from app)"> expected but was
<"namespace/app_and_plugin/a_view.html.erb (from app)">


This seems acceptable if the test condition was just changed from
assert_response_body 'alpha_plugin/a_view' to assert_response_body

would that still satisfy the test? are the file extensions a problem?
James Adam (Guest)
on 2008-11-09 16:54
(Received via mailing list)
I just resolved this bug, by implementing a specific mechanism for
determining the path of the template that was rendered. This is
cleaner than relying on ActionView's internal state, and should
hopefully be more future-proof!

Now to track down that action mailer issue...

Thanks for your help with this!

James Adam (Guest)
on 2008-11-09 17:06
(Received via mailing list)
The test was testing the 'default' behaviour, but the template
overspecified that the email should be text/plain. The simplest way to
'fix' this test was to just rename the default template to '.erb',
rather than '.text.plain.erb', as this seems to be how Rails 2.2
expects ActionMailer to be used.

So... we're now passing all tests against Edge Rails! In other words,
the engines plugin should now be compatible with Rails 2.2 (seems like
it always was, but the tests were a bit 2.1-specific).

Thanks again for your investigations here,

Sven Fuchs (Guest)
on 2008-11-10 00:06
(Received via mailing list)
Awesome!  Thanks a lot.
6feebbed0a0571b16f6dff006502a2e9?d=identicon&s=25 Cameron Y. (camerony)
on 2008-11-10 10:38
(Received via mailing list)
Great news - thanks for this James, Ned, et al :)

2008/11/9 James Adam <>:
Ned Schwartz (Guest)
on 2008-11-10 15:47
(Received via mailing list)
This is really great news to wake up to first thing on monday! Great
and well done!

This topic is locked and can not be replied to.