refinery/refinerycms · error · RuntimeError
You must override the method 'generator_command' in your gen
Error message
You must override the method 'generator_command' in your generator.
What it means
Error "You must override the method 'generator_command' in your generator." thrown in refinery/refinerycms.
Source
Thrown at core/lib/refinery/extension_generation.rb:236
if self.behavior != :revoke && !options[:pretend]
instruct_user!
else
erase_destination!
end
end
def gem_name
"refinerycms-#{extension_plural_name}"
end
def gemfile
@gemfile ||= begin
Bundler.default_gemfile || destination_pathname.join('Gemfile')
end
end
def generator_command
raise "You must override the method 'generator_command' in your generator."
end
def install!
run "bundle install"
run "rails generate refinery:#{extension_plural_name}"
run "rake db:migrate"
run "rake db:seed"
end
def merge_existing_files!
# go through all of the temporary files and merge what we need into the current files.
tmp_directories = []
globs = %w[config/locales/*.yml config/routes.rb.erb lib/refinerycms-extension_plural_name.rb.erb]
Pathname.glob(source_pathname.join("{#{globs.join(',')}}"), File::FNM_DOTMATCH).each do |path|
# get the path to the current tmp file.
# Both the new and current paths need to strip the .erb portion from the generator template
new_file_path = extension_path_for(path, extension_name).sub(/\.erb$/, '')
tmp_directories << new_file_path.split.firstView on GitHub (pinned to 34438aae76)
When it happens
Trigger: Thrown at core/lib/refinery/extension_generation.rb:236 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of refinery/refinerycms@34438aae76 (2026-08-23).
Data as JSON: /api/errors/9349fd68ebd1a23d.
Report an issue: GitHub.