Fixing Spurious Rails Routing Error
Rails stopped routing http requests the morning after everything was working fine. I was running demo exercises from the Agile Rails book and didn't seem to do anything that could have messed up the installation. Downloading and symlinking to the books own app code didn't fix the problem.
"no route found to match "/store" with {:method=>:get}"
attempting to debug:
>> rs = ActionController::Routing:
:Routes
>> rs.recognize_path "/store"
=> {:controller=>"store", :action=>"index"}
routes.rb seems fine:
ActionController::Routing:
:Routes.draw do |map|
map.connect ':controller/:action/:id.:format'
map.connect ':controller/:action/:id'
end
Everything looks good where is the problem? I googled and found a post pointing out spurious routing problems in Rails 1.2.3 and a suggestion to change boot.rb to remedy it:
root_path = Pathname.new(root_path).cleanpath(true).to_s
to
root_path = Pathname.new(root_path).cleanpath(true).realpath().to_s
That suggestion did not work for me. Desperate to get my Rails show back on the road, I did the obvious:
gem uninstall rails
gem install rails
Bingo!
Popularity: 30% [?]
Thank you for reading this post. You can now Read Comments (2) or Leave A Trackback.
Post Info
This entry was posted on Sunday, July 15th, 2007 and is filed under software. Tagged with:You can follow any responses to this entry through the Comments Feed. You can Leave A Comment, or A Trackback.
Previous Post: MySpace Stumbles Playing Catchup to Facebook with Status Updates “Friendsmoods” »
Next Post: Brandon Antron Rolle Goes on Trial Today »
Read More
Related Reading:- Errata for Programming Collective Intelligence
- Yelp Battles Supporters of the Meier Family
- Pictures of Lori Drew
- Picture of Curt Drew
- Brandon Antron Rolle Goes on Trial Today
- Fixing Spurious Rails Routing Error
- MySpace Stumbles Playing Catchup to Facebook with Status Updates “Friendsmoods”
- MySpace API Unveiled
- Yelp’s Hangout Joins the Facebook Parade
- Facebook the Transformers of Social Networking






July 24th, 2007 14:28
Thanks! I actually made a pretty dumb newbie mistake: I kept trying the path using the folder name instead of the controller name. Oops! Well at least I now have the most current version of Rails.
December 12th, 2007 19:13
Im new to rails too and also came across this error after creating new controllers. I discovered that a simple restart of the WEBrick server worked!