0

我们有一个 Gruntfile,它指定了我们在不同环境中构建 Javascript 的 Grunt 任务。

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

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

有什么方法可以让 Grunt 注意到系统上没有 Compass?否则,每个因此错误而中断的构建,但看起来好像是从外部传递的,都将难以为我们调试。

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.
4

0 回答 0