spree/spree · info

Rails engine generation is coming in a future release. For n

Error message

Rails engine generation is coming in a future release. For now, scaffold the dashboard half here and use `spree-extension create` for the Ruby side.

What it means

`spree plugin create` cannot yet generate the Rails engine half of a plugin — the engine templates are not implemented in the CLI (includeEngine is hard-coded false pending a follow-up). When you did not explicitly decline the engine, it prints this notice telling you to scaffold the dashboard half here and create the Ruby side with the separate `spree-extension create` command.

Source

Thrown at packages/cli/src/commands/plugin.ts:297

  if (p.isCancel(license)) return license as symbol

  // The `--no-dashboard` flag pre-answers this; --yes accepts the default.
  const includeDashboard =
    flags.dashboard === false
      ? false
      : flags.yes || (await promptConfirm('Include dashboard plugin?', true))
  if (p.isCancel(includeDashboard)) return includeDashboard as symbol

  // The engine half is not yet generated by the CLI — the Rails templates
  // land in a follow-up PR. For now, we always answer false and note it.
  // Once the engine templates exist, restore the prompt:
  //
  //   const includeEngine = flags.engine === false
  //     ? false
  //     : await promptConfirm('Include Rails engine (API endpoints)?', true)
  const includeEngine = false
  if (flags.engine !== false) {
    p.log.warn(
      'Rails engine generation is coming in a future release. For now, scaffold the dashboard half here and use `spree-extension create` for the Ruby side.',
    )
  }

  if (!includeDashboard && !includeEngine) {
    p.cancel('Nothing to scaffold (dashboard half declined).')
    process.exit(1)
  }

  return {
    name: name as string,
    rubyName: rubyName as string,
    moduleName: moduleName as string,
    npmScope: (npmScope as string).trim(),
    authorName: authorName as string,
    authorEmail: authorEmail as string,
    license: license as string,
    includeDashboard: includeDashboard as boolean,

View on GitHub (pinned to 06bf66a868)

Solutions

  1. Use `spree plugin create` for the dashboard half it does generate.
  2. Create the Ruby engine with `spree-extension create` and place it alongside the dashboard package in the plugin repo.
  3. Watch CLI releases for the engine-generation follow-up; until then treat the engine as manually created.

Example fix

# before — expecting both halves
spree plugin create my-plugin

# after — scaffold each half with its tool
spree plugin create my-plugin           # dashboard half
spree-extension create my-plugin        # Rails engine half
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: Creating a plugin without --no-engine, i.e. expecting `spree plugin create` to emit both the dashboard package and the Rails engine — only the dashboard plugin is scaffolded.

Common situations: Building a first Spree extension with the new CLI, following docs that assume full two-half generation, or CI scaffolding checks.

Related errors


AI-assisted analysis of spree/spree@06bf66a868 (2026-08-21). Data as JSON: /api/errors/05f51d41695b96d1. Report an issue: GitHub.