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

  • Home
  • SEARCH
  • 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 4331548
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:07:32+00:00 2026-05-21T10:07:32+00:00

In the rails project I’m working on I inserted support for rspec, cucumber and

  • 0

In the rails project I’m working on I inserted support for rspec, cucumber and autotest with this Gemfile (partial)

gem 'rspec-rails'
gem 'cucumber-rails'
gem 'autotest-standalone'
gem 'autotest-rails-pure'
gem 'zentest-without-autotest'

however in order to run tests with autotest i need to execute bundle exec autotest otherwise it fails with this message

$ autotest 
loading autotest/cucumber_rails_rspec_rspec2
Error loading Autotest style autotest/cucumber_rails_rspec_rspec2 (no such file to load -- autotest/cucumber_rails_rspec_rspec2). Aborting.

Now I’m developing on a Mac and I’d like to enable autotest-growl and autotest-fsevents gem, but if I insert those lines in my ~/.autotest

require 'autotest/growl'
require 'autotest/fsevent'

then I need to insert the corresponding gems in the Gemfile and everything works, but it breaks builds on my CI server (which is on Linux)

How to solve this without maintaining a different Gemfile for local and CI environments?

EDIT:

For the moment I solved with these lines in Gemfile

if RUBY_PLATFORM.downcase.include?("darwin") # I'm on Mac
  gem 'autotest-fsevent'
  gem 'autotest-growl'
end

It works both locally and on the CI server, I don’t know if it mess something, for the moment it seems to work flawlessly.

Any cleaner way to do that is still welcome.

EDIT2:

I switched to groups solutions. While the previous monkeypatch works pretty well both in development and for continuous integration, it will gives you an error in production if you use capistrano bundler tasks for deployments or if you use bundle install --deployment option (which is advised in production)

When using the if RUBY_PLATFORM.downcase.include?("darwin") line you’ll get this error on deploy.

# bundle install --deployment --without development test
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.

You have deleted from the Gemfile:
* autotest-fsevent
* autotest-growl

So my final solution to this problem is to include platform specific gems in a given group, say osx, and then in production and on CI server exclude it using bundle.

If you use capistrano to deploy put this in your config.rb

set :bundle_without,  [:development, :test, :osx]
# capistrano bundler task
require "bundler/capistrano"
  • 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-05-21T10:07:33+00:00Added an answer on May 21, 2026 at 10:07 am

    You might want to use groups in your gemfile, something like:

    group :development do
      gem "autotest-growl"
      gem "autotest-fsevents"
    end

    and on the server you use: $ bundle install --without development

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

Sidebar

Related Questions

Rails 3.0.0, Passenger 2.2.15: Create a new Rails project Add gem 'paperclip', :git =>
I'm writing my first Gem for a Rails project, and looking for in depth
Ok, so in my rails project. I'm getting this error, any help? class SearchController
I have a legacy Rails project (2.4) that used to work in Netbeans. But
I'm building my first Rails project - its a ToDo app, which are supposed
I integrated google maps in my rails project using ym4r_gm. I want to customize
So I have a Git project, and we (a mostly typical Rails project) have
I am trying to install LESS in a Ruby on Rails project. I am
Trying to setup a windows development machine for a Rails project that has a
Hey guys, when I first begin a rails project, the model user was designed

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.