I’m receiving an Action Controller exception on the ‘new’ path of http://bob.dev/assessments/new. I recently added Devise and Sextant to the project and the path that’s giving me issue was working previously.
The exception:
uninitialized constant ErrorsController (ActionController::RoutingError)
The routes:
Bob::Application.routes.draw do
devise_for :users
mount_sextant # Sextant gem #####################
match '*not_found' => 'errors#handle404' # visit http://bob.dev/rails/routes
match "*path" => 'errors#handle404' ###################################
# resources :users # Authentication from scratch #####
# resources :sessions ###################################
root :to => "assessments#index"
resources :assessments
end
and finally, the output from http://bob.dev/rails/routes via Sextant:
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
user_confirmation POST /users/confirmation(.:format) devise/confirmations#create
new_user_confirmation GET /users/confirmation/new(.:format) devise/confirmations#new
GET /users/confirmation(.:format) devise/confirmations#show
rails_routes GET /rails/routes(.:format) rails/routes#index
rails_route GET /rails/routes/:id(.:format) rails/routes#show
/*not_found(.:format) errors#handle404
/*path(.:format) errors#handle404
root / assessments#index
assessments GET /assessments(.:format) assessments#index
POST /assessments(.:format) assessments#create
new_assessment GET /assessments/new(.:format) assessments#new
edit_assessment GET /assessments/:id/edit(.:format) assessments#edit
assessment GET /assessments/:id(.:format) assessments#show
PUT /assessments/:id(.:format) assessments#update
DELETE /assessments/:id(.:format) assessments#destroy
GET /rails/routes(.:format) rails/routes#index
GET /rails/routes/:id(.:format) rails/routes#show
You can safely remove the lines
They’re not needed. That will solve your error. Though if you want to make a custom error handler for your app check out number 3 in Jose’s post http://blog.plataformatec.com.br/2012/01/my-five-favorite-hidden-features-in-rails-3-2/