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

rake routes draws outdated information

Open a-b opened this issue 8 years ago • 2 comments

I'm trying to draw routes as soon as routes.rb changes. My Guardfile:

guard :rake, task: :routes, run_on_start: true, run_on_all: false do
  watch('config/routes.rb')
end

The problem is that when I change file rake routes output does not reflect recent changes. Also, it runs very fast, like the rails app been preloaded.

How to approach this problem?

a-b avatar Feb 09 '17 01:02 a-b

The plugin will keep the rake process in cache, this might also be spring related.

ened avatar Jul 10 '18 04:07 ened

I switched to guard-shell for my usecase, it should be trivial for yours, too.

https://github.com/guard/guard-shell

guard :shell do
  watch(%r{^config/routes.rb}) do
    `bin/rake routes`
  end
end

ened avatar Jul 10 '18 04:07 ened