Update to 11.7 fails with NoMethodError: undefined method 'rails5?'
Summary
When updating an omnibus install of Gitlab EE from 11.6.5 to 11.7.0, I receive an error "NoMethodError: undefined method rails5?"
Steps to reproduce
rpm -Uvh gitlab-ee-11.7.0-ee.0.el7.x86_64.rpm
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version)
What is the current bug behavior?
Update fails with the following:
There was an error running gitlab-ctl reconfigure:
bash[migrate gitlab-rails database] (gitlab::database_migrations line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’ ---- Begin output of “bash” “/tmp/chef-script20190129-10660-14jru2e” ---- STDOUT: rake aborted! NoMethodError: undefined method rails5?' for Gitlab:Module /opt/gitlab/embedded/service/gitlab-rails/config/initializers/active_record_array_type_casting.rb:2:in<top (required)>’ /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:6:in <top (required)>' /opt/gitlab/embedded/bin/bundle:23:inload’ /opt/gitlab/embedded/bin/bundle:23:in `’ Tasks: TOP => gitlab:db:configure => environment (See full trace by running task with --trace) STDERR: ---- End output of “bash” “/tmp/chef-script20190129-10660-14jru2e” ---- Ran “bash” “/tmp/chef-script20190129-10660-14jru2e” returned 1
What is the expected correct behavior?
Update should succeed
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)
Output of checks
unfortunately, I cannot run any gitlab-rake commands, because I get the error:
rake aborted!
NoMethodError: undefined method rails5?' for Gitlab:Module /opt/gitlab/embedded/service/gitlab-rails/config/initializers/active_record_array_type_casting.rb:2:in <top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:6:in <top (required)>' /opt/gitlab/embedded/bin/bundle:23:in load'
/opt/gitlab/embedded/bin/bundle:23:in `'
Tasks: TOP => gitlab:env:info => gitlab_environment => environment
(See full trace by running task with --trace)
Results of GitLab environment info
Expand for output related to GitLab environment info
Cannot run gitlab-rake - see above
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)