Ming
(Ming)
July 14, 2007, 6:46pm
1
How do I debug a routing error?
I've been running examples from the Agile Rails book just fine to the
end of Chapter 8, cart creation. Then the next morning my installation
stopped working.
"no route found to match "/store" with {:method=>:get}"
attempting to debug:
rs = ActionController::Routing::Routes
rs.recognize_path "/store"
=> {:controller=>"store", :action=>"index"}
the problem persists despite making the suggestion of changing
root_path = Pathname.new(root_path).cleanpath(true).to_s
in config/boot.rb for my rails 1.2.3 installation.
TIA
Ming
(Ming)
July 15, 2007, 8:45am
3
routes.rb:
ActionController::Routing::Routes.draw do |map|
map.connect ':controller/:action/:id.:format'
map.connect ':controller/:action/:id'
end
Ming
(Ming)
July 15, 2007, 8:46am
4
Jodi -
The pdf looks really cool... though at this stage of my railship, i'm
not sure what to make of it...
I might to install Edge Rails and Rick's routing_navigator plugin to
get to the root of my problem
thanks.
Ming
(Ming)
July 15, 2007, 8:47am
5
i meant to say that in boot.rb i changed
root_path = Pathname.new(root_path).cleanpath(true).to_s
to
root_path = Pathname.new(root_path).cleanpath(true).realpath().to_s
per
http://thenoobonrails.blogspot.com/2007/06/rails-12x-routing-issues.html
this has not helped...
Ming
(Ming)
July 15, 2007, 6:33pm
6
i fixed the problem by uninstalling and reinstalling the rails gem.
apparently i have a version of the elsewhere reported spurious routes
for rails 1.2.3 that doesn't get fixed by adding realpath to
root_path:
root_path = Pathname.new(root_path).cleanpath(true).realpath().to_s
thanks to all who responded.