Politics, Programming and Possibilities
9 Jan
For those who expressed interest in the pre-dispatcher code I’ve been experimenting with, there is now an updated dispatcher.rb available for download.
This one appears to be much more robust in the method used to track down the “built-in dispatcher” and load that code first. If it can’t find the built-in one, it’ll fail silently so that your Rails application can work even if the pre-dispatcher doesn’t.
Thanks to Hans Fugal for testing the original dispatcher.rb code.
4 Responses for "Updated pre-dispatcher"
Hi.
I just set up family connection on my hosting site and had a devil of a trouble with ../lib/dispatcher.rb
Eventually I renamed it to _dispatcher.rb to not have it loaded and everythign started to work.
Any suggestion?
I’m using 1.1.1 of family connection
Hi Steven,
Thanks for the feedback, and apologies on the trouble with dispatcher.rb. It’s more of an experiment than anything, and meant to make life *easier*, not harder. Ha! Well, at least you figured out that it’s an optional ‘feature’ already. Its only purpose is to interrupt the regular Rails dispatcher if there’s a database setup error, and then show a notification page via the web browser. I would have suggested renaming it or something similar also.
In the latest subversion repository is a dispatcher.rb that is much better at working in any environment. My original approach was to actually unload some of the loadpaths, but I found that was unnecessary in the long run.
I hope Family Connection is still useful to you!
Hi Duane,
I’m having similar dispatcher.rb issues on 1.1.2. You mentioned you have an updated dispatcher.rb that doesn’t use remove_load_path.
Can I get a copy of that or do you allow public access to your svn repository?
Thanks for your work,
George
The dispatcher.rb file linked to in this article is the one that doesn’t use remove_load_path. Give it a go and tell me if it works!
Leave a reply