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-project
and choose options in interactive mode; - run
./new-rails-project file-name-with-options
, wherefile-name-with-options
is the file path to your file with options (this script asks to create this file before runningrails new
command).
To apply changes to existing project:
- run
./change-rails-project
and choose options in interactive mode; - run
./change-rails-project project-directory
, whereproject-directory
is path to the directory of your project; - run
./change-rails-project project-directory feature-name
, wherefeature-name
is 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-gem
and choose options in interactive mode.
bundle-config
: predefined config files forbundler
crud
: default implementation of CRUD actionsdocker
: generate Dockerfile & Docker Compose filesdotenv
: add gemdotenv
and example files for configuration via ENVmisc
: miscellaneous tasks for changing and removing files and directories within Rails applicationremove-comments
: remove unnecessary comments from project filessettings
: store project configuration in YAML or JSON formatsort-config
: sort configuration lines inconfig/environments/*.rb
testing
: 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 install
andbin/postinstall
, if needed. - Apply changes from other features.
- Run
bundle install
. - Run
cd .tools && bundle install && cd ..
if you addedtools
feature. - Run
bin/postinstall
, if needed. - Run
bin/rubocop
to 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