Can anyone out here help. I am new to Ruby on Rails and struggling with the above error My Website was up and running for some months and I was happily developing it until one day when I was on holiday calls to my website produced the above error After a lot of reading up what seems to be the problem is that I have a symlink called site in my website "public_html" which points to my application "public" folder which is in another folder in my website root (as a form of protection). What seems to be happening suddenly is that my routes.rb file is trying to recognise "site/homepages" instead of "homepages" I am in development mode, using rails2.02 I have checked my routes recognition in the irb console in the following way which I think proves that my application is running OK:>> irb ActionController::Routing::Routes >> generate(:controller => "homepages", :action => "create")=> "/homepages">> generate(:controller => "dsplaces", :id => 5, :action => "create")=> "/dsplaces/create/5">> recognize_path("/homepages",:method => :get)=> {:controller=>"homepages", :action=>"index"}>>QUESTION:- How can I get the Rails routing system to drop the "site" part of the url in order that it will recognise my controllers. and why should it suddenly stop recognising the path"site/xxxx" when it was doing so for months Unfortunately I need site in the url as it is used all over in my coding, which was written in Rails 1.28 I think If it helps my first and last lines or my development log is a follows:- Processing ApplicationController#index (for 75.202.73.253 at 2008-05-08 21:40:24) [GET] Session ID: xxxxxxxxxxxlong set of charxxxxxxxxxxxxxxx Parameters: {} ActionController::RoutingError (No route matches "/site/ glossaryentries" with {:method=>:get}): /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ routing.rb:1441:in `recognize_path'' ......... ........ /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:24:in `process!'' dispatch.fcgi:24 Rendering /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/templates/rescues/layout.erb (not_found) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ruby Freak
2008-May-09 14:54 UTC
Re: No route matches "/site/homepages" with {:method=>:get}
Can you post your routes.rb file? On May 9, 5:42 am, MDM <don.m...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Can anyone out here help. I am new to Ruby on Rails and struggling > with the above error > My Website was up and running for some months and I was happily > developing it until one day > when I was on holiday calls to my website produced the above error > After a lot of reading up what seems to be the problem is that I have > a symlink called site > in my website "public_html" which points to my application "public" > folder which is in another folder in my website root (as a form of > protection). > What seems to be happening suddenly is that my routes.rb file is > trying to recognise "site/homepages" instead of "homepages" > I am in development mode, using rails2.02 > I have checked my routes recognition in the irb console in the > following way which I think proves that my application is running OK: > > >> irb ActionController::Routing::Routes > >> generate(:controller => "homepages", :action => "create") > > => "/homepages" > > >> generate(:controller => "dsplaces", :id => 5, :action => "create") > > => "/dsplaces/create/5" > > >> recognize_path("/homepages",:method => :get) > > => {:controller=>"homepages", :action=>"index"} > > > > QUESTION:- How can I get the Rails routing system to drop the "site" > part of the url in order that it will recognise my controllers. > and why should it suddenly stop recognising the path"site/xxxx" when > it was doing so for months > Unfortunately I need site in the url as it is used all over in my > coding, which was written in Rails 1.28 I think > > If it helps my first and last lines or my development log is a > follows:- > > Processing ApplicationController#index (for 75.202.73.253 at > 2008-05-08 21:40:24) [GET] > Session ID: xxxxxxxxxxxlong set of charxxxxxxxxxxxxxxx > Parameters: {} > > ActionController::RoutingError (No route matches "/site/ > glossaryentries" with {:method=>:get}): > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > routing.rb:1441:in `recognize_path'' > ......... > ........ > /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:24:in > `process!'' > dispatch.fcgi:24 > > Rendering /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/templates/rescues/layout.erb (not_found)--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---