Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
linux project dir with many (15k) files un-guard-able
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
eps  
View profile  
 More options May 24 2012, 6:34 pm
From: eps <edsloc...@gmail.com>
Date: Thu, 24 May 2012 15:34:47 -0700 (PDT)
Local: Thurs, May 24 2012 6:34 pm
Subject: linux project dir with many (15k) files un-guard-able
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

--------------
Guardfile:
--------------

# -*- ruby -
*-
# A sample
Guardfile
# More info at https://github.com/guard/guard#readme

ignore_paths 'public'

# NOTE: spork section needs to come
first.
guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' } do
  watch('config/application.rb')
  watch('config/environment.rb')
  watch(%r{^config/environments/.+\.rb$})
  watch(%r{^config/initializers/.+\.rb$})
  watch('Gemfile')
  watch('Gemfile.lock')
  watch('spec/factories.rb')
  watch('spec/spec_helper.rb') { :rspec }
  watch(%r{^app/(.+)\.rb$})
end

guard 'rspec', :version => 2, :cli => "--drb", :all_on_start =>
false, :all_after_pass => false do
  watch(%r{^spec/.+_spec\.rb$})
  watch(%r{^lib/(.+)\.rb$})     { |m| "spec/lib/#{m[1]}_spec.rb" }
  watch('spec/spec_helper.rb')  { "spec" }

  # Rails
example
  watch(%r{^app/(.+)\.rb$})                           { |m| "spec/
#{m[1]}_spec.rb" }
  watch(%r{^app/(.*)(\.erb|\.haml)$})                 { |m| "spec/
#{m[1]}#{m[2]}_spec.rb" }
  watch(%r{^app/controllers/(.+)_(controller)\.rb$})  { |m| ["spec/
routing/#{m[1]}_routing_spec.rb",
                                                             "spec/
#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb",
                                                             "spec/
acceptance/#{m[1]}_spec.rb"] }
  watch('spec/factories.rb')                          { "spec" }
  watch('config/routes.rb')                           { "spec/
routing" }
  watch('app/controllers/application_controller.rb')  { "spec/
controllers" }

  # Request
specs
  watch(%r{^app/views/(.+)/}) { |m| "spec/requests/#{m[1]}
_request_spec.rb" }
end


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thibaud Guillaume-Gentil  
View profile  
 More options May 25 2012, 3:11 am
From: Thibaud Guillaume-Gentil <thib...@thibaud.me>
Date: Fri, 25 May 2012 09:11:05 +0200
Local: Fri, May 25 2012 3:11 am
Subject: Re: linux project dir with many (15k) files un-guard-able
Maybe 65536 isn't enough, we have a good wiki page about that: https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify...

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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
eps  
View profile   Translate to Translated (View Original)
 More options May 25 2012, 8:32 am
From: eps <edsloc...@gmail.com>
Date: Fri, 25 May 2012 05:32:24 -0700 (PDT)
Local: Fri, May 25 2012 8:32 am
Subject: Re: linux project dir with many (15k) files un-guard-able
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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rémy Coutable  
View profile   Translate to Translated (View Original)
 More options May 25 2012, 8:55 am
From: Rémy Coutable <r...@rymai.me>
Date: Fri, 25 May 2012 14:55:33 +0200
Local: Fri, May 25 2012 8:55 am
Subject: Re: linux project dir with many (15k) files un-guard-able
Hi,

Could you give a try to Guard 1.1.0.beta [http://rubygems.org/gems/guard/versions/1.1.0.beta], it uses the new Listen gem.

Thanks for letting us know if that works better.

Regards,
Rémy

On May 25, 2012, at 14:32 , eps wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
eps  
View profile  
 More options May 25 2012, 1:41 pm
From: eps <edsloc...@gmail.com>
Date: Fri, 25 May 2012 10:41:07 -0700 (PDT)
Local: Fri, May 25 2012 1:41 pm
Subject: Re: linux project dir with many (15k) files un-guard-able
I have upgraded to 1.1.0-beta and I am seeing the same runaway disk-
access behavior.

rspec ~> 2.10.0, rails-rspec ~> 2.10.0, guard-rspec ~> 0.7.0

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?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Abe Kinney  
View profile   Translate to Translated (View Original)
 More options May 25 2012, 1:45 pm
From: Abe Kinney <abek1...@gmail.com>
Date: Fri, 25 May 2012 10:45:39 -0700
Local: Fri, May 25 2012 1:45 pm
Subject: Re: linux project dir with many (15k) files un-guard-able

how do i get off the mailing list?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thibaud Guillaume-Gentil  
View profile  
 More options May 25 2012, 2:38 pm
From: Thibaud Guillaume-Gentil <thib...@thibaud.me>
Date: Fri, 25 May 2012 20:38:06 +0200
Local: Fri, May 25 2012 2:38 pm
Subject: Re: linux project dir with many (15k) files un-guard-able
@abe just leave the guard-dev google group

On May 25, 2012, at 19:45 , Abe Kinney wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thibaud Guillaume-Gentil  
View profile   Translate to Translated (View Original)
 More options May 25 2012, 2:40 pm
From: Thibaud Guillaume-Gentil <thib...@thibaud.me>
Date: Fri, 25 May 2012 20:40:20 +0200
Local: Fri, May 25 2012 2:40 pm
Subject: Re: linux project dir with many (15k) files un-guard-able
the ignore method is the same that Listen gem and you need to provide a regex. ignore 'public' shouldn't work.

https://github.com/guard/listen#the-patterns-for-filtering-and-ignori...

On May 25, 2012, at 19:41 , eps wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
eps  
View profile  
 More options May 29 2012, 3:49 pm
From: eps <edsloc...@gmail.com>
Date: Tue, 29 May 2012 12:49:57 -0700 (PDT)
Local: Tues, May 29 2012 3:49 pm
Subject: Re: linux project dir with many (15k) files un-guard-able
I have tried the following, without success:

ignore %r{public/}
ignore '%r{public/}'
ignore %r{public}
ignore %r{.*public.*}

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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thibaud Guillaume-Gentil  
View profile  
 More options Jun 1 2012, 1:22 am
From: Thibaud Guillaume-Gentil <thib...@thibaud.me>
Date: Fri, 1 Jun 2012 07:22:21 +0200
Local: Fri, Jun 1 2012 1:22 am
Subject: Re: linux project dir with many (15k) files un-guard-able
Like describe in https://github.com/guard/listen#the-patterns-for-filtering-and-ignori...

ignore %r{public/}

should work fine, have you also try:

ignore /build\//

On May 29, 2012, at 21:49 , eps wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »