So, while this works great on the productions server (Apache2 +
mongrel_cluster) it causes a few problems when running on the dev
machine.
Can I have a seperate set of routes for the dev box? or am I missing
something?
This is what is surrently in my routes.rb :
map.connect ‘/:option’, :controller => “welcome”, :option => /laddr/
map.connect ‘/:option/:action/:defender_id/
ladder/:ladder_id’, :controller => ‘ladder’, :option => /laddr/
map.connect ‘/:option/match/refuse/:id’, :controller =>
‘match’, :action => ‘refuse’, :option => /laddr/
map.connect ‘/:option/match/result/:id’, :controller =>
‘match’, :action => ‘result’, :option => /laddr/
map.connect ‘/:option/match/:match_id/:action/:id’, :controller =>
‘match’, :option => /laddr/
Install the default route as the lowest priority.
map.connect ‘/:option/:controller/:action/:id.:format’, :option => /
laddr/
map.connect ‘/:option/:controller/:action/:id’, :option => ‘/laddr/’
The optional bit, doesn’t seem to be optional, so if I do
http://localhost:3000/
I get an error :
“no route found to match “/” with {:method=>:get}”
but when I add the /laddr it works fine. I can live with that, but it
also breaks static files, stylesheets and images for example, as it’s
now looking for those in /laddr/stylesheets
I don’t really like the idea of having 2 sets of routes, because,
well, I only want to maintain 1 and not forget about the production
ones all the time (because you know that’s what will happen).
-S