{"record":{"id":"9349fd68ebd1a23d","repo":"refinery/refinerycms","slug":"you-must-override-the-method-generator-command-i","errorCode":null,"errorMessage":"You must override the method 'generator_command' in your generator.","messagePattern":"You must override the method 'generator_command' in your generator\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"core/lib/refinery/extension_generation.rb","lineNumber":236,"sourceCode":"      if self.behavior != :revoke && !options[:pretend]\n        instruct_user!\n      else\n        erase_destination!\n      end\n    end\n\n    def gem_name\n      \"refinerycms-#{extension_plural_name}\"\n    end\n\n    def gemfile\n      @gemfile ||= begin\n        Bundler.default_gemfile || destination_pathname.join('Gemfile')\n      end\n    end\n\n    def generator_command\n      raise \"You must override the method 'generator_command' in your generator.\"\n    end\n\n    def install!\n      run \"bundle install\"\n      run \"rails generate refinery:#{extension_plural_name}\"\n      run \"rake db:migrate\"\n      run \"rake db:seed\"\n    end\n\n    def merge_existing_files!\n      # go through all of the temporary files and merge what we need into the current files.\n      tmp_directories = []\n      globs = %w[config/locales/*.yml config/routes.rb.erb lib/refinerycms-extension_plural_name.rb.erb]\n      Pathname.glob(source_pathname.join(\"{#{globs.join(',')}}\"), File::FNM_DOTMATCH).each do |path|\n        # get the path to the current tmp file.\n        # Both the new and current paths need to strip the .erb portion from the generator template\n        new_file_path = extension_path_for(path, extension_name).sub(/\\.erb$/, '')\n        tmp_directories << new_file_path.split.first","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/refinery/refinerycms/blob/34438aae76d087246039cd24755187844d796737/core/lib/refinery/extension_generation.rb#L218-L254","documentation":"Error \"You must override the method 'generator_command' in your generator.\" thrown in refinery/refinerycms.","triggerScenarios":"Thrown at core/lib/refinery/extension_generation.rb:236 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":"34438aae76d087246039cd24755187844d796737","analyzedAt":"2026-08-23T06:03:41.094Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}