Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8849623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:41:58+00:00 2026-06-14T12:41:58+00:00

SOLVED: Took out the spork code in the guardfile and copy and pasted a

  • 0

SOLVED: Took out the spork code in the guardfile and copy and pasted a working guardfile from another one of my apps that works with spork and guard.

I installed Guard and Spork into my app. Guard works fine but when I run Spork, Spork loads and says ready and listening. As soon as I open a new terminal and start rspec, the Spork is killed in the first terminal, and this appears…

jason@jason:~/ror/blog$ guard
14:57:44 - INFO - Guard here! It looks like your project has a Gemfile, yet you are 
running
> [#] `guard` outside of Bundler. If this is your intent, feel free to ignore this
> [#] message. Otherwise, consider using `bundle exec guard` to ensure your
> [#] dependencies are loaded correctly.
> [#] (You can run `guard` with --no-bundler-warning to get rid of this message.)
14:57:45 - INFO - Guard uses NotifySend to send notifications.
14:57:45 - INFO - Guard uses TerminalTitle to send notifications.
14:57:45 - INFO - Guard is now watching at '/home/jason/ror/blog'
14:57:45 - INFO - Starting Spork for RSpec
Using RSpec
Preloading Rails environment
WARNING: Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 
2.8.0
Loading Spork.prefork block...
Spork is ready and listening on 8989!
14:58:02 - INFO - Spork server for RSpec successfully started
14:58:03 - INFO - Guard::RSpec is running, with RSpec 2!
14:58:03 - INFO - Running all specs

On the original terminal this appears…

jason@jason:~/ror/blog$ spork
Using RSpec
Preloading Rails environment
WARNING: Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 
2.8.0
Loading Spork.prefork block...
Spork is ready and listening on 8989!
Killed
jason@jason:~/ror/blog$ 

Here is my spec_helper file

require 'rubygems'
require 'spork'

Spork.prefork do

  ENV["RAILS_ENV"] ||= 'test'
  require File.expand_path("../../config/environment", __FILE__)
  require 'rspec/rails'
  require 'rspec/autorun'

  Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}

  RSpec.configure do |config|

    # config.mock_with :mocha
    # config.mock_with :flexmock
    # config.mock_with :rr
    config.mock_with :rspec

    # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
    config.fixture_path = "#{::Rails.root}/spec/fixtures"

    config.use_transactional_fixtures = true

    config.infer_base_class_for_anonymous_controllers = false

    config.treat_symbols_as_metadata_keys_with_true_values = true
    config.filter_run :focus => true
    config.run_all_when_everything_filtered = true

  end
end

Spork.each_run do
  FactoryGirl.reload
end

Here is my Guardfile

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

require 'active_support/core_ext'

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('spec/spec_helper.rb')
  watch(%r{^spec/support/.+\.rb$})
end


guard 'rspec', :version => 2, :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(%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" }


# Turnip features and steps
watch(%r{^spec/acceptance/(.+)\.feature$})
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$})   { |m| Dir[File.join("**/#
{m[1]}.feature")][0] || 'spec/acceptance' }
end

My gemfile contains

group :test do
  gem 'capybara', '1.1.2'
  gem 'rb-inotify', '0.8.8'
  gem 'libnotify', '0.5.9'
  gem 'factory_girl_rails', '4.1.0'
  gem 'cucumber-rails', '1.2.1', :require => false
  gem 'database_cleaner', '0.7.0'
end

group :development, :test do
  gem 'rspec-rails', '2.11.0'
  gem 'guard-rspec', '1.2.1'
  gem 'guard-spork', '1.2.0'
  gem 'spork', '0.9.2'
end

Although it looks like it is working, the tests take the same amount of time so I know spork can’t be working.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:41:59+00:00Added an answer on June 14, 2026 at 12:41 pm

    Took out the spork code in the guardfile and copy and pasted a working guardfile from another one of my apps that works with spork and guard. In the end, I didn’t need the spork section in my guardfile.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Some time ago we took over the responsibility of a legacy code base. One
I am currently working on code that translates a path through a C program
SOLVED: Crap... why is it always you figure something out right AFTER you finally
Solved I actually found out what is going on here. Turns out it was
solved: IstBestellwert = grouped.Sum(o => (double)o.SollMenge * (double)o.Preis) works My SQL Statment SELECT ABId,
SOLVED. Code has been edited to reflect solution. Given the following GridView : <asp:GridView
I'm currently working on project euler problem 14 . I solved it using a
I'm trying to use wp_insert_post from an external php file. This file works fine
I solved a problem on Project Euler but it took about 4 minutes to
I asked similar question one month ago: Inheritance though composition? I took the examples

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.