Frage

I was running Test::Unit with Guard and am trying to switch over to RSpec.

I'm running Mac OSX and can't seem to get rb-fsevent working. When I start Guard I get a message "[Listen warning]: Listen will be polling changes. Learn more at https://github.com/guard/listen#polling-fallback."

I have tried various approaches:

  • "gem install rb-fsevent" (as per railscast 275)
  • Adding rb-fsevent to my Gemfile (see below)
  • Specifying a rb-fsevent version (e.g. 0.9.1)
  • Re-starting Guard, Rails & the whole system

Gemfile (as recommended in Michael Hartl's Ruby on Rails Tutorial):

    group :development, :test do
      gem "rspec-rails"
      gem "guard-rspec"
    end

    group :test do
      gem 'rb-fsevent'
    end

Edit:

I also tried including rb-fsevent to the development group (recommended in Railscast 264):

    group :development, :test do
      gem "rspec-rails"
      gem "guard-rspec"
      gem 'rb-fsevent'
    end

However I got the same error. One clue may be that if I run guard without bundle exec then I get "Guard here! It looks like your project has a Gemfile, yet you are running guard outside of Bundler." bundle exec doesn't seem to be necessary in the tutorials.

Any ideas on what might be going wrong, or how I could get more information on the problem?

War es hilfreich?

Lösung

I've the same problem starting with Listen 0.5.0 and an issue has already been reported. Until it's resolved, you can simply use the previous version of Listen by adding:

gem 'listen', '0.4.7'

to your Gemfile and run bundle update.

Andere Tipps

move gem 'rb-fsevent' inside group :development, :test block

(because guard is running in development env)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top