I'm using guard with rspec and spork in a on ubuntu 12.04, rails
3.2.3, ruby 1.9.3
I have a directory in public/ in the rails project directory with
around 15,000 files in it. When I fire up guard, the disk gets
thrashed to the point where the workstation is effectively unusable.
I *have* added ignore_paths 'public' to the Guardfile, which makes no
difference.
Guard works fine with this project on other developers' MacOS
workstations, this disk-grinding only seems to happen on Linux.
I have bumped up max_user_watches:
$ cat /proc/sys/fs/inotify/max_user_watches
65536
I've tried moving the dir containing the 15k files out of the project
dir, and then symlinking to it; this doesn't fix the problem.
-----------------------------------------
Relevant snippet of Gemfile:
-----------------------------------------
group :development, :test do
gem 'thin'
gem 'rspec-rails'
gem 'capybara'
gem 'fuubar'
gem 'nifty-generators'
gem 'nokogiri'
gem 'sqlite3'
gem 'rails_best_practices'
gem 'rb-fsevent'
gem 'guard-rspec'
end
> I'm using guard with rspec and spork in a on ubuntu 12.04, rails
> 3.2.3, ruby 1.9.3
> I have a directory in public/ in the rails project directory with
> around 15,000 files in it. When I fire up guard, the disk gets
> thrashed to the point where the workstation is effectively unusable.
> I *have* added ignore_paths 'public' to the Guardfile, which makes no
> difference.
> Guard works fine with this project on other developers' MacOS
> workstations, this disk-grinding only seems to happen on Linux.
I guess I should have been clearer; I don't need or want to watch any
of the 15k files that guard is thrashing. I want to ignore them; I
want to eliminate the disk activity that is slowing down the system.
Moving the dir with the 15k files in it (without symlinking back)
accomplishes this, but I do need those files in place in the project
to do development work. I just don't need (or want) guard to watch
(or even seek/stat) them for rspec testing.
I am not experiencing the resource allocation problem ("user limit on
the total number of inotify watches was reached") that I encountered
prior to increasing max_user_watches.
I thought ignore_paths would do what I want, but it doesn't seem to
help.
On May 25, 12:11 am, Thibaud Guillaume-Gentil <thib...@thibaud.me>
wrote:
> You can also give a try to Guard 1.1.0.beta that use the Listen gem.
> On May 25, 2012, at 00:34 , eps wrote:
> > I'm using guard with rspec and spork in a on ubuntu 12.04, rails
> > 3.2.3, ruby 1.9.3
> > I have a directory in public/ in the rails project directory with
> > around 15,000 files in it. When I fire up guard, the disk gets
> > thrashed to the point where the workstation is effectively unusable.
> > I *have* added ignore_paths 'public' to the Guardfile, which makes no
> > difference.
> > Guard works fine with this project on other developers' MacOS
> > workstations, this disk-grinding only seems to happen on Linux.
> I guess I should have been clearer; I don't need or want to watch any
> of the 15k files that guard is thrashing. I want to ignore them; I
> want to eliminate the disk activity that is slowing down the system.
> Moving the dir with the 15k files in it (without symlinking back)
> accomplishes this, but I do need those files in place in the project
> to do development work. I just don't need (or want) guard to watch
> (or even seek/stat) them for rspec testing.
> I am not experiencing the resource allocation problem ("user limit on
> the total number of inotify watches was reached") that I encountered
> prior to increasing max_user_watches.
> I thought ignore_paths would do what I want, but it doesn't seem to
> help.
>> You can also give a try to Guard 1.1.0.beta that use the Listen gem.
>> On May 25, 2012, at 00:34 , eps wrote:
>>> I'm using guard with rspec and spork in a on ubuntu 12.04, rails
>>> 3.2.3, ruby 1.9.3
>>> I have a directory in public/ in the rails project directory with
>>> around 15,000 files in it. When I fire up guard, the disk gets
>>> thrashed to the point where the workstation is effectively unusable.
>>> I *have* added ignore_paths 'public' to the Guardfile, which makes no
>>> difference.
>>> Guard works fine with this project on other developers' MacOS
>>> workstations, this disk-grinding only seems to happen on Linux.
The workstation is perhaps slightly more responsive while the disk is
thrashing, but guard is still pounding the heck out of it.
I've changed:
ignore_paths 'public'
to
ignore 'public'
but that might not be correct? Neither one prevents the disk from
thrashing. Is there any documentation yet for the new 'ignore' and
'filter' methods mentioned in the ignore_paths deprecation warning?
On Fri, May 25, 2012 at 10:41 AM, eps <edsloc...@gmail.com> wrote:
> I have upgraded to 1.1.0-beta and I am seeing the same runaway disk-
> access behavior.
> The workstation is perhaps slightly more responsive while the disk is
> thrashing, but guard is still pounding the heck out of it.
> I've changed:
> ignore_paths 'public'
> to
> ignore 'public'
> but that might not be correct? Neither one prevents the disk from
> thrashing. Is there any documentation yet for the new 'ignore' and
> 'filter' methods mentioned in the ignore_paths deprecation warning?
> On Fri, May 25, 2012 at 10:41 AM, eps <edsloc...@gmail.com> wrote:
> I have upgraded to 1.1.0-beta and I am seeing the same runaway disk-
> access behavior.
> The workstation is perhaps slightly more responsive while the disk is
> thrashing, but guard is still pounding the heck out of it.
> I've changed:
> ignore_paths 'public'
> to
> ignore 'public'
> but that might not be correct? Neither one prevents the disk from
> thrashing. Is there any documentation yet for the new 'ignore' and
> 'filter' methods mentioned in the ignore_paths deprecation warning?
> The workstation is perhaps slightly more responsive while the disk is
> thrashing, but guard is still pounding the heck out of it.
> I've changed:
> ignore_paths 'public'
> to
> ignore 'public'
> but that might not be correct? Neither one prevents the disk from
> thrashing. Is there any documentation yet for the new 'ignore' and
> 'filter' methods mentioned in the ignore_paths deprecation warning?
The Guardfile DSL, of course, does not understand the key-value hash
syntax one would employ when using the Listen gem directly, so my
guesses look a little different from the documented syntax.
Is guard not converting the string it gets from the Guardfile into a
regex (via eval, presumably)?
Once I do get basic functionality working, what is the correct way to
match the project root in the regex? i.e., should I use
'%r{^public/}', '%r{^./public/}', '%r{^/home/user/Projects/
some_project/public}' or...?
On May 25, 11:40 am, Thibaud Guillaume-Gentil <thib...@thibaud.me>
wrote:
> > but that might not be correct? Neither one prevents the disk from
> > thrashing. Is there any documentation yet for the new 'ignore' and
> > 'filter' methods mentioned in the ignore_paths deprecation warning?
> The Guardfile DSL, of course, does not understand the key-value hash
> syntax one would employ when using the Listen gem directly, so my
> guesses look a little different from the documented syntax.
> Is guard not converting the string it gets from the Guardfile into a
> regex (via eval, presumably)?
> Once I do get basic functionality working, what is the correct way to
> match the project root in the regex? i.e., should I use
> '%r{^public/}', '%r{^./public/}', '%r{^/home/user/Projects/
> some_project/public}' or...?
> On May 25, 11:40 am, Thibaud Guillaume-Gentil <thib...@thibaud.me>
> wrote:
>> the ignore method is the same that Listen gem and you need to provide a regex. ignore 'public' shouldn't work.
>>> The workstation is perhaps slightly more responsive while the disk is
>>> thrashing, but guard is still pounding the heck out of it.
>>> I've changed:
>>> ignore_paths 'public'
>>> to
>>> ignore 'public'
>>> but that might not be correct? Neither one prevents the disk from
>>> thrashing. Is there any documentation yet for the new 'ignore' and
>>> 'filter' methods mentioned in the ignore_paths deprecation warning?