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
Message from discussion Could not load 'guard/spork' or find class Guard::Spork

Received: by 10.68.244.73 with SMTP id xe9mr720093pbc.1.1347303211543;
        Mon, 10 Sep 2012 11:53:31 -0700 (PDT)
X-BeenThere: guard-dev@googlegroups.com
Received: by 10.68.237.161 with SMTP id vd1ls5406460pbc.3.gmail; Mon, 10 Sep
 2012 11:53:31 -0700 (PDT)
Received: by 10.66.85.199 with SMTP id j7mr2844439paz.36.1347303211337;
        Mon, 10 Sep 2012 11:53:31 -0700 (PDT)
Received: by 10.66.85.199 with SMTP id j7mr2844438paz.36.1347303211327;
        Mon, 10 Sep 2012 11:53:31 -0700 (PDT)
Return-Path: <slhai...@gmail.com>
Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42])
        by gmr-mx.google.com with ESMTPS id p7si5464900pby.0.2012.09.10.11.53.31
        (version=TLSv1/SSLv3 cipher=OTHER);
        Mon, 10 Sep 2012 11:53:31 -0700 (PDT)
Received-SPF: pass (google.com: domain of slhai...@gmail.com designates 209.85.160.42 as permitted sender) client-ip=209.85.160.42;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of slhai...@gmail.com designates 209.85.160.42 as permitted sender) smtp.mail=slhai...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-pb0-f42.google.com with SMTP id rp8so4533057pbb.1
        for <guard-dev@googlegroups.com>; Mon, 10 Sep 2012 11:53:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:x-mailer:organization:x-priority:message-id:to:cc:subject
         :in-reply-to:references:mime-version:content-type
         :content-transfer-encoding;
        bh=fymwOsCgcxt7MVN3sw3K+FU2TB+11Ibd3Rl12epjyW8=;
        b=TKdVz1aejFEja4VDns6LgcOPsQpvupT5TLiBoFxXNBbupB++L5591BqWHS0Nk7vy0m
         cYjIZys/IXMdjYt+apINh/AaCSZK6ZFFjhjT/5jo7BVCwbg54TI/WXTgaY3QEJiTGyc+
         /dax4NFdETSjPyPfpEgdOciuOcANrhzfVAUYFQwHxQjxq8sYdj7j5O3yCB0Uah+MpwcB
         6fYspM/DNffAePziKw4EE4dREJa1N0qRTtEvLtr1xL+RNQv1uWO4vkYFkQiY1g0+vB3Y
         L7nNpo2dORiJ+9cxKbnksM3CEQqFq7lunK6Iojjw0OCkSDHSnOVpSJ39LElR4/2E/P7Y
         hWiQ==
Received: by 10.68.130.65 with SMTP id oc1mr7050870pbb.29.1347303211196;
        Mon, 10 Sep 2012 11:53:31 -0700 (PDT)
Return-Path: <slhai...@gmail.com>
Received: from Pequod (70-36-134-25.dsl.dynamic.sonic.net. [70.36.134.25])
        by mx.google.com with ESMTPS id ty1sm2301917pbc.76.2012.09.10.11.53.29
        (version=TLSv1/SSLv3 cipher=OTHER);
        Mon, 10 Sep 2012 11:53:30 -0700 (PDT)
Date: Mon, 10 Sep 2012 11:52:54 -0700
From: Shauna Haines <slhai...@gmail.com>
X-Mailer: The Bat! (v1.63 Beta/7) Personal
Organization: Ah, Software
X-Priority: 3 (Normal)
Message-ID: <11250247407.20120910115...@gmail.com>
To: rails2012 <derek...@hotmail.com>
CC: guard-dev@googlegroups.com
Subject: Re[7]: Could not load 'guard/spork' or find class Guard::Spork
In-Reply-To: <f858cede-ecf1-40b1-a98d-84ed476a7334@googlegroups.com>
References: <17121833.92.1336780599508.JavaMail.geo-discussion-forums@pbvi9>
 <129EEFC0-4347-496E-88B4-E4C67A751...@thibaud.me>
 <b9e796bc-fcd2-4dd4-9d34-3e2e81e65e7d@googlegroups.com>
 <10481980938.20120909105...@gmail.com>
 <f7b27520-e9da-4b3c-9c8a-98478dff2096@googlegroups.com>
 <11493096259.20120909135...@gmail.com> <104504159413.20120909165...@gmail.com>
 <f858cede-ecf1-40b1-a98d-84ed476a7334@googlegroups.com>
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit

I changed my Gemfile similar to yours (listed below), restarted my
computer, deleted the Gemfile.lock file, ran 'bundle install' (no
problems with that), and ran 'bundle exec guard'. I got the same
messages as before:
  ERROR: <-[0mCould not load 'guard/spork-rails' or find class
    Guard::SporkRails
  ERROR: <-[0mcannot load such file -- guard/spork-rails
  ERROR: <-[0mInvalid Guardfile, original error is:
    undefined method 'new' for nil:NilClass
  ERROR: <-[0mNo guards found in Guardfile, please add at least one.
  ...
  <-[0mGuard is now watching at...

Then I changed a spec file, and there was no response from guard.
Then I started 'bundle exec spork' in another "Command Prompt with
Ruby and Rails" window, and changed the spec file again. There was
still no response.

My Gemfile:
source 'https://rubygems.org'

gem 'rails', '3.2.8'
gem 'bootstrap-sass', '2.0.0'
gem 'bcrypt-ruby', '3.0.1'       # Chap 6
gem 'pg', '0.13.1'

group :development do
#  gem 'mongrel', '1.2.0.pre2'   # for ruby 1.9.2
  gem 'rspec-rails', '2.11.0'    # '2.9.0', '2.10.0'
  gem 'guard-rspec', '0.5.5'
  gem 'guard-spork', '0.3.2'
  gem 'spork', '0.9.0'
  gem 'wdm', '~> 0.0.3'

  gem 'annotate', '~> 2.4.1.beta'
end

group :test do
#  gem 'rspec-rails', '2.11.0'   # '2.9.0', '2.10.0'
#  gem 'guard-rspec', '0.5.5'
#  gem 'guard-spork', '0.3.2'
#  gem 'spork', '0.9.0'
#  gem 'wdm', '~> 0.0.3'

  gem 'capybara', '1.1.2'
  gem 'rb-fchange', '0.0.5'
  gem 'rb-notifu', '0.0.4'
  gem 'win32console', '1.3.0'
  gem 'win32-process'
#  gem 'guard-spork'             # guard-spork does not work in Windows! - try again w/ later versions
#  gem 'spork', '> 0.9.0.rc9'
#  gem 'spork-rails'
#  gem 'guard-rspec'
  gem 'factory_girl_rails', '1.4.0'
  gem 'cucumber-rails', '1.2.1', require: false
  gem 'database_cleaner', '0.7.0'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.5'           # '~> 3.2.3', '3.2.4'
  gem 'coffee-rails', '3.2.2'           # '~> 3.2.2'
  gem 'uglifier',     '1.2.3'
end

gem 'jquery-rails', '2.0.0'             # '~> 2.0.0'

#group :production do
#  gem 'pg', '0.13.1'
#end

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

My Guardfile:
# A sample Guardfile
# More info at https://github.com/guard/guard#readme

guard 'spork-rails', :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')
  watch('test/test_helper.rb')
end

# guard 'rspec', :version => 2 do
guard 'rspec', :version => 2, :all_after_pass => false, :cli => '--drb' 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" }
  watch(%r{^app/views/(.+)/}) do |m|
    (m[1][/_pages/] ? "spec/requests/#{m[1]}_spec.rb" : 
                      "spec/requests/#{m[1].singularize}_pages_spec.rb")
  end
end

guard 'rspec', :version => 2 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{^spec/.+_spec\.rb$})
  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{^lib/(.+)\.rb$})                           { |m| "spec/lib/#{m[1]}_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(%r{^spec/support/(.+)\.rb$})                  { "spec" }
  watch('spec/spec_helper.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


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')
  watch('test/test_helper.rb')
end


Sunday, September 9, 2012, 8:36:25 PM, rails2012 wrote:

r> Here is my whole Gemfile:

r> source 'https://rubygems.org'

r> gem 'rails', '3.2.8'

r> # Bundle edge Rails instead:
r> # gem 'rails', :git => 'git://github.com/rails/rails.git'
r> group :development do
r>   gem 'sqlite3'
r>   gem 'rspec-rails', '2.11.0'
r>   gem 'guard-rspec', '0.5.5'
r>   gem 'guard-spork', '0.3.2'
r>   gem 'spork', '0.9.0'
r>   gem 'wdm', '~> 0.0.3'
r> end


r> # Gems used only for assets and not required
r> # in production environments by default.
r> group :assets do
r>   gem 'sass-rails',   '~> 3.2.3'
r>   gem 'coffee-rails', '~> 3.2.1'

r>   # See https://github.com/sstephenson/execjs#readme for more supported
r> runtimes
r>   # gem 'therubyracer', :platforms => :ruby

r>   gem 'uglifier', '>= 1.2.3'
r> end

r> gem 'jquery-rails'

r> group :test do
r>   gem 'capybara', '1.1.2'
r>   gem 'rb-fchange', '0.0.5'
r>   gem 'rb-notifu', '0.0.4'
r>   gem 'win32console', '1.3.0'
r> end

r> # To use ActiveModel has_secure_password
r> # gem 'bcrypt-ruby', '~> 3.0.0'

r> # To use Jbuilder templates for JSON
r> # gem 'jbuilder'

r> # Use unicorn as the app server
r> # gem 'unicorn'

r> # Deploy with Capistrano
r> # gem 'capistrano'

r> # To use debugger
r> # gem 'debugger'

r> group :production do 
r>   # gems specifically for Heroku go here 
r>   gem "pg" 
r> end 


r> #gem 'whenever', :require => false
r> gem 'rufus-scheduler', :require => false