I'm having trouble with Routes

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/]

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:incatch’
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:incall’
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:inrun’
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:instart’
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:instart’
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:instart’
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:instart’

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs