rubyist / guard-rake

guard-rake runs a rake task when files change
MIT License
94 stars 32 forks source link

Breaks defined class FileList #22

Closed jocke closed 11 years ago

jocke commented 11 years ago

Hi,

Our Rails app has got a model called FileList and when we install guard-rake (through bundle install) our FileList model breaks. Rails gives the following error message

NoMethodError (undefined method `scoped' for Rake::FileList:Class):

If we remove the guard-rake gem, it works again.

Let me know if I can provide some more information.

Thanks!

rubyist commented 11 years ago

The FileList class is coming from Rake, rather than guard-rake. It seems odd that any rake commands that load your rails environment would work. If I create an empty Rails project with a FileList model and attempt to run the default rake command, this is what I get:

guard-conflict $ rake Rack::File headers parameter replaces cache_control after Rack 1.5. /Users/scott/src/scratch/guard-conflict/app/models/file_list.rb:1:in `<top (required)>': superclass mismatch for class FileList (TypeError)

At any rate, the FileList class is defined in Rake itself, and I don't think there's anything I can change in guard-rake to prevent this error.

jocke commented 11 years ago

Hi, thanks for looking into this. I'll continue the research from here. In fact, only yesterday, this problem surfaced again, this time when working with testing. Again, big thanks for looking into this and the explanation!