1

New to ROR working through a tutorial attempting to generate a default policy file for my application with the pundit:install.

$ rails g pundit:install generates the following error:

.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise/models.rb:88:in `const_get': wrong constant name Admin? (NameError)

I also tried captilizing pundit with the following command: $ rails g Pundit:install , but it generates the same error:

mezzimench
  • 25
  • 5

1 Answers1

2

The given error message doesn't yet point to Pundit as being the problem: .rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise/models.rb:88: in `const_get': wrong constant name Admin? (NameError)

Is there a longer stack trace for the error message? If yes, please add it to the question.

Also search your app's files for Admin? (with a capital 'A'). See that Admin? is mentioned in the error message wrong constant name Admin?.

(At a guess, somewhere in the app, Admin? is written where it should not be. Perhaps it needs to be removed or replaced with small 'a': admin?. Or replaced with Admin without the question mark.)

Eliot Sykes
  • 9,616
  • 6
  • 50
  • 64