Skip to content
  • @mkozono Could you please guide to resolve below error?

    irb(main):003:0> service = Geo::ChecksumRecalculationService.new(::Geo::PackageFileReplicator, seconda
    ry_geo_node: secondary_node)
    (irb):3:in `<main>': uninitialized constant Geo::ChecksumRecalculationService (NameError)
            from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.0.8.6/lib/rails/commands/console/console_command.rb:74:in `start'
            from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.0.8.6/lib/rails/commands/console/console_command.rb:19:in `start'
            from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.0.8.6/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/thor-1.3.1/lib/thor.rb:527:in `dispatch'
            from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.0.8.6/lib/rails/command/base.rb:87:in `perform'
            from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.0.8.6/lib/rails/command.rb:48:in `invoke'
            from /opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/railties-7.0.8.6/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>'
    Edited by SaravanakumarSakthivel
  • Could you please add the step to deploy the service? Where we should place recalculate_stale_checksums.rb?

  • Developer

    I realise what I had overlooked here - you can either paste the contents of recalculate_stale_checksums.rb before running the snippet code or even better, put it on disk, and call it with gitlab-rails runner. It will need to be readable by the git user, then:

    gitlab-rails c
    [...]
    load '/var/opt/gitlab/recalculate_stale_checksums.rb'
    Edited by Tony Marsh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment