# Rails 1.1.4: engines problems

**URL:** <https://www.ruby-forum.com/t/rails-1-1-4-engines-problems/96669>\
**Category:** Engines\
**Created:** [June 30, 2006, 5:56pm UTC](https://www.ruby-forum.com/t/rails-1-1-4-engines-problems/96669 "2006-06-30T17:56:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgreiser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/258eb7/32.png) [@tgreiser](https://www.ruby-forum.com/u/tgreiser)\
**Post date:** [June 30, 2006, 5:56pm UTC](https://www.ruby-forum.com/t/rails-1-1-4-engines-problems/96669/1 "2006-06-30T17:56:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tgreiser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/258eb7/32.png) [@tgreiser](https://www.ruby-forum.com/u/tgreiser)\
**Post date:** [June 30, 2006, 6:31pm UTC](https://www.ruby-forum.com/t/rails-1-1-4-engines-problems/96669/2 "2006-06-30T18:31:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tgreiser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/258eb7/32.png) [@tgreiser](https://www.ruby-forum.com/u/tgreiser)\
**Post date:** [June 30, 2006, 6:50pm UTC](https://www.ruby-forum.com/t/rails-1-1-4-engines-problems/96669/3 "2006-06-30T18:50:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tgreiser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/258eb7/32.png) [@tgreiser](https://www.ruby-forum.com/u/tgreiser)\
**Post date:** [June 30, 2006, 8:28pm UTC](https://www.ruby-forum.com/t/rails-1-1-4-engines-problems/96669/4 "2006-06-30T20:28:45Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![tgreiser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/258eb7/32.png) [@tgreiser](https://www.ruby-forum.com/u/tgreiser)\
**Post date:** [June 30, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/rails-1-1-4-engines-problems/96669/5 "2006-06-30T18:59:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tgreiser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/258eb7/32.png) [@tgreiser](https://www.ruby-forum.com/u/tgreiser)\
**Post date:** [July 1, 2006, 12:40am UTC](https://www.ruby-forum.com/t/rails-1-1-4-engines-problems/96669/6 "2006-07-01T00:40:13Z")

</div>

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. ☹

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. 😉

–  
Paul R.

---

<div class="post-metadata">

**Author:** ![tgreiser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/258eb7/32.png) [@tgreiser](https://www.ruby-forum.com/u/tgreiser)\
**Post date:** [July 1, 2006, 7:56pm UTC](https://www.ruby-forum.com/t/rails-1-1-4-engines-problems/96669/7 "2006-07-01T19:56:00Z")

</div>

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](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](http://svn.rails-engines.org/engines/branches/rb_1.1) engines

Cheers,

James

---

<div class="post-metadata">

**Author:** ![tgreiser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/258eb7/32.png) [@tgreiser](https://www.ruby-forum.com/u/tgreiser)\
**Post date:** [July 5, 2006, 11:43am UTC](https://www.ruby-forum.com/t/rails-1-1-4-engines-problems/96669/8 "2006-07-05T11:43:20Z")

</div>

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](http://svn.rails-engines.org/engines/branches/rb_1.1)

Please leave feedback on Ticket #180 as per usual.

Thanks,

James

---

<div class="post-metadata">

**Author:** ![tgreiser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/258eb7/32.png) [@tgreiser](https://www.ruby-forum.com/u/tgreiser)\
**Post date:** [July 5, 2006, 4:40pm UTC](https://www.ruby-forum.com/t/rails-1-1-4-engines-problems/96669/9 "2006-07-05T16:40:08Z")

</div>

James,

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

-Chad
