# Problem w/ routes.rb

**URL:** <https://www.ruby-forum.com/t/problem-w-routes-rb/82658>\
**Category:** Rails\
**Created:** [January 19, 2007, 4:53pm UTC](https://www.ruby-forum.com/t/problem-w-routes-rb/82658 "2007-01-19T16:53:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![willbailey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/e9c0ed/32.png) [@willbailey](https://www.ruby-forum.com/u/willbailey)\
**Post date:** [January 19, 2007, 4:53pm UTC](https://www.ruby-forum.com/t/problem-w-routes-rb/82658/1 "2007-01-19T16:53:03Z")

</div>

I am trying to develop a new webapp using Rails 1.2.1. I am installing  
it onto a production web server running Apache w/ fastcgi. The server  
already has some older webapps running on it using an older version of  
Rails. The apps are not installed in the document root; they each have  
their own subdirectory which is a symlink for the apache document root  
to the “public” directory of each app; i.e.:  
https:///calendar  
https:///app2  
https:///app3

When installing the latest webapp, I receive the following error:  
ActionController::RoutingError (no route found to match  
“/technologies/list” with {:method=\>:get}):

For some reason, ActionController is not recognizing the default route  
(i.e., machine name/\<app\_root\>//). Just for the  
hell of it, I tried setting up the existing apps to use the Rails 1.2.1  
gem, and I receive the same error.

I have typically only used the default routes and not any custom ones;  
has something changed in Rails (I haven’t upgraded for a while) to  
require additional customization of the routes.rb file?

Any help would be appreciated!

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![willbailey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/e9c0ed/32.png) [@willbailey](https://www.ruby-forum.com/u/willbailey)\
**Post date:** [January 21, 2007, 10:30am UTC](https://www.ruby-forum.com/t/problem-w-routes-rb/82658/2 "2007-01-21T10:30:35Z")

</div>

I have the exact same problem! It makes absolutely no sense.

When I run the WEBrick server, the routing works fine. In Apache +  
FCGI, however, it does not.

Any help would be appreciated

-Matt

On Jan 19, 11:53 pm, Will B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![willbailey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/e9c0ed/32.png) [@willbailey](https://www.ruby-forum.com/u/willbailey)\
**Post date:** [January 21, 2007, 10:44am UTC](https://www.ruby-forum.com/t/problem-w-routes-rb/82658/3 "2007-01-21T10:44:36Z")

</div>

Greetings!

## Here is my routes file:

## ActionController::Routing::Routes.draw do |map| map.connect ‘’, :controller =\> ‘home’ map.connect ‘:controller/:action/:id’ end

The blank route works, and I can get to my homepage. The second route  
does not work. I get errors like this: “no route found to match  
“/about” with {:method=\>:get}”

## So, I put the following into a before\_filter in application.rb:

## ActionController::Routes.reload!

## And now I get the following error page: (application trace)

LoadError in HomeController#index  
Expected /home/ebct/config/routes.rb to define Routes  
RAILS\_ROOT: /home/ebct/public\_html/…/config/…

Application Trace | Framework Trace | Full Trace  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active\_support/dependencies.rb:250:in  
`load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:453:in`const\_missing’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active\_support/dependencies.rb:465:in  
`const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:261:in`load\_missing\_constant’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active\_support/dependencies.rb:453:in  
`const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:261:in`load\_missing\_constant’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active\_support/dependencies.rb:453:in  
`const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:261:in`load\_missing\_constant’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active\_support/dependencies.rb:453:in  
`const_missing' #{RAILS_ROOT}/app/controllers/application.rb:32:in`config\_app’  
Request  
Parameters: None

Show session dump  
flash: !map:ActionController::Flash::FlashHash {}

## Response Headers: {“cookie”=\>[], “Cache-Control”=\>“no-cache”}

What could it mean by “Expected /home/ebct/config/routes.rb to define  
Routes”???

-Matt

---

<div class="post-metadata">

**Author:** ![willbailey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/e9c0ed/32.png) [@willbailey](https://www.ruby-forum.com/u/willbailey)\
**Post date:** [January 31, 2007, 3:09am UTC](https://www.ruby-forum.com/t/problem-w-routes-rb/82658/4 "2007-01-31T03:09:19Z")

</div>

My problem is identical, but occurs only when I graft my rails app  
onto an existing web site with  
a symlink. If I set the rails app as the document root it work  
fine.

I have switched back to rails 1.1.6 and im working again. Im going to  
wait for rails 1.2.2

---

<div class="post-metadata">

**Author:** ![willbailey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/e9c0ed/32.png) [@willbailey](https://www.ruby-forum.com/u/willbailey)\
**Post date:** [January 22, 2007, 6:21am UTC](https://www.ruby-forum.com/t/problem-w-routes-rb/82658/5 "2007-01-22T06:21:57Z")

</div>

Aha!

I upgraded RubyGems to 0.9.1 and everything works again! =)

-Matt

---

<div class="post-metadata">

**Author:** ![willbailey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/e9c0ed/32.png) [@willbailey](https://www.ruby-forum.com/u/willbailey)\
**Post date:** [January 31, 2007, 11:44pm UTC](https://www.ruby-forum.com/t/problem-w-routes-rb/82658/6 "2007-01-31T23:44:16Z")

</div>

How did you switch back to 1.1.6 from 1.2.2

Thanks

On Jan 30, 9:08 pm, “removed\_email\_address@domain.invalid”

---

<div class="post-metadata">

**Author:** ![willbailey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/e9c0ed/32.png) [@willbailey](https://www.ruby-forum.com/u/willbailey)\
**Post date:** [February 2, 2007, 7:19am UTC](https://www.ruby-forum.com/t/problem-w-routes-rb/82658/7 "2007-02-02T07:19:29Z")

</div>

I had the same problem and was able to work around it by hardcoding the  
RAILS\_ROOT in environment.rb

[http://dev.rubyonrails.org/ticket/6755](http://dev.rubyonrails.org/ticket/6755) has more info
