Files
openidea/generators/rails.toml
T
l0ng-ai 605d5f4985 feat(new-project): project generators for mainstream languages and frameworks (#2689)
File › New Project offers 38 generators grouped by language (Java, Spring Boot, Quarkus, Micronaut, Kotlin, Ktor, Scala, Python/Django/FastAPI/Flask, Node/Vite/Next.js/Nuxt/Angular/SvelteKit/Astro/NestJS/Express, Go, Rust, C/C++, Zig, .NET, PHP/Laravel/Symfony, Ruby/Rails, Dart/Flutter, Swift, Elixir/Phoenix, Haskell, static website, empty). Each is a declaration in generators/<id>.toml run by the new ide-scaffold crate: built-in templates, the framework's official CLI run non-interactively, or a project service zip (Spring Initializr, code.quarkus.io, Micronaut Launch) whose metadata becomes form fields. Projects are built in a staging directory and moved into place only on success. The dialog renders each form from its schema, flags missing toolchains with install hints and streams progress; created projects open trusted. New Project is also on the welcome screen and the title bar project menu.

Closes #709
2026-11-11 17:22:57 +08:00

47 lines
1006 B
TOML

id = "rails"
name = "Ruby on Rails"
group = "Ruby"
icon = "project-rails"
order = 1
description = "A Rails application from rails new."
[[requires]]
program = "rails"
# macOS ships a `rails` stub that only says Rails is not installed.
min = "7.1"
hint = "Install Rails: gem install rails"
[[fields]]
id = "database"
label = "Database:"
type = "choice"
options = [
{ value = "sqlite3", label = "SQLite" },
{ value = "postgresql", label = "PostgreSQL" },
{ value = "mysql", label = "MySQL" },
{ value = "trilogy", label = "MySQL (Trilogy)" },
]
default = "sqlite3"
[[fields]]
id = "api"
label = "API only"
type = "checkbox"
default = "false"
[[fields]]
id = "install"
label = "Install gems"
type = "checkbox"
default = "true"
[[steps]]
label = "Running rails new"
program = "rails"
cwd = "parent"
args = [
"new", "{{name}}", "--database={{database}}", "--skip-git",
{ when = { api = "true" }, args = ["--api"] },
{ when = { install = "false" }, args = ["--skip-bundle"] },
]