Rails 1.1.4: engines problems

The upgrade to rails 1.1.4 today seemed to break my login_engine and
user_engine. user_engine now denies access to the login page, and on
another site that is just using login_engine, the login form no longer
works.

Will post again once I have more details.

On one site I had overridden app/controllers/user_controller.rb (only
set 1 method ‘home’). This was causing
vendor/plugins/login_engine/app/controllers/user_controller.rb::protect?
to not execute. As a temporary fix I copied the protect? method into my
overridden copy.

The login form not working is essentially the same problem. The
controllers no longer seem to be ‘mixing in’ properly. Since I was only
doing a redirect in the home action, I just removed
app/controllers/user_controller.rb, and added a user/home.rhtml view
with a simple javascript redirect.

On the other site, the problem was similar but a different cause. I
wasn’t overriding user_controller, but had both user_engine and
login_engine installed. They were not mixing properly. Rather than
doing anything hackish I just did:

rake rails:freeze:edge TAG=rel_1-1-3

and wait for a engines fix.

Hi,

I can’t replicate this problem with the engines test application. You
can download it using svn using the following command

svn co http://svn.rails-engines.org/test/engines/rails_1.1
engines_test
cd engines_test
rake test

In particular, the tests which demonstrate that methods from engine
controllers can still be loaded in the presence of application
controller mixing are in
test/functional/application_overloading_engine_controller_test.rb.

If you can replicate this problem with the test application, please
let me know…

  • james

On 30 Jun 2006, at 17:31, Tim Greiser wrote:

On one site I had overridden app/controllers/user_controller.rb (only
set 1 method ‘home’). This was causing
vendor/plugins/login_engine/app/controllers/
user_controller.rb::protect?
to not execute. As a temporary fix I copied the protect? method
into my
overridden copy.

Tim,

I’ve forwarded your posts to the main rails lists to make sure others
see it and help Google grab it sooner, and have also made a
suggestion that we should be helping the rails core team test their
releases with engine, plugins and apps before they roll out a
release. Will now wait and see what the reaction is.

I’ll also take a look this weekend at what’s going on - I’ve got a
load of apps using user/login engine with customisation and was
waiting for 1.1.4 to shake out before upgrading. As this would be a
show-stopper for me, I’m going to put the time into working out what
is going on.

Thanks for the work-around.


Paul R.

On 30 Jun 2006, at 17:50, Tim Greiser wrote:

On the other site, the problem was similar but a different cause. I
wasn’t overriding user_controller, but had both user_engine and
login_engine installed. They were not mixing properly. Rather than
doing anything hackish I just did:

rake rails:freeze:edge TAG=rel_1-1-3

and wait for a engines fix.

Looks like the tests aren’t covering everything then. :frowning:

Just posted to the rails list asking for log/development.log from
somebody bombing out ActiveRBAC. If you could send me the same for
your app using user-engine, I can confirm that if I get a repeat I’m
looking at the same error.

I’ll take a look at this when I have some time over the weekend (it’s
late, I’ve had a long day, etc.).

Will keep list updated with results when I have some. :wink:


Paul R.

I’ve managed to replicate this error now (the reason why I couldn’t
replicate them in normal tests is because of the specific way that
controllers are loaded in a running application). A ticket has been
filed on the Rails Engines Collaboa site:
http://dev.rails-engines.org/tickets/180

I’ve committed a fix to the release branch - if you are having
problems, can you please try using this version, and provide feedback
as comments on the Ticket:

cd vendor/plugins
rm -fr engines
svn co http://svn.rails-engines.org/engines/branches/rb_1.1 engines

Cheers,

James

Can y’all having trouble with Rails 1.1.4 please try updating to the
latest version of the Engines 1.1 release branch (revision 4
405)? This can be done by either:

(if you’re already on the release branch)
svn up vendor/plugins/engines

(if you’re not)
cd vendor/plugins
rm -fr engines
svn co http://svn.rails-engines.org/engines/branches/rb_1.1

Please leave feedback on Ticket #180 as per usual.

Thanks,

James

James,

Just got the latest version of engines from the branch you
mentioned. Everything is now working! Great work!

-Chad

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs