# Rails 1.1.5: routing issue

**URL:** <https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554>\
**Category:** Engines\
**Created:** [August 9, 2006, 10:40pm UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554 "2006-08-09T22:40:42Z")\
**Posts on this page:** 15\
**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:** [August 9, 2006, 10:40pm UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/1 "2006-08-09T22:40:42Z")

</div>

Most of my rails sites are working fine on 1.1.5, but I have one site  
that has lost it’s route to UserController.

ActionController::RoutingError (Recognition failed for “/user/login”):  
/vendor/rails/actionpack/lib/action\_controller/routing.rb:526:in  
`recognition_failed' /vendor/rails/actionpack/lib/action_controller/routing.rb:516:in `recognize!’  
/vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch’  
/opt/rails/manageor\_devel/public/dispatch.cgi:10

Engines I am using:

engines [http://svn.rails-engines.org/engines/branches/rb\_1.1](http://svn.rails-engines.org/engines/branches/rb_1.1)  
login\_engine [http://svn.rails-engines.org/plugins/login\_engine](http://svn.rails-engines.org/plugins/login_engine)

When I ./script/console I can run through the sequence of commands and  
it finds the route correctly, but if I breakpoint in  
action\_controller/routing.rb it is failing on line 515:

hash = recognize\_path(path)

recognize\_path is being generated by some code I don’t have time to grok  
ATM, but both environments seem to be generating the same code (except  
for the order of some Hash elements).

When I roll back to 1.1.4, all is fine. I’m not doing anything fancy  
with routes.rb, only setting a default route:

map.connect ‘’, :controller =\> ‘work’

Any ideas?

Tim.

---

<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:** [August 10, 2006, 12:27pm UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/2 "2006-08-10T12:27:57Z")

</div>

Tim Greiser wrote:

> When I roll back to 1.1.4, all is fine. I’m not doing anything fancy  
> with routes.rb, only setting a default route:

Yeah, we’re having the same issue here with a stock install of user- and  
login engines and then upgrading to 1.1.5. We’re rolling back to 1.1.4  
for the moment, since I don’t have time to investigate this.

d

---

<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:** [August 10, 2006, 3:26pm UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/3 "2006-08-10T15:26:23Z")

</div>

> > When I roll back to 1.1.4, all is fine. I’m not doing anything fancy  
> > with routes.rb, only setting a default route:

Same here, hope someone find a solution for this.  
Somebody suggested commenting out two lines from  
vendor\plugins\engines\lib\engines.rb

require ‘logger’

# load this before doing ANYTHING freaky with the reloading.

begin

# require ‘rails\_version’ # Rails 1.0, 1.1.0

#rescue LoadError, Gem::Exception  
require ‘rails/version’ # renamed as of Rails 1.1.1  
end

But it doesn’t work for me.  
CU

---

<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:** [August 10, 2006, 3:36pm UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/4 "2006-08-10T15:36:50Z")

</div>

Dewet D. wrote:

> We’re rolling back to 1.1.4 for the moment

Hmm, maybe not the best idea; one of the comments on DHH’s  
announcement:

"Joel on 10 Aug 05:48:

“I figured out how to fix Engines, but explaining it would give away the  
exploit. It is very, very severe. If you use Engines you might want to  
drop back to 1.1.3 which evidently is unaffected.”

I see DHH also just posted that 1.1.3 is unaffected, which means Engines  
should start working again. I haven’t checked; I’m still waiting for  
the gems to install.

d

---

<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:** [August 10, 2006, 5:27pm UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/5 "2006-08-10T17:27:19Z")

</div>

A temp fix is in SVN now. It works for me. A question to the  
contributor … is there a reason for the multiple calls to:

ActionController::Routing::ControllerComponent.file\_kinds("\A#{extended\_engine\_root}/#{path}")

I found it worked fine to call once:

ActionController::Routing::ControllerComponent.file\_kinds(:vendor)

Thanks for the fix.  
Tim.

---

<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:** [August 11, 2006, 4:17am UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/6 "2006-08-11T04:17:56Z")

</div>

Tim Greiser wrote:

> A temp fix is in SVN now.

Where exactly? I don’t see any changes at  
[http://svn.rails-engines.org/plugins/login\_engine](http://svn.rails-engines.org/plugins/login_engine)

(bit of a rails and svn newb here)

Thanks,  
Carl

---

<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:** [August 11, 2006, 4:34am UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/7 "2006-08-11T04:34:10Z")

</div>

Carl J. wrote:

> Tim Greiser wrote:
> 
> > A temp fix is in SVN now.
> 
> Where exactly? I don’t see any changes at  
> [http://svn.rails-engines.org/plugins/login\_engine](http://svn.rails-engines.org/plugins/login_engine)

Er, sorry, I see this was already answered. I think [ruby-forum.com](http://ruby-forum.com) is  
missing some msgs from the thread, but I found the info elsewhere and in  
the bug.

---

<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:** [August 14, 2006, 11:41am UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/8 "2006-08-14T11:41:50Z")

</div>

Found a reason for not recognizing Engines paths

if you are interested - see the post on my blog -  
[http://npenkov.com/articles/2006/08/14/engines-with-rails-1-1-5-6-routing-issue](http://npenkov.com/articles/2006/08/14/engines-with-rails-1-1-5-6-routing-issue)

I will try to find a sollution in few hours.

---

<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:** [August 15, 2006, 2:12pm UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/9 "2006-08-15T14:12:32Z")

</div>

See [http://dev.rails-engines.org/tickets/196](http://dev.rails-engines.org/tickets/196), and please focus all bug  
reports there,

I’m currently unable to replicate these routing errors, either using  
the latest tags, or the development branches - anything you can  
provide that would help replicate this would be much appreciated!

Please consider trying to replicate this in the login\_engine test  
application too  
([http://svn.rails-engines.org/test/login\_engine/rails\_1.1](http://svn.rails-engines.org/test/login_engine/rails_1.1))

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:** [August 15, 2006, 2:09pm UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/10 "2006-08-15T14:09:43Z")

</div>

Adding ‘vendor’ to the accepted file path is too general, given the  
nature of the exploit.

- 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:** [August 15, 2006, 2:13pm UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/11 "2006-08-15T14:13:37Z")

</div>

I’ve made a preliminary fix available in the 1.1 release branch (more  
details on the Collabo site, please check there).

Note that this doesn’t represent a final patch; I want to understand a  
bit more about _why_ Rails was patched in the way it was before I  
commit to one particular workaround. Problems to Ticket #196, please.

Ever onwards,

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:** [August 15, 2006, 2:13pm UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/12 "2006-08-15T14:13:19Z")

</div>

I’m not sure what bug that particular ‘fix’ applies to, but the 1.1.5  
issue has been found. See [dev.rails-engines.org](http://dev.rails-engines.org) for more information,  
I have a fix ready but I’m waiting to hear more from Rails Core before  
I commit it.

- 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:** [August 15, 2006, 2:19pm UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/13 "2006-08-15T14:19:44Z")

</div>

Nick - have you been following the details on the Engines Collabo  
site? [http://dev.rails-engines.org/tickets/196](http://dev.rails-engines.org/tickets/196)

- 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:** [August 17, 2006, 9:55am UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/14 "2006-08-17T09:55:57Z")

</div>

Yes,  
as a matter of fact, like mentioned on Collabo site - when I was trying  
to fix my applications for 1.1.5/6, you have already developed a fix, so  
now I am using it (checkout of engines trunk). My solution was only a  
temporary one (I like my application to run on last version of Rails).

James A. wrote:

> Nick - have you been following the details on the Engines Collabo  
> site? [http://dev.rails-engines.org/tickets/196](http://dev.rails-engines.org/tickets/196)
> 
> - 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:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/rails-1-1-5-routing-issue/64554/15 "2006-08-15T14:16:32Z")

</div>

There’s another patch to match 1.1.6 - please see the main announcement  
post…

- james
