No such file or directory when running gitlab check

I inherited a Gitlab server that was installed from source. I’d like to change it to a server that has Gitlab installed via a package manager but that’s for a different day.

I upgraded from 8.9.6 to 8.16.0. Things seem to be working but when I run “sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production”, I see this message at the bottom:

Database config exists? … yes
All migrations up? … rake aborted!
Errno::ENOENT: No such file or directory - bundle
/home/git/gitlab/lib/gitlab/popen.rb:23:in popen' /home/git/gitlab/lib/tasks/gitlab/check.rake:197:in check_migrations_are_up’
/home/git/gitlab/lib/tasks/gitlab/check.rake:19:in `block (3 levels) in <top (required)>’
Tasks: TOP => gitlab:check => gitlab:app:check
(See full trace by running task with --trace)

I’m not sure why it’s reporting this.