Search code examples
ruby-on-railsdevisejwtruby-on-rails-5

why i have an error when i generate jwt_blacklist model for rails 5?


I want to create an API rails application and adding authentication using DEVISE and JWT

I'm using : Windows 8.1 ruby 2.6.5p114 rails 5.2.4 devise-jwt (0.5.9) devise 4.7.1

When I want to create the model for JWT using this command

rails g model Jwt_blacklist jti:string:index exp:datetime

I have this error

  C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/warden-jwt_auth-0.3.6/lib/warden/jwt_auth.rb:89:in 
  `upcase_first_items': undefined method `map' for nil:NilClass (NoMethodError)

any solutions?


Solution

  • As someone else pointed out in another answer the problem is due to the new 0.11 version of dry-configurable, which is a dependency of devise-jwt.

    The solution is to add gem 'dry-configurable', '0.9.0' to your Gemfile and run again bundle update.