I have a wrapper directory which wrap my rails application:
wrapper
|____ Rakefile
|____ my_task.rake
|____ rails_app/
In my_task.rake
I want to run bundle exec rubocop
for rails_app
(I have installed Rubocop for the app)`.
Even tho I have successfully changed directory to rails_app
in rake task, the system command bundle exec rubocop
result with the rubocop installed in wrapper
running and not the rubocop version in rails_app
.
How can I specify the system command in my rake task to run rubocop in a different directory? I know I can just put the rake task inside rails app but let just say it's a practical...