Rails 8 Generate One Off Scripts
Rails 8 added a new generator command for creating 1 script files. The docs encourage the use of this folder for one off tasks, data migrations, etc. Previously, you could have used rake tasks to accomplish a similar thing.
Running this generator command will create the script
dir if one does not already exist.
❯ rails g script migration_script
create script/migration_script.rb
Tweet