{"record":{"id":"1901212d2b078c92","repo":"ruby/rubygems","slug":"source-plugins-need-to-override-the-install-method","errorCode":null,"errorMessage":"Source plugins need to override the install method.","messagePattern":"Source plugins need to override the install method\\.","errorType":"exception","errorClass":"MalformattedPlugin","httpStatus":null,"severity":"error","filePath":"lib/bundler/plugin/api/source.rb","lineNumber":91,"sourceCode":"        def options_to_lock\n          {}\n        end\n\n        # Download the gem specified by the spec at appropriate path.\n        #\n        # A source plugin can implement this method to split the download and the\n        # installation of a gem.\n        #\n        # @return [Boolean] Whether the download of the gem succeeded.\n        def download(spec, opts); end\n\n        # Install the gem specified by the spec at appropriate path.\n        # `install_path` provides a sufficient default, if the source can only\n        # satisfy one gem,  but is not binding.\n        #\n        # @return [String] post installation message (if any)\n        def install(spec, opts)\n          raise MalformattedPlugin, \"Source plugins need to override the install method.\"\n        end\n\n        # It builds extensions, generates bins and installs them for the spec\n        # provided.\n        #\n        # It depends on `spec.loaded_from` to get full_gem_path. The source\n        # plugins should set that.\n        #\n        # It should be called in `install` after the plugin is done placing the\n        # gem at correct install location.\n        #\n        # It also runs Gem hooks `pre_install`, `post_build` and `post_install`\n        #\n        # Note: Do not override if you don't know what you are doing.\n        def post_install(spec, disable_exts = false)\n          opts = { env_shebang: false, disable_extensions: disable_exts }\n          installer = Bundler::Source::Path::Installer.new(spec, opts)\n          installer.post_install","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/plugin/api/source.rb#L73-L109","documentation":"Error \"Source plugins need to override the install method.\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/plugin/api/source.rb:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}