0

我按照http://docs.sencha.com/extjs/4.2.0/#!/guide/theming中的步骤操作, 但是当我想通过sencha app build命令构建应用程序时出现以下错误。

(注意:我的操作系统是 win 7 x64,我使用ruby​​installer-2.0.0-p0-x64安装程序安装了 rubby,然后通过SenchaCmd-3.1.1.274-windows.exe安装程序安装了 Sencha 命令。我还通过常规命令提示符窗口和“使用 Ruby 启动命令提示符”,但错误相同。)

    [INF] executing compass using system installed ruby runtime
    NoMethodError on line ["23"] of D: undefined method `empty?' for nil:NilClass
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/sass-3.1.7/lib/sass/engine.rb:293:in `_render'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/sass-3.1.7/lib/sass/engine.rb:240:in `render'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/compiler.rb:140:in `block (2 levels) in compile'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/compiler.rb:139:in `block in compile'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/logger.rb:45:in `red'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/compiler.rb:138:in `compile'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/compiler.rb:118:in `compile_if_required'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/compiler.rb:103:in `block (2 levels) in run'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/compiler.rb:101:in `each'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/compiler.rb:101:in `block in run'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/compiler.rb:100:in `run'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/commands/update_project.rb:45:in `perform'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/bin/compass:30:in `block in <top (required)>'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/bin/compass:44:in `call'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/ge
    ms/compass-0.12.2/bin/compass:44:in `<top (required)>'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/bi
    n/compass:23:in `load'
      D:/Program Files/sencha/Sencha/Cmd/3.1.1.274/extensions/sencha-compass/gems/bi
    n/compass:23:in `<main>'
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExProcess: compass process exited with non-zero code
     : 1
    [ERR]
    [ERR] Total time: 1 minute 20 seconds
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.BasicException: The following error occurred while e
    xecuting this line:
    [ERR] D:\temp\my-workspace\theme-demo-app\.sencha\app\build-impl.xml:248: com.se
    ncha.exceptions.ExProcess: compass process exited with non-zero code : 1

[ERR]
[ERR] Total time: 1 minute 21 seconds
[ERR] com.sencha.exceptions.BasicException: The following error occurred while e
xecuting this line:
D:\temp\my-workspace\theme-demo-app\.sencha\app\build-impl.xml:248: com.sencha.e
xceptions.ExProcess: compass process exited with non-zero code : 1

在此之后,我通过gem install sass命令安装了 SASS,它安装了 SASS 3.2.8(虽然 Sencha Command 说我们自己安装 SASS 时不需要安装它:Introduction to Sencha Cmd)......但是同样的错误。

我还通过gem install compass(版本:0.12.2)安装了指南针并Sencha app build再次执行命令......并收到同样的错误......

有什么帮助吗?!

4

1 回答 1

2

我有同样的问题。似乎 extjs 与 ruby​​ 版本 2.x 不兼容我读到一些用户遇到了同样的问题。

卸载 ruby​​ 2 并安装 1.9.3 后它应该可以工作。

PS 正如我从文档中了解到的那样,您不需要安装 sass 和 compass,因为它已经是 sencha cmd 的一部分

于 2013-05-01T12:18:53.370 回答