我按照http://docs.sencha.com/extjs/4.2.0/#!/guide/theming中的步骤进行操作
但是当我想通过sencha app build
命令构建应用程序时,会出现以下错误。
(注意:我的操作系统是win 7 x64,我使用 rubyinstaller-2.0.0-p0-x64 安装程序安装了rubby,然后通过 SenchaCmd-3.1.1.274安装了Sencha Command -windows.exe 安装程序。我还通过常规命令提示符窗口和“使用Rubby启动命令提示符”运行提到的命令,但错误是相同的。)
[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
命令...并收到相同的错误...
任何帮助?!
答案 0 :(得分:2)
我遇到了同样的问题。 似乎extjs与ruby版本2.x不兼容我读到一些用户遇到了同样的问题。
卸载ruby 2并安装1.9.3后,它应该可以正常工作。
PS 据我所知,你不需要安装sass和指南针,因为它已经是sencha cmd的一部分