guard / listen

The Listen gem listens to file modifications and notifies you about the changes.
https://rubygems.org/gems/listen
MIT License
1.92k stars 246 forks source link

Cannot initialise since last bundle update #150

Closed diggers closed 10 years ago

diggers commented 10 years ago

I'm getting the following error when running guard or bundle exec guard

/usr/local/rvm/gems/ruby-2.0.0-p195/gems/guard-1.4.0/lib/guard.rb:47:in `setup': uninitialized constant Listen::Turnstile (NameError)
    from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/guard-1.4.0/lib/guard.rb:155:in `start'
    from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/guard-1.4.0/lib/guard/cli.rb:104:in `start'
    from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/guard-1.4.0/bin/guard:6:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.0.0-p195/bin/guard:23:in `load'
    from /usr/local/rvm/gems/ruby-2.0.0-p195/bin/guard:23:in `<main>'
    from /usr/local/rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `eval'
    from /usr/local/rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `<main>'

This is my Gemfile:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'

gem 'mysql2'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

gem 'jquery-rails'
gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
gem 'active_model_serializers', git: 'https://github.com/rails-api/active_model_serializers.git'
gem 'ember-rails', github: 'emberjs/ember-rails'
gem 'handlebars-source', '1.0.0.rc4'

gem 'devise'
gem 'bcrypt-ruby'
gem 'ember-auth-rails'
gem 'cancan'

gem 'acts-as-taggable-on'

group :production do
  gem "newrelic_rpm"
end

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

group :development, :test do
  gem 'spork-rails', :github => 'sporkrb/spork-rails'
  gem 'rspec-rails'
  gem 'guard-rspec'
  gem 'rb-fsevent'
  gem 'shoulda-matchers'
  gem 'fabrication'
  gem 'quiet_assets'
  gem 'better_errors'
  gem 'binding_of_caller'
end

group :test do
  gem 'simplecov', :require => false
end

Thanks in advance, D

thibaudgg commented 10 years ago

Yep you need to update guard version (used by guard-rspec), do the following:

  1. Remove gem 'rb-fsevent' from your Gemfile. (it's a dependency of Listen now)
  2. Run bundle update guard-rpsec

It should run fine after that.

diggers commented 10 years ago

Thanks for your reply. However, I'm still getting the same error after following your suggestion.

Any clue?

thibaudgg commented 10 years ago

Mmm, can you give your Gemfile.lock as well please.

diggers commented 10 years ago

Here it goes:

GIT
  remote: git://github.com/emberjs/ember-rails.git
  revision: 2ef75c2b87dbdefde849a2a52a5ac54203f5b0dc
  specs:
    ember-rails (0.13.0)
      active_model_serializers
      barber (>= 0.4.1)
      ember-data-source
      ember-source
      execjs (>= 1.2)
      handlebars-source
      railties (>= 3.1)

GIT
  remote: git://github.com/seyhunak/twitter-bootstrap-rails.git
  revision: 70e6e63b0ee15962b623b2b04c87c35b0010e5c6
  specs:
    twitter-bootstrap-rails (2.2.8)
      actionpack (>= 3.1)
      execjs
      rails (>= 3.1)
      railties (>= 3.1)

GIT
  remote: git://github.com/sporkrb/spork-rails.git
  revision: 0dd45e59d3237b4c8f9efc215b46d9c07072a95e
  specs:
    spork-rails (4.0.0)
      rails (>= 3.0.0, < 5)
      spork (>= 1.0rc0)

GIT
  remote: https://github.com/rails-api/active_model_serializers.git
  revision: 919bb3840107e8176a65d90c0af8ec1e02cef683
  specs:
    active_model_serializers (0.8.1)
      activemodel (>= 3.2)

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.0.0)
      actionpack (= 4.0.0)
      mail (~> 2.5.3)
    actionpack (4.0.0)
      activesupport (= 4.0.0)
      builder (~> 3.1.0)
      erubis (~> 2.7.0)
      rack (~> 1.5.2)
      rack-test (~> 0.6.2)
    activemodel (4.0.0)
      activesupport (= 4.0.0)
      builder (~> 3.1.0)
    activerecord (4.0.0)
      activemodel (= 4.0.0)
      activerecord-deprecated_finders (~> 1.0.2)
      activesupport (= 4.0.0)
      arel (~> 4.0.0)
    activerecord-deprecated_finders (1.0.3)
    activesupport (4.0.0)
      i18n (~> 0.6, >= 0.6.4)
      minitest (~> 4.2)
      multi_json (~> 1.3)
      thread_safe (~> 0.1)
      tzinfo (~> 0.3.37)
    acts-as-taggable-on (2.4.1)
      rails (>= 3, < 5)
    arel (4.0.0)
    atomic (1.1.14)
    barber (0.4.2)
      ember-source
      execjs
      handlebars-source
    bcrypt-ruby (3.1.2)
    better_errors (1.0.1)
      coderay (>= 1.0.0)
      erubis (>= 2.6.6)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    builder (3.1.4)
    cancan (1.6.10)
    celluloid (0.15.2)
      timers (~> 1.1.0)
    coderay (1.1.0)
    debug_inspector (0.0.2)
    devise (3.1.1)
      bcrypt-ruby (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 3.2.6, < 5)
      thread_safe (~> 0.1)
      warden (~> 1.2.3)
    diff-lcs (1.2.4)
    ember-auth-rails (4.0.3)
      ember-auth-source
      rails
    ember-auth-source (6.0.5)
      ember-source (>= 0.0.2, != 1.0.0.rc1.2, != 1.0.0.rc1.1, != 1.0.0.rc1.0.0, != 1.0.0.pre4.1)
    ember-data-source (0.14)
      ember-source
    ember-source (0.0.9)
      handlebars-source (= 1.0.0.rc4)
    erubis (2.7.0)
    execjs (2.0.2)
    fabrication (2.8.1)
    ffi (1.9.0)
    guard (1.4.0)
      listen (>= 0.4.2)
      thor (>= 0.14.6)
    guard-rspec (2.5.4)
      guard (>= 1.1)
      rspec (~> 2.11)
    handlebars-source (1.0.0.rc4)
    hike (1.2.3)
    i18n (0.6.5)
    jquery-rails (3.0.4)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    json (1.8.0)
    listen (2.0.4)
      celluloid (>= 0.15.2)
      rb-fsevent (>= 0.9.3)
      rb-inotify (>= 0.9)
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.25)
    minitest (4.7.5)
    multi_json (1.8.1)
    mysql2 (0.3.13)
    newrelic_rpm (3.6.8.164)
    orm_adapter (0.4.0)
    polyglot (0.3.3)
    quiet_assets (1.0.2)
      railties (>= 3.1, < 5.0)
    rack (1.5.2)
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (4.0.0)
      actionmailer (= 4.0.0)
      actionpack (= 4.0.0)
      activerecord (= 4.0.0)
      activesupport (= 4.0.0)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.0.0)
      sprockets-rails (~> 2.0.0)
    railties (4.0.0)
      actionpack (= 4.0.0)
      activesupport (= 4.0.0)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.1.0)
    rb-fsevent (0.9.3)
    rb-inotify (0.9.2)
      ffi (>= 0.5.0)
    rdoc (3.12.2)
      json (~> 1.4)
    rspec (2.14.1)
      rspec-core (~> 2.14.0)
      rspec-expectations (~> 2.14.0)
      rspec-mocks (~> 2.14.0)
    rspec-core (2.14.5)
    rspec-expectations (2.14.3)
      diff-lcs (>= 1.1.3, < 2.0)
    rspec-mocks (2.14.3)
    rspec-rails (2.14.0)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec-core (~> 2.14.0)
      rspec-expectations (~> 2.14.0)
      rspec-mocks (~> 2.14.0)
    sdoc (0.3.20)
      json (>= 1.1.3)
      rdoc (~> 3.10)
    shoulda-matchers (2.4.0)
      activesupport (>= 3.0.0)
    simplecov (0.7.1)
      multi_json (~> 1.0)
      simplecov-html (~> 0.7.1)
    simplecov-html (0.7.1)
    spork (1.0.0rc4)
    sprockets (2.10.0)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sprockets-rails (2.0.0)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (~> 2.8)
    thor (0.18.1)
    thread_safe (0.1.3)
      atomic
    tilt (1.4.1)
    timers (1.1.0)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    tzinfo (0.3.38)
    uglifier (2.2.1)
      execjs (>= 0.3.0)
      multi_json (~> 1.0, >= 1.0.2)
    warden (1.2.3)
      rack (>= 1.0)

PLATFORMS
  ruby

DEPENDENCIES
  active_model_serializers!
  acts-as-taggable-on
  bcrypt-ruby
  better_errors
  binding_of_caller
  cancan
  devise
  ember-auth-rails
  ember-rails!
  fabrication
  guard-rspec
  handlebars-source (= 1.0.0.rc4)
  jquery-rails
  mysql2
  newrelic_rpm
  quiet_assets
  rails (= 4.0.0)
  rspec-rails
  sdoc
  shoulda-matchers
  simplecov
  spork-rails!
  twitter-bootstrap-rails!
  uglifier (>= 1.3.0)
thibaudgg commented 10 years ago

Mmm guard and guard-rspec hasn't updated, edit gem 'guard-rspec', '>= 4.0.3' and run bundle update guard-rpsec again. It'll maybe give you a nicer error.

diggers commented 10 years ago

I got the following error after making that change:

Resolving dependencies...
Bundler could not find compatible versions for gem "coderay":
  In Gemfile:
    guard-rspec (>= 4.0.3) ruby depends on
      coderay (~> 1.0.5) ruby

    better_errors (>= 0) ruby depends on
      coderay (1.1.0)

I removed gem 'better_errors' and run bundle. It complained guard-spork was missing. I added it to the Gemfile I got it to work again.

It looks like it was a dependency conflict.

You can close the ticket. Thanks again.

thibaudgg commented 10 years ago

Great to know that is resolved.