# I'm having trouble with Routes

**URL:** <https://www.ruby-forum.com/t/im-having-trouble-with-routes/182931>\
**Category:** Rails\
**Created:** [February 4, 2010, 10:40pm UTC](https://www.ruby-forum.com/t/im-having-trouble-with-routes/182931 "2010-02-04T22:40:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [February 4, 2010, 10:40pm UTC](https://www.ruby-forum.com/t/im-having-trouble-with-routes/182931/1 "2010-02-04T22:40:28Z")

</div>

I don’t understand why I’m getting a routing error.

So … in an attempt to fix it I did

* * *

## f:\Ralph-Rails-Apps\WebOfTrust\>ruby script/console Loading development environment (Rails 2.3.5) f:/Ralph-Rails-Apps/WebOfTrust/config/environment.rb:19:NameError: uninitialized constant I18n F:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/backtr ace\_cleaner.rb:2:NameError: uninitialized constant ActiveSupport::BacktraceClean er F:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/console\_with \_helpers.rb:5:NameError: uninitialized constant ApplicationController

So, I think I have stuff that is uninitialized … but I’m not sure  
because when I run Webrick I don’t see these errors (warnings?).

Do I need to provide more info for you wonderful guys to help me? More  
info, below.

* * *

My transaction log looks like this:

# Logfile created on Thu Feb 04 14:20:44 -0700 2010

Processing HomeController#index (for 127.0.0.1 at 2010-02-04 14:20:51)  
[GET]  
Parameters: {“action”=\>“index”, “controller”=\>“home”}  
Rendering template within layouts/application  
Rendering home/index  
Completed in 89ms (View: 78, DB: 0) | 200 OK [[http://localhost/](http://localhost/)]

Processing ApplicationController#index (for 127.0.0.1 at 2010-02-04  
14:20:52) [GET]

ActionController::RoutingError (No route matches “/undefined” with  
{:method=\>:get}):  
warden (0.8.1) lib/warden/manager.rb:34:in `call' warden (0.8.1) lib/warden/manager.rb:33:in `catch’  
warden (0.8.1) lib/warden/manager.rb:33:in `call' F:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/validates_captcha-0.9.6/rails/init.rb:22:in `call’  
F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in  
`service' F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run’  
F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/webrick/server.rb:173:in  
`start_thread' F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start’  
F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/webrick/server.rb:162:in  
`start_thread' F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start’  
F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/webrick/server.rb:92:in  
`each' F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start’  
F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/webrick/server.rb:23:in  
`start' F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start’

Rendering rescues/layout (not\_found)

* * *

## routes.rb

ActionController::Routing::Routes.draw do |map|  
map.devise\_for :users  
map.devise\_for :admin, :as =\> ‘admin\_area’  
map.devise\_for :accounts, :path\_names =\> {  
:sign\_in =\> ‘login’, :sign\_out =\> ‘logout’, :password =\> ‘secret’,  
:confirmation =\> ‘verification’  
}, :scope =\> ‘manager’, :path\_prefix =\> ‘/:locale’, :requirements =\> {  
:extra =\> ‘value’ }

map.resources :users, :only =\> [:index], :member =\> { :expire =\> :get  
}  
map.resources :admins, :only =\> :index  
map.root :controller =\> :home

map.connect ‘/admin\_area/password/new’, :controller =\> “passwords”,  
:action =\> “new”  
map.admin\_root ‘/admin\_area/home’, :controller =\> “admins”, :action =\>  
“index”

map.connect ‘/sign\_in’, :controller =\> “sessions”, :action =\> “new”  
map.connect ‘:controller/:action/:id’  
map.connect ‘:controller/:action/:id.:format’  
end

class HomeController \< ApplicationController  
def index  
end  
end

# Filters added to this controller apply to all controllers in the

application.

# Likewise, all the methods added will be available for all controllers.

class ApplicationController \< ActionController::Base  
helper :all # include all helpers, all the time  
protect\_from\_forgery # See ActionController::RequestForgeryProtection  
for details

# Scrub sensitive parameters from your log

filter\_parameter\_logging :password, :password\_confirmation  
end
