Skip to content

Errors when using minitest instead of rspec in my project #117

@inspire22

Description

@inspire22

I'm a minitest guy, so the generator threw some errors.

 bin/rails generate devise:webauthn:install
Running via Spring preloader in process 1862442
Installing DeviseWebauthn configuration...
      create  config/initializers/webauthn.rb
Created initializer: config/initializers/webauthn.rb
      create  app/models/webauthn_credential.rb
      invoke  rspec

An error occurred while loading spec_helper.
Failure/Error: kernel_class.send(:no_warning_require, name)

LoadError:
  cannot load such file -- spec_helper
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/zeitwerk-2.7.4/lib/zeitwerk/core_ext/kernel.rb:34:in `require'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/rspec-rails-8.0.2/lib/generators/rspec.rb:30:in `configuration'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/rspec-rails-8.0.2/lib/generators/rspec.rb:36:in `target_path'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/command.rb:28:in `run'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:127:in `invoke_command'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:134:in `block in invoke_all'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:134:in `each'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:134:in `map'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:134:in `invoke_all'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/group.rb:243:in `dispatch'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:116:in `invoke'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/group.rb:288:in `block in _invoke_for_class_method'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/shell.rb:68:in `with_padding'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/group.rb:277:in `_invoke_for_class_method'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/group.rb:134:in `_invoke_from_option_test_framework'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/command.rb:28:in `run'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:127:in `invoke_command'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:134:in `block in invoke_all'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:134:in `each'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:134:in `map'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:134:in `invoke_all'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/group.rb:243:in `dispatch'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:116:in `invoke'
# /home/kevo/.rvm/gems/ruby-3.3.6/gems/devise-webauthn-0.3.0/lib/generators/devise/webauthn/webauthn_credential_model/webauthn_credential_model_generator.rb:24:in `generate_model'

Then another error at the end after the "Next Steps:"

/home/kevo/.rvm/gems/ruby-3.3.6/gems/thor-1.5.0/lib/thor/invocation.rb:112:in `invoke': Missing Thor class for invoke devise:webauthn:javascript (RuntimeError)
        from /home/kevo/.rvm/gems/ruby-3.3.6/gems/devise-webauthn-0.3.0/lib/generators/devise/webauthn/install/install_generator.rb:30:in `generate_javascript_configuration'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions