Routes not reloaded properly
Reported by Michael Latta | May 21st, 2008 @ 02:59 AM | in 0.9.8
The merbful_authentication prepends routes as part of the router.rb. When this file is reloaded the prepended routes are not operating correctly. Restarting merb makes them work, but just editing router.rb does not properly recreate the same routes.
Comments and changes to this ticket
-
Michael Klishin (antares) May 21st, 2008 @ 07:16 AM
1. What does "not operating correctly" mean and how did you find it.
2. What do you suggest, recompile routes on each reload?
I think routes do not change so often that recompilation is needed but maybe it is just me. WDYT?
-
Michael Latta May 21st, 2008 @ 01:09 PM
If the router.rb file is going to be reloaded in dev mode it should not change the correct behavior from the initial run-through. In this case the prepended routes are not being processed. I do not know if this means routes are not being recompiled, or what. The routes defined in prepare are updated on each request, but the prepended ones are not. More debugging would be required to know for sure what is happening. I will try to make up a spec for this case when I get a chance (after the conference probably).
-
Michael Klishin (antares) May 21st, 2008 @ 01:38 PM
Use Merb::Router.routes to figure out whether your "prepended" routes are there at all. I guess it is because plugins and libraries code is not reloaded by default.
-
Michael Latta May 21st, 2008 @ 01:41 PM
The library code is not being modified, and the router.rb has a call at the end which causes the prepend call The issue would be if the reloaded file is not reexecuting that final call. I will update when I know more.
-
Michael Klishin (antares) May 22nd, 2008 @ 11:27 AM
- → State changed from new to open
- → Milestone changed from to 0.9.4
Any news with this? If you have questions, stop by #merb-hacking on freenode.
-
Michael Latta May 22nd, 2008 @ 11:37 AM
I took out the use of prepend and simply copied the routes to the front of the prepare block and it is working with reloads. I have not gone further than that, and am not likely to have time until after RailsConf to do more.
-
Michael Klishin (antares) August 2nd, 2008 @ 11:47 AM
- → Milestone changed from 0.9.4 to 0.9.5
- → Tag changed from to medium merb router routing
Router is being reworked at the moment. Stay tuned.
-
Carl Lerche August 7th, 2008 @ 03:37 AM
- → Assigned user changed from to Carl Lerche
-
Michael Klishin (antares) August 12th, 2008 @ 01:06 PM
- → Milestone changed from 0.9.5 to 0.9.6
-
Michael Klishin (antares) September 4th, 2008 @ 04:52 AM
- → Milestone changed from 0.9.6 to 0.9.7
-
Michael Klishin (antares) September 13th, 2008 @ 06:59 PM
- → Milestone changed from 0.9.7 to 0.9.8
-
Carl Lerche September 20th, 2008 @ 06:20 PM
- → Tag changed from medium merb router routing to medium merb router routing
I think this will have to be reinvestigated when the reloading code via forking is implemented.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
