Skip to content

(1.2) Flipper::TestHelp initializer raises an error if enabled #818

@boardfish

Description

@boardfish

This is with Ruby 3.3, Rails 7.1.2. The solution right now is to set config.flipper.test_help = false in config/application.rb so that the affected code isn't run.

This might be fixed (in a way) on main since the conditional preventing this line from being run has been changed, but in 1.2.0 it would allow this.

Run bin/rails db:create db:schema:load
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
bin/rails aborted!
NoMethodError: undefined method `configure' for module RSpec (NoMethodError)

  RSpec.configure do |config|
       ^^^^^^^^^^
my_rails_app/vendor/bundle/ruby/3.3.0/gems/flipper-1.2.0/lib/flipper/test_help.rb:20:in `<main>'
my_rails_app/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.17.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
my_rails_app/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
my_rails_app/vendor/bundle/ruby/3.3.0/gems/flipper-1.2.0/lib/flipper/engine.rb:91:in `block in <class:Engine>'
my_rails_app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.2/lib/rails/initializable.rb:32:in `instance_exec'
my_rails_app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.2/lib/rails/initializable.rb:32:in `run'
my_rails_app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.2/lib/rails/initializable.rb:61:in `block in run_initializers'
my_rails_app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.2/lib/rails/initializable.rb:60:in `run_initializers'
my_rails_app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.2/lib/rails/application.rb:423:in `initialize!'
my_rails_app/config/environment.rb:5:in `<main>'

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