[Solved] Blogger App - I5 Sorcery Authentication Migration Issue


#1

Hello,

Wondering if anyone ran into the issue i am facing with Sorcery in the blogger project.
Working through I5 Authentication section of the Jumpstart Lab tutorial.

Rails Version: 5.2.1
Ruby Version:2.5.3p105

Migration file is not being created when i enter:

$ rails generate sorcery:install --model=Author

Running via Spring preloader in process 11623
      create  config/initializers/sorcery.rb
    generate  model Author --skip-migration
Running via Spring preloader in process 11650
      invoke  active_record
      create    app/models/author.rb
      invoke    test_unit
      create      test/models/author_test.rb
      create      test/fixtures/authors.yml
      insert  app/models/author.rb
      insert  app/models/author.rb 

Expected output:

create  config/initializers/sorcery.rb
generate  model Author --skip-migration
invoke  active_record
create    app/models/author.rb
invoke    test_unit
create      test/unit/author_test.rb
create      test/fixtures/authors.yml
insert  app/models/author.rb
create  db/migrate/20120210184116_sorcery_core.rb

#2

In case some one else runs into this issue.

issue was logged in the sorcery repo.

Steps to resolve:
find gem installation folder:
gem which 'sorcery'
change directory to that folder
cd generators/
cd sorcery
edit install_generator.rb
comment # line 64
#return unless defined?(Sorcery::Generators::InstallGenerator::ActiveRecord)
save

re-run the sorcery:install command:
rails generate sorcery:install --model=Author