Development database fixtures failing due to missing RSpec dependency
Summary
When running gdk install
as of (at least) GDK 3c9832c5ca, you can encounter this NoMethodError: undefined method
configure' for RSpec:Module`:
== Seed from /Users/djensen/Code/gitlab-development-kit/gitlab/db/fixtures/development/01_admin.rb
**************************************************
⛔️ WARNING: Sidekiq testing API enabled, but this is not the test environment. Your jobs will not go to Redis.
**************************************************
rake aborted!
NoMethodError: undefined method `configure' for RSpec:Module
/Users/djensen/Code/gitlab-development-kit/gitlab/spec/support/sidekiq.rb:29:in `<main>'
(eval):1:in `block (2 levels) in run_file'
/Users/djensen/Code/gitlab-development-kit/gitlab/lib/tasks/gitlab/setup.rake:34:in `setup_db'
/Users/djensen/Code/gitlab-development-kit/gitlab/lib/tasks/gitlab/setup.rake:5:in `block (2 levels) in <main>'
/Users/djensen/Code/gitlab-development-kit/gitlab/lib/tasks/dev.rake:7:in `block (2 levels) in <main>'
/Users/djensen/.rbenv/versions/2.6.3/bin/bundle:23:in `load'
/Users/djensen/.rbenv/versions/2.6.3/bin/bundle:23:in `<main>'
Tasks: TOP => db:seed_fu
(See full trace by running task with --trace)
support/bootstrap-rails failed
make: *** [postgresql/data] Error 1
Specifically, the problem is that many of the fixture files require spec/support/sidekiq.rb without first loading rspec/core
(where the configure
method is defined).
Steps to reproduce
Follow the Set up GDK instructions
What is the current bug behavior?
There is a NoMethodError when trying to run the db/fixtures/development files (at least in the GDK context).
What is the expected correct behavior?
The db/fixtures/development files can be run successfully.
Possible fixes
I think this can be fixed by either:
- reverting the recent change that created this bug (what was this?)
- or adding
require 'rspec/rails'
as the first line of spec/support/sidekiq.rb - or adding
require 'rspec/rails'
as the first line in the 16 files in db/fixtures/development thatrequire './spec/support/sidekiq'
Note require 'rspec/core'
results in "LoadError: cannot load such file -- rspec-core".
Edited by Dan Jensen