Rails console is broken
Loading the Rails console throws the following error:
$ sudo gitlab-rails console
DEPRECATION WARNING: Support for `config.active_support.cache_format_version = 6.1` has been deprecated and will be removed in Rails 7.2.
Check the Rails upgrade guide at https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#new-activesupport-cache-serialization-format
for more information on how to upgrade.
(called from initialize at /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/patch/redis_cache_store.rb:16)
--------------------------------------------------------------------------------
Ruby: ruby 3.2.5 (2024-07-26 revision 31d0f1a2e7) [x86_64-linux]
GitLab: 18.0.0-pre (c680c57e823) EE
GitLab Shell: 14.41.0
PostgreSQL: 16.6
------------------------------------------------------------[ booted in 96.44s ]
Loading production environment (Rails 7.1.5.1)
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/irb.rb:13:in `init_config': undefined local variable or method `init_autocomplete' for IRB:Module (NameError)
init_autocomplete
^^^^^^^^^^^^^^^^^
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/irb-1.15.2/lib/irb/init.rb:51:in `setup'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/irb-1.15.2/lib/irb.rb:47:in `start'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.1.5.1/lib/rails/commands/console/console_command.rb:78:in `start'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.1.5.1/lib/rails/commands/console/console_command.rb:16:in `start'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.1.5.1/lib/rails/commands/console/console_command.rb:106:in `perform'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/thor-1.3.1/lib/thor/command.rb:28:in `run'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/thor-1.3.1/lib/thor/invocation.rb:127:in `invoke_command'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.1.5.1/lib/rails/command/base.rb:178:in `invoke_command'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/thor-1.3.1/lib/thor.rb:527:in `dispatch'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.1.5.1/lib/rails/command/base.rb:73:in `perform'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.1.5.1/lib/rails/command.rb:71:in `block in invoke'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.1.5.1/lib/rails/command.rb:149:in `with_argv'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.1.5.1/lib/rails/command.rb:69:in `invoke'
from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.1.5.1/lib/rails/commands.rb:18:in `<top (required)>'
from <internal:/opt/gitlab/embedded/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/opt/gitlab/embedded/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from bin/rails:4:in `<main>'