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 7986553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:53:15+00:00 2026-06-04T11:53:15+00:00

In my Gemfile… group :development, :test do gem ‘capybara’, 1.1.2 gem ‘database_cleaner’, 0.7.0 gem

  • 0

In my Gemfile…

group :development, :test do
  gem 'capybara', "1.1.2"
  gem 'database_cleaner', "0.7.0"

  gem 'cucumber', "1.1.2"
  gem 'cucumber-rails', "1.2.0"

  gem 'rspec-rails', "2.7.0"

  gem 'spork', "0.9.0.rc9"

  gem 'launchy' #launches the page

  gem 'guard-spork', "0.3.1"
  gem 'guard-rspec', "0.5.4"
  gem 'guard-cucumber', "0.7.4"

  gem 'factory_girl_rails'
end

My Guardfile have two groups (:specs and :features).

group :specs do

  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('spec/spec_helper.rb')
  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{^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

end

group :features do

  guard 'spork', :cucumber_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')
  end

  guard 'cucumber' do
    watch(%r{^features/.+\.feature$})
    watch(%r{^features/support/.+$})          { 'features' }
    watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
  end

end

When I try to run the :specs group, I would expect guard to run Spork for Rspec only.

guard -g specs start

However, I can see from the output that guard runs Spork both for Rspec and Cucumber.

~/current[master]% guard -g specs start
WARNING: You are using Guard outside of Bundler, this is dangerous and may not work. Using `bundle exec guard` is safer.
Guard could not detect any of the supported notification libraries.
Guard is now watching at '/Users/rupert/Desktop/cws-rails'
Starting Spork for RSpec & Cucumber 
Using RSpec
Using Cucumber
Preloading Rails environment
Preloading Rails environment
Loading Spork.prefork block...
Loading Spork.prefork block...
Spork is ready and listening on 8990!
Spork is ready and listening on 8989!
Spork server for RSpec & Cucumber successfully started
Guard::RSpec is running, with RSpec 2!
Running all specs

Is there any config file for SPORK or guard that I might have missed?

UPDATE:

  1. Remove guard-cucumber

  2. Remove or Rename features folder

  • 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-04T11:53:16+00:00Added an answer on June 4, 2026 at 11:53 am

    You must disable Cucumber in Spork in the RSpec group and the other way around:

    specs :specs    
      guard :spork, :cucumber => false do
        # ...
      end
    end
    
    specs :features    
      guard 'spork', :rspec => false do
        # ...
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Gemfile source 'http://rubygems.org' gem 'rails', '3.0.3' gem 'sqlite3-ruby', :require => 'sqlite3' group :development, :test
Here my Gemfile look like : group :development, :test do gem 'capybara', '0.4.0' gem
In my Gemfile in Rails I have these groups: group :development, :test do gem
Here is my Gemfile gem 'rails', '3.0.0' ... gem 'haml-rails' gem 'jquery-rails' group :test
I have such lines in Gemfile: group :test do ... gem 'cucumber', :git =>
I have this following Gemfile: source 'https://rubygems.org' gem 'rails', '3.2.1' group :assets do gem
I have the following in my Gemfile : gem 'rspec-rails', '2.8.1' Is there a
In my gemfile I've got: group :development do gem 'eventmachine', 1.0.0.beta.4.1 end and in
Here is my gemfile: source 'https://rubygems.org' gem 'rails', '3.2.2' # Bundle edge Rails instead:
I want to use the last version of rails, in my Gemfile: gem 'rails',

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.