Rails error: uninitialized constant ApplicationController :: Authentication

Fulfilling my path through the clarkware iphone-rails-tutorial and trying to create and run the final rails code that is included, but I get this error in the server console when I try to access localhost: 3000 /

ActionController::RoutingError (uninitialized constant ApplicationController::Authentication):
  app/controllers/application_controller.rb:5:in `<class:ApplicationController>'
  app/controllers/application_controller.rb:1:in `<top (required)>'
  app/controllers/goals_controller.rb:2:in `<top (required)>'

Rendered /Users/joeuser/.rvm/gems/ruby-1.9.2-p0@rails3/gems/actionpack-3.0.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.6ms)

The previous included “breakpoints” of the sample code performed just fine. Only the last one gives an error ...

What does it mean? My uninitiated hunch is that there is no lack of authentication, but I cannot figure out which one. there is nothing specified in the Gemfile, except the default rails and sqlite3-ruby ... and the documentation does not mention any authentication structures.

Does anyone understand this mistake or are familiar enough with the tutorial to find out what is going on?

I can't seem to find a forum related to this tutorial, so I thought I wanted to find out here. Please direct me to an active forum if you know it.

+3
source share
1 answer

I saw how this happened when I created an application with one of the rails bates, in my case beta3, and then upgraded it to version. To make it work, you can try adding:

config.autoload_paths += %W(#{config.root}/lib)

to your config / application.rb.

Ymmv

+10
source

Source: https://habr.com/ru/post/1765162/


All Articles