guard-rake icon indicating copy to clipboard operation
guard-rake copied to clipboard

Running rake tasks from a different gem?

Open Frexuz opened this issue 8 years ago • 0 comments

I'm using https://github.com/redealumni/i18n_yaml_sorter

The gem has a rake task that is ran by rake i18n:sort, which works fine running manually

Guardfile

guard 'rake', task: 'i18n:sort' do
  watch(%r{^config/locales/.+\.yml})
end

But I'm getting an error

14:10:54 - INFO - Starting guard-rake i18n:sort
14:10:59 - INFO - running i18n:sort
14:10:59 - ERROR - Guard::Rake failed to run rake task <i18n:sort>, exception was:
> [#76a7d63a12cd] 	RuntimeError: Don't know how to build task 'i18n:sort' (see --tasks)

rake --tasks shows

rake i18n:sort[path_to_file]            # Sort locales keys in alphabetic order

Ideas? :)

Frexuz avatar Jul 26 '17 06:07 Frexuz