我的網站應用程序運行時,我推到heroku,但是當我運行本地主機:3000,我得到一個「路由錯誤」「沒有路由匹配」/「。我一直在搜索遍地一個答案,不能找出該怎麼做。我的routes.rb下面列出。謝謝。動作控制器:異常路由錯誤
Kliqq::Application.routes.draw do
get "home/index"
get "welcome/index"
resources :groups
devise_for :admins
devise_for :users
# The priority is based upon order of creation:
# first created -> highest priority.
# Sample of regular route:
# match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# This route can be invoked with purchase_url(:id => product.id)
# Sample resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Sample resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Sample resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Sample resource route with more complex sub-resources
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', :on => :collection
# end
# end
# Sample resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
root :to => "home#index"
# See how all your routes lay out with "rake routes"
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
# match ':controller(/:action(/:id(.:format)))'
end
我現在認識到這個問題是色器件。當現在運行它,我得到「沒有devise_for」的方法。 這裏是我的全部跟蹤
config/routes.rb:2
ActionPack的(3.0.3)的lib/action_dispatch /路由/ route_set.rb:233:instance_exec' actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:233:in
draw' config/routes.rb:1 activesupport(3.0.3)lib/active_support/dependencies.rb:235:in load' activesupport (3.0.3) lib/active_support/dependencies.rb:235:in
load' activesupport(3.0.3)lib/active_support/dependencies.rb:225:in load_dependency' activesupport (3.0.3) lib/active_support/dependencies.rb:596:in
new_constants_in' 的ActiveSupport(3.0.3)LIB/active_support/dependencies.rb:225:在load_dependency' activesupport (3.0.3) lib/active_support/dependencies.rb:235:in
負載 ' railties(3.0.3)LIB /導軌/ application.rb中:127:在reload_routes!' railties (3.0.3) lib/rails/application.rb:127:in
每個' railties(3.0。 3)lib/rails/application.rb:127:in reload_routes!' railties (3.0.3) lib/rails/application.rb:120:in
routes_reloader' activesupport(3.0.3)lib/active_support/file_update_checker.rb:32:in call' activesupport (3.0.3) lib/active_support/file_update_checker.rb:32:in
execute_if_updated' railties(3.0.3)lib/rails/application/finisher.rb:51:在_callback_before_5' activesupport (3.0.3) lib/active_support/callbacks.rb:419:in
個_run_prepare_callbacks' ActionPack的(3.0.3)LIB/action_dispatch /中間件/ callbacks.rb:45:在call' activesupport (3.0.3) lib/active_support/callbacks.rb:415:in
_run_call_callbacks' ActionPack的(3.0.3)LIB/action_dispatch /中間件/ callbacks.rb:44:在call' rack (1.2.1) lib/rack/sendfile.rb:107:in
呼叫」 (3.0.3)lib/action_dispatch/middleware/remote_ip.rb:48:在call' actionpack (3.0.3) lib/action_dispatch/middleware/show_exceptions.rb:46:in
調用' railties(3.0.3)lib/rails/rack/logger.rb:13:在call' rack (1.2.1) lib/rack/runtime.rb:17:in
調用' activesupport(3.0。 3)lib/active_support/cache/strategy/local_cache.rb:72:在call' rack (1.2.1) lib/rack/lock.rb:11:in
調用' rack(1.2.1)lib/rack/lock.rb:11:在synchronize' rack (1.2.1) lib/rack/lock.rb:11:in
調用' actionpack(3.0.3)lib/action_dispatch/middleware/static.rb:30:在call' railties (3.0.3) lib/rails/application.rb:168:in
調用' railties(3.0.3)lib/rails/app lication.rb:77:在send' railties (3.0.3) lib/rails/application.rb:77:in
method_missing' rack(1.2.1)lib/rack/content_length.rb:13:in call' rack (1.2.1) lib/rack/handler/webrick.rb:52:in
service' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib /ruby/1.8/webrick/httpserver.rb:104:in service' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in
運行' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in
start' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:95:in
start' /System/Library/Frameworks/Ruby.framework /Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in each' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in
start' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick /server.rb:23:in start' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:82:in
start' rack(1.2.1)lib/rack/handler/webrick.rb:13:在run' rack (1.2.1) lib/rack/server.rb:213:in
開始' railties(3.0.3)lib/rails/commands/server.rb:65:start' railties (3.0.3) lib/rails/commands.rb:30 railties (3.0.3) lib/rails/commands.rb:27:in
tap' railties(3.0 0.3)的lib /導軌/ commands.rb:27 腳本/導軌:6:'需要」 腳本/導軌:6
enter code here
這是什麼平臺/框架? – 2011-01-26 20:08:32
抱歉它的紅寶石在鐵軌上 – Yeddie 2011-01-26 22:35:36