I’ve been experimenting with different dev environments, and am trying to get the development docker image working. While everything seems to work fairly well, I can’t get the rspec tests to pass. Repro steps:
git clone -b tests-passed https://github.com/discourse/discourse discourse
cd discourse
./bin/docker/boot_dev --init
./bin/docker/bundle exec rspec
3 tests fail every time:
Failures:
1) i18n integrity checks has an i18n key for each Site Setting
Failure/Error: value = send(s)
NoMethodError:
undefined method `last_vacuum' for #<Class:0x00562777625f30>
# ./lib/site_setting_extension.rb:180:in `block in all_settings'
# ./lib/site_setting_extension.rb:179:in `each'
# ./lib/site_setting_extension.rb:179:in `map'
# ./lib/site_setting_extension.rb:179:in `all_settings'
# ./spec/integrity/i18n_spec.rb:49:in `block (2 levels) in <top (required)>'
2) Admin::SiteSettingsController while logged in as an admin index returns JSON
Failure/Error: value = send(s)
NoMethodError:
undefined method `last_vacuum' for #<Class:0x00562777625f30>
# ./lib/site_setting_extension.rb:180:in `block in all_settings'
# ./lib/site_setting_extension.rb:179:in `each'
# ./lib/site_setting_extension.rb:179:in `map'
# ./lib/site_setting_extension.rb:179:in `all_settings'
# ./app/controllers/admin/site_settings_controller.rb:4:in `index'
# ./spec/controllers/admin/site_settings_controller_spec.rb:21:in `block (4 levels) in <top (required)>'
3) Admin::SiteSettingsController while logged in as an admin index returns success
Failure/Error: value = send(s)
NoMethodError:
undefined method `last_vacuum' for #<Class:0x00562777625f30>
# ./lib/site_setting_extension.rb:180:in `block in all_settings'
# ./lib/site_setting_extension.rb:179:in `each'
# ./lib/site_setting_extension.rb:179:in `map'
# ./lib/site_setting_extension.rb:179:in `all_settings'
# ./app/controllers/admin/site_settings_controller.rb:4:in `index'
# ./spec/controllers/admin/site_settings_controller_spec.rb:16:in `block (4 levels) in <top (required)>'
I’ve replicated this exact process on macOS and on Ubuntu.
Installing all the dependencies and running natively works on both macOS and Ubuntu, but I’d far rather use Docker if possible.
Am I missing a step somewhere, or is there something wrong with the docker scripts?