I just ran the generator for Restful Authentication, and when I visit
localhost:3000/users/new, I get the error: uninitialized constant
User::Authentication
The error comes from these lines in my user.rb model:
class User < ActiveRecord::Base
include Authentication
include Authentication::ByPassword
include Authentication::ByCookieToken
Did I miss something in the installation process? This is my first time
using a generator, so I'm probably just doing something dumb
I have already done this on my local machine. I am talking
specifically getting this error on my production server. Locally
everything works dandy! Same rails versions and everything.
I had this problem and after much work discovered that the session on
my browser was confusing the server somehow. My deleting the cookie I
was able to access all the pages correctly without errors.
Boys,
Almost all the time this problem arises because , scope of the
Authentication module falls under different context , Its always
better to use fully qualified module names,
class User < ActiveRecord::Base
include ::Authentication
include ::Authentication::ByPassword
include ::Authentication::ByCookieToken
include ::Authorization::AasmRoles
Boys,
Almost all the time this problem arises because , scope of the
Authentication module falls under different context , Its always
better to use fully qualified module names,
class User < ActiveRecord::Base
include ::Authentication
include ::Authentication::ByPassword
include ::Authentication::ByCookieToken
include ::Authorization::AasmRoles
I had to comment out "config.active_record.observers = :user_observer".
It may not be the perfect solution, but it saved the day. However, I
don't know what tomorrow brings
I had to comment out "config.active_record.observers = :user_observer".
It may not be the perfect solution, but it saved the day. However, I
don't know what tomorrow brings
On the other hand, you should also check if
"vendor/plugins/restful_authentication" is checked into your repository
:), and it is deployed to the server successfully.
I just ran the generator for Restful Authentication, and when I visit
localhost:3000/users/new, I get the error: uninitialized constant
User::Authentication
Since you just put restful_auth into your project, do yourself a favor
and take it right back out again. It's garbage. It relies on
unmaintainable generated code. It's easy to set up, but a nightmare to
do anything with. I speak from experience.
I just ran the generator for Restful Authentication, and when I visit
localhost:3000/users/new, I get the error: uninitialized constant
User::Authentication
The error comes from these lines in my user.rb model:
class User < ActiveRecord::Base
include Authentication
include Authentication::ByPassword
include Authentication::ByCookieToken
Did I miss something in the installation process? This is my first time
using a generator, so I'm probably just doing something dumb
I just had the same problem today, after I cloned a skeleton app i was
working on so that I could expand it as a different app, git clone
failed to copy anything form restful_authentication folder! weird!