I'm getting a Routing error when trying to access my page.
Routing Error
No route matches "/" with {:method=>:get}
The error log reads:
[4;36;1mSQL (0.1ms)[0m [0;1mSET NAMES 'utf8'[0m
[4;35;1mSQL (0.0ms)[0m [0mSET SQL_AUTO_IS_NULL=0[0m
Processing ApplicationController#index (for 68.116.193.166 at 2010-10-11 19:18:16) [GET]
ActionController::RoutingError (No route matches "/" with {:method=>:get}):
config/initializers/mongrel.rb:62:in `dispatch_cgi'
Rendering rescues/layout (not_found)
Usually when I see this I check that the route is defined in config/routes.rb, and they are. So I figured maybe I can access /new by typing it in which gave me the following error.
Routing Error
No route matches **"//new"** with {:method=>:get}
With the following in development.log
[4;36;1mSQL (0.1ms)[0m [0;1mSET NAMES 'utf8'[0m
[4;35;1mSQL (0.0ms)[0m [0mSET SQL_AUTO_IS_NULL=0[0m
Processing ApplicationController#index (for 68.116.193.166 at 2010-10-11 19:18:开发者_StackOverflow社区21) [GET]
ActionController::RoutingError (No route matches "//new" with {:method=>:get}):
config/initializers/mongrel.rb:62:in `dispatch_cgi'
Rendering rescues/layout (not_found)
My setup: Rails: 2.3.8 Ruby: 1.8.7 RubyGems: 1.3.7 Mongrel: 1.1.5
I find it odd that using the address /imgs/new returns the path "//new". I've been stressing over this for a few days and have gotten nowhere with finding answers. Hopefully someone knows how to fix this that can point out what I'm missing here. Thanks in Advance
Here is my config/routes.rb file
ActionController::Routing::Routes.draw do |map|
map.resources :vids
map.resources :users
map.resources :tasks
map.resources :quotes
map.resources :projects
map.resources :products
map.resources :permissions
map.resources :pages
map.resources :orders
map.resources :imgs
map.resources :documents
map.resources :contents
map.resources :contacts
map.resources :comments
map.resources :clients
map.resources :addresses
map.resources :users
map.login "login", :controller => "user_sessions", :action => "new"
map.logout "logout", :controller => "user_sessions", :action => "destroy"
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
end
It just dawned on me that I might be able to get to the models by making sure the port is included and sure enough www.swinkapps.com:12005/imgs gives me the proper response. Is there a way to override this so that www.swinkapps.com:12005 maps to www.swinkapps.com?
精彩评论