Minimal supported versions:
- Ruby 3.1 (with YJIT)
- Rails 7.2
- Node.js 20
- Yarn 4
- MySQL 8
- PostgreSQL 16
- Docker 26
- Vue 3
- Svelte 4
- Docker 26
Supported Rails versions: 7.2, 8.0.
To create project:
- run
./new-rails-projectand choose options in interactive mode; - run
./new-rails-project file-name-with-options, wherefile-name-with-optionsis the file path to your file with options (this script asks to create this file before runningrails newcommand).
To apply changes to existing project:
- run
./change-rails-projectand choose options in interactive mode; - run
./change-rails-project project-directory, whereproject-directoryis path to the directory of your project; - run
./change-rails-project project-directory feature-name, wherefeature-nameis name of desired feature (see list of features below). You may pass several feature names separated by space.
To create gem (it may be not related to Rails):
- run
./new-gemand choose options in interactive mode.
bundle-config: predefined config files forbundlercrud: default implementation of CRUD actionsdocker: generate Dockerfile & Docker Compose filesdotenv: add gemdotenvand example files for configuration via ENVmisc: miscellaneous tasks for changing and removing files and directories within Rails applicationremove-comments: remove unnecessary comments from project filessessions: configuration for gem multi-sessionssettings: store project configuration in YAML or JSON formatsort-config: sort configuration lines inconfig/environments/*.rbtesting: add gems and default configuration for testingtools: add linters, code formatters and documentation toolsyarn: install latest version of Yarn and add actual config values for Yarn
... to be continued ...
- Create new project directory with
new-rails-project(withbundle_install: false). - Go to project directory and apply changes from
bundle-config(replace "project-directory" to actual path):
change-rails-project project-directory bundle-config- Add some gems, if needed. Run
bundle installandbin/postinstall, if needed. - Apply changes from other features.
- Run
bundle install. - Run
cd .tools && bundle install && cd ..if you addedtoolsfeature. - Run
bin/postinstall, if needed. - Run
bin/rubocopto fix manually issues from RuboCop (if you added it to your project). Script bin/postinstall` applies "safe" corrections so you don't need to do it manually.
Run rake or rake test to run all tests.
Run rake test TEST=test/template_test.rb TESTOPTS="--name=test_full_7" or similar keystroke to run
one specific test.
Required system packages:
- libyaml-dev / libyaml-devel