Guard Rails 4 - 未初始化的常量Listen :: Turnstile(NameError)

时间:2013-10-15 16:37:13

标签: ruby-on-rails ruby ruby-on-rails-4

我遇到问题gem 'guard' ...下面是我的宝石文件。

完整的错误是:

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

你是如何得到防护及其依赖关系来使用rails4的?

  source 'http://rubygems.org'

  gem 'rails', '4.0.0'
  gem 'sendgrid'
  gem 'pg'
  gem 'simple_form'

  #assets
  gem 'sass-rails', '~> 4.0.0'
  gem 'uglifier', '>= 1.3.0'
  gem 'coffee-rails', '~> 4.0.0'
  gem 'jquery-rails'

  gem 'simple_form'

  gem 'omniauth'
  gem 'omniauth-facebook', '1.4.0'
  gem 'koala', '~> 1.7.0rc1'

  gem 'figaro'

  #deployment
  gem 'rubber', :git => 'https://github.com/rubber/rubber.git', :branch => 'master'
  gem 'therubyracer', :group => :assets

  #server
  gem 'unicorn'

  #photo processing and connecting to S3
  gem 'mini_magick', '~> 3.6.0'
  gem 'carrierwave'
  gem 'fog'

  group :test, :development do
    gem 'rspec-rails', '~> 2.0'
    gem 'shoulda-matchers'
    gem 'pry'
  end

  group :development do
    gem 'better_errors'
    gem 'binding_of_caller'
  end

  group :test do
    #fake data for testing
    gem 'faker'
    gem 'factory_girl_rails', '~> 4.2'

    gem 'database_cleaner', '~> 0.9'
    gem 'capybara'
    gem 'capybara-webkit', '~> 0.14'

    gem 'guard'
    gem 'guard-rspec'
    gem 'rb-fsevent'
  end
  gem 'open4'

2 个答案:

答案 0 :(得分:1)

这可能对您有所帮助,存在依赖性问题,错误更好https://github.com/danbartlett/opensit/issues/31

答案 1 :(得分:0)

您可以尝试使用guard

Gemfile中指定gem 'guard', '~> 2.1.1'版本