Update Rails to 4.1.latest
#7230 updates Rails to 4.1.5, but this should be updated again to 4.1.latest (currently 4.1.14), either pinned specifically or
There are changes to how test DB schemas are maintained between 4.1.5 and 4.1.14 (db:test:prepare is no longer deprecated), so this will need revising.
1.11.0 blocker, as 4.1.5 contains known security vulnerabilities.
fixes #12873 - update Rails to 184.108.40.206
maintain_test_schema! changed behaviour and now launches db:test:prepare
in the background, causing the environment to be loaded again. A check
in the initializer prevents this from happening recursively.
Ideally this call would be removed from the initializers and leave it to
rails/test_help, but requires one of three solutions:
1. validates_lengths_from_database and validate_inclusion_in_families
must be lazier, not checking the database during class
initialisation. The Rails environment and even some models could be
loaded but only start working after the DB is available, instead of
not setting up their validators.
2. Remove all model class loading from the environment setup. The
apipie initializer can be made lazier, the HostObserver can be
refactored, but many plugins still cause models to be loaded through
3. Ignore the problem, always set up the test DB schema externally
before using rake tasks, without relying on rails/test_help and
Any of these would allow for the Rails environment to be loaded either
before the test DB schema is maintained without an effect on behaviour.
Test failures in the pagelets tests are fixed, which previously
referenced partials stored outside of the known view paths. These are
blocked by Rails in the Action View CVE-2016-0752 fix, so instead the
static fixtures directory is added to the view search paths.