capistrano / rails

Official Ruby on Rails specific tasks for Capistrano
http://www.capistranorb.com/
MIT License
867 stars 270 forks source link

Use `bin/rails` rather than `rake` for deployment tasks #253

Open jcoyne opened 2 years ago

jcoyne commented 2 years ago

Because this is the documented way of running migrations https://guides.rubyonrails.org/active_record_migrations.html#running-migrations

and this runs the migrations in the current bundle context if they are using bundler, without any extra capistrano gems required.

mathagician commented 1 year ago

@jcoyne Is it a suggestion or any code changes is required? can u guide ?

jcoyne commented 1 year ago

Yes, this was a feature request. I'm pretty sure the existing command is here: https://github.com/capistrano/rails/blob/6c8603f69267eb173eb8f2edd0a1329f1c50fef5/lib/capistrano/tasks/migrations.rake#L25

but I'm not sure how to replace :rake with bin/rails as I'm not sure that method accepts non-Symbol arguments.