lazaronixon / authentication-zero

An authentication system generator for Rails applications.
MIT License
1.62k stars 53 forks source link

First time User -- trivial issues #95

Closed hasandiwan closed 11 months ago

hasandiwan commented 11 months ago

I'm trying to use your gem in a new rails application for authentication -- the "hype" won me over -- and I'm receiving this error when creating a user, via the web:

undefined method `generates_token_for'

I then looked through the rails issues, coming upon this, which has been merged.

I found a definition of this method in edge rails:

def generates_token_for(purpose, expires_in: nil, &block)

end

So, I copied this definition into my class and the error changed to

undefined method `normalizes'

... and I'm well out of my depth in both rails and my time today. So, I've posted here knowing I'm doing something stupid. So, sure, rip me a new one, if you wish.

However, it's ok, as it will save me deep dives into murkier corners of the framework where even Gollum doesn't dare tread.

lazaronixon commented 11 months ago

Hello, hey you seem to be using rails 6, you should use version 2... bundle add authentication-zero --version "~> 2"

hasandiwan commented 11 months ago

rails -v

Rails 7.0.8

Next possibility?

lazaronixon commented 11 months ago

The rails in your gemfile is version 7?

hasandiwan commented 11 months ago

$ grep '^ rails' Gemfile.lock

rails (~> 7.0.8)

lazaronixon commented 11 months ago

Oh, it should be rails 7.1

hasandiwan commented 11 months ago

Thank you very much!