# No route matches "/site/homepages" with {:method=\>:get}

**URL:** <https://www.ruby-forum.com/t/no-route-matches-site-homepages-with-method-get/137156>\
**Category:** Rails\
**Created:** [May 9, 2008, 3:02pm UTC](https://www.ruby-forum.com/t/no-route-matches-site-homepages-with-method-get/137156 "2008-05-09T15:02:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MDM](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ac8455/32.png) [@MDM](https://www.ruby-forum.com/u/MDM)\
**Post date:** [May 9, 2008, 3:02pm UTC](https://www.ruby-forum.com/t/no-route-matches-site-homepages-with-method-get/137156/1 "2008-05-09T15:02:25Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![MDM](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ac8455/32.png) [@MDM](https://www.ruby-forum.com/u/MDM)\
**Post date:** [May 9, 2008, 4:55pm UTC](https://www.ruby-forum.com/t/no-route-matches-site-homepages-with-method-get/137156/2 "2008-05-09T16:55:06Z")

</div>

Can you post your routes.rb file?
