Rake command can't be executed

Hello,

I have an issue with gitlab upgrade (downgrade). It seems that rake cannot be executed. I got the following error:

$ bundle exec rake gettext:compile RAILS_ENV=production
/home/git/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/lib/bundler/rubygems_integration.rb:200: warning: constant Gem::ConfigMap is deprecated
bundler: failed to load command: rake (/home/git/gitlab/vendor/bundle/ruby/2.6.0/bin/rake)
LoadError: cannot load such file -- /home/git/gitlab/vendor/bundle/ruby/2.6.0/specifications/exe/rake
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/bin/rake:23:in `load'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/bin/rake:23:in `<top (required)>'

Some info:

$ ruby -v                              
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]
$ gem -v
3.1.4

I am using gitlab version 11.7.12.

Heya,

You can try updating rake with the commands below.

sudo bundle update rake
sudo bundle install

Hmmm…

So I got this:

$ bundle update rake
/home/git/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/lib/bundler/rubygems_integration.rb:200: warning: constant Gem::ConfigMap is deprecated
Unable to find a spec satisfying rake (~> 12) in the set. Perhaps the lockfile is corrupted?

Some check:

$ grep -r 'rake ' Gemfile*
Gemfile.lock:      rake (~> 12)
Gemfile.lock:      rake (>= 10, < 13)
Gemfile.lock:      rake (>= 0.8.7)
Gemfile.lock:    rake (12.3.2)
Gemfile.lock:      rake (>= 0.9, < 13)
$ bundle -v
Bundler version 1.17.3

Problem solved.

Gitab version 11-7-stable is not suitable with ruby-2.6.6 so I downgrade to ruby version 2.5.3 and now everything is fine.