如果未安装Compass Gem,我可以阻止Grunt通过吗?

时间:2013-06-04 15:55:55

标签: javascript build gem compass-sass gruntjs

我们有一个Grunt文件,用于指定我们在不同环境中构建Javascript的Grunt任务。

它还包括构建SCSS文件的任务,这些任务依赖于Compass。当被触发时,Bundler会尝试执行Compass,如果没有安装则会失败。

Grunt任务似乎没有意识到这个错误,因为他们只是简单地说“完成,没有错误。”

有没有办法让Grunt注意到系统上没有指南针? 否则,每个在这个错误上打破的Build,但看起来好像从外部传递,将很难为我们调试。

Running "compass:production" (compass) task
/usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/resolver.rb:296:in `resolve': Could not find gem 'compass (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/resolver.rb:168:in `start'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/resolver.rb:129:in `block in resolve'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `catch'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `resolve'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:179:in `resolve'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
    from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
    from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'

[...]

Done, without errors.

0 个答案:

没有答案