{"record":{"id":"c003859cfc1c5fb8","repo":"instructure/canvas-lms","slug":"bundler-multilock-plugin-is-not-installed","errorCode":null,"errorMessage":"bundler-multilock plugin is not installed","messagePattern":"bundler-multilock plugin is not installed","errorType":"exception","errorClass":"Bundler::GemNotFound","httpStatus":null,"severity":"critical","filePath":"gems/gemfile_prefix.rb","lineNumber":26,"sourceCode":"# Canvas is free software: you can redistribute it and/or modify it under\n# the terms of the GNU Affero General Public License as published by the Free\n# Software Foundation, version 3 of the License.\n#\n# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY\n# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n# details.\n#\n# You should have received a copy of the GNU Affero General Public License along\n# with this program. If not, see <http://www.gnu.org/licenses/>.\n\n# don't define additional lockfiles unless we're being called as part of a vendored gem\n# (i.e. we're not being called from the main Gemfile)\nPathname.include(Comparable)\nreturn unless Bundler.default_gemfile.dirname > Pathname.new(__dir__)\n\nplugin \"bundler-multilock\", \"1.2.3\", path: File.expand_path(\"../vendor/gems/bundler-multilock\", __dir__)\nraise GemNotFound, \"bundler-multilock plugin is not installed\" if !is_a?(Bundler::Plugin::DSL) && !Plugin.installed?(\"bundler-multilock\")\nreturn unless Plugin.installed?(\"bundler-multilock\")\n\nPlugin.send(:load_plugin, \"bundler-multilock\")\n\nrequire_relative \"../config/canvas_rails_switcher\" unless defined?($canvas_rails)\n\ncanvas_default_lockfile = \"../../Gemfile.lock\"\n\ncurrent_rails = $canvas_rails\nSUPPORTED_RAILS_VERSIONS.each do |rails_version|\n  lockfile = \"rails#{rails_version.delete(\".\")}\"\n  parent = if rails_version == SUPPORTED_RAILS_VERSIONS.first\n             lockfile = nil\n             canvas_default_lockfile\n           else\n             \"../../Gemfile.#{lockfile}.lock\"\n           end\n","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/instructure/canvas-lms/blob/1c9f0bb8013ed69c4f2efe11fd483025469b7e6c/gems/gemfile_prefix.rb#L8-L44","documentation":"gems/gemfile_prefix.rb wires in Canvas's vendored bundler-multilock plugin to manage multiple Gemfile.lock variants. It declares the plugin dependency itself and then immediately verifies it is actually installed; if Bundler loads this prefix outside plugin evaluation (so `is_a?(Bundler::Plugin::DSL)` is false) and the plugin is not installed, it raises GemNotFound. This means the vendored gem directory is missing or the plugin was never installed during setup.","triggerScenarios":"Running bundler (bundle install, bundle exec, script/anything loading the Gemfile) from the main Gemfile when vendor/gems/bundler-multilock has not been installed/registered, e.g. a fresh checkout with an incomplete setup or deleted vendor directory.","commonSituations":"Fresh clone without running the full bootstrap; CI image stripping vendor/gems; upgrading Bundler and plugin state being lost; running bundler from a sub-gem's gemfile with a broken parent resolution.","solutions":["Re-run Canvas bootstrap / `bundle install` from the repo root so the vendored plugin installs","Verify gems/vendor/gems/bundler-multilock exists and is intact (restore if deleted)","Clear Bundler plugin cache and reinstall: `bundler plugin uninstall bundler-multilock` then bundle again","Confirm you are using the Bundler version Canvas expects (see Gemfile / docs)"],"exampleFix":"// shell\n# before: bundle exec rake  => GemNotFound: bundler-multilock plugin is not installed\n# after:\nrm -rf ~/.local/share/bundler-plugin  # or bundler plugin uninstall bundler-multilock\nbundle install\nbundle exec rake","handlingStrategy":"validation","validationCode":"require 'bundler'\nabort 'bundler-multilock missing; run bundle install' unless Bundler::Plugin.installed?('bundler-multilock')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run full bootstrap on fresh clones and CI","Keep gems/vendor/gems/bundler-multilock intact","Pin the expected Bundler version"],"tags":["bundler","ruby","setup","missing-dependency"],"backgroundTag":"missing-dependency","analyzedSha":"1c9f0bb8013ed69c4f2efe11fd483025469b7e6c","analyzedAt":"2026-09-15T20:33:18.891Z","contentChangedAt":"2026-09-15T20:33:18.891Z","schemaVersion":2},"datasetVersion":"2026-09-23T02:17:17.105Z"}