0
votes

My site app runs when I push to heroku, but when i run localhost:3000, i get a "routing error" "no routes match "/". I have been searching all over the place for a answer and cant find out what to do. My routes.rb is listed below. Thanks.

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

I now realize the problem is with devise. when run it now i get "no devise_for" method. here is my full trace.

config/routes.rb:2

actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:233:in instance_exec' actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:233:indraw' 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:inload' activesupport (3.0.3) lib/active_support/dependencies.rb:225:in load_dependency' activesupport (3.0.3) lib/active_support/dependencies.rb:596:innew_constants_in' activesupport (3.0.3) lib/active_support/dependencies.rb:225:in load_dependency' activesupport (3.0.3) lib/active_support/dependencies.rb:235:inload' railties (3.0.3) lib/rails/application.rb:127:in reload_routes!' railties (3.0.3) lib/rails/application.rb:127:ineach' railties (3.0.3) lib/rails/application.rb:127:in reload_routes!' railties (3.0.3) lib/rails/application.rb:120:inroutes_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:inexecute_if_updated' railties (3.0.3) lib/rails/application/finisher.rb:51:in _callback_before_5' activesupport (3.0.3) lib/active_support/callbacks.rb:419:in_run_prepare_callbacks' actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:45:in call' activesupport (3.0.3) lib/active_support/callbacks.rb:415:in_run_call_callbacks' actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:44:in call' rack (1.2.1) lib/rack/sendfile.rb:107:incall' actionpack (3.0.3) lib/action_dispatch/middleware/remote_ip.rb:48:in call' actionpack (3.0.3) lib/action_dispatch/middleware/show_exceptions.rb:46:incall' railties (3.0.3) lib/rails/rack/logger.rb:13:in call' rack (1.2.1) lib/rack/runtime.rb:17:incall' activesupport (3.0.3) lib/active_support/cache/strategy/local_cache.rb:72:in call' rack (1.2.1) lib/rack/lock.rb:11:incall' rack (1.2.1) lib/rack/lock.rb:11:in synchronize' rack (1.2.1) lib/rack/lock.rb:11:incall' actionpack (3.0.3) lib/action_dispatch/middleware/static.rb:30:in call' railties (3.0.3) lib/rails/application.rb:168:incall' railties (3.0.3) lib/rails/application.rb:77:in send' railties (3.0.3) lib/rails/application.rb:77:inmethod_missing' rack (1.2.1) lib/rack/content_length.rb:13:in call' rack (1.2.1) lib/rack/handler/webrick.rb:52:inservice' /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:inrun' /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:instart' /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:instart' /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:instart' /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:instart' rack (1.2.1) lib/rack/handler/webrick.rb:13:in run' rack (1.2.1) lib/rack/server.rb:213:instart' railties (3.0.3) lib/rails/commands/server.rb:65:in start' railties (3.0.3) lib/rails/commands.rb:30 railties (3.0.3) lib/rails/commands.rb:27:intap' railties (3.0.3) lib/rails/commands.rb:27 script/rails:6:in `require' script/rails:6

enter code here
1
What platform/framework is this?Daniel A. White

1 Answers

0
votes

Have you specified Devise in your Gemfile? If you haven't, that would cause the "undefined method devise_for" error.