On Tuesday, May 15, 2012 12:54:28 AM UTC-7, thibaudgg wrote:
> Can you give your Gemfile? It seems that guard-spork is missing.
> On May 12, 2012, at 01:56 , Shauna wrote:
> > I've been working my way through Michael Hartl's tutorial :
> http://ruby.railstutorial.org/chapters/static-pages?version=3.2#sec:s....
> > I'm on a Windows 7 system, so I know I can't use guard-spork. But I
> could swear that before I was able to start a Ruby DRb server and then run
> 'guard' without any problems. Now I can start up a Ruby DRb server fine and
> it does process my RSpec tests. But when I then try to 'bundle exec guard'
> I get:
> > ERROR: Could not load 'guard/spork' or find class Guard::Spork ...
> > ERROR: Invalid Guardfile, original error is:
> > undefined method 'new' for nil:NilClass
> > ERROR: No guards found in Guardfile, please add at least one. ...
> > Guard is now watching at 'C:/Sites/rm403'
> > and it doesn't detect when I change a spec file.
> > Here is the 'C:/Sites/rm403/Guardfile:
> > guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :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/spec_helper.rb') { :rspec }
> > watch('test/test_helper.rb') { :test_unit }
> > watch(%r{features/support/}) { :cucumber }
> > watch('spec/support/')
> > end
> > guard 'rspec', :version => 2, :all_after_pass => false, :cli => '--drb
> --color' 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",
> > "spec/requests/#{m[1]}_spec.rb"] }
> > # (m[1][/_pages/] ? "spec/requests/#{m[1]}_spec.rb" :
> > #
> "spec/requests/#{m[1].singularize}_pages_spec.rb")]
> > watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
> > watch('config/routes.rb') { "spec/routing" }
> > watch('app/controllers/application_controller.rb') {
> "spec/controllers" }
> > # Capybara request specs
> > watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m|
> "spec/requests/#{m[1]}_spec.rb" }
> > end
> > So is there some syntax error in my Guardfile that's preventing guard
> from interpreting it correctly? I tried remming out the whole spork section
> but then spork doesn't work at all. Can someone point me in the right
> direction? Thanks.