在Sencha CMD中构建失败

时间:2013-02-06 14:03:48

标签: sencha-touch-2

我今天已经下载并安装了Sencha Touch 2.0,我观看了教程视频,一切顺利,直到我尝试构建应用程序。

首先我遇到了Compass的问题,教程没有提到必须安装Compass,因此不得不在你的系统上运行Ruby,然后安装指南针GEM,不过我把那部分排序没问题

下次我运行时,构建进展得更快,但仍然给了我一个错误,这次我看不到任何缺失的指标。也许我需要安装额外的SDK?

我正在运行Sencha Touch 2.1.0,使用Ruby 1.8.7和Windows 7操作系统的Sencha Command 3.0.2.28,cmd输出如下,如果有人有任何指针,那将是最受欢迎的。

[INF]           init-sencha-command:
[INF]
[INF]           init:
[INF]
[INF]           -before-app-build:
[INF]
[INF]           app-build-impl:
[INF]
[INF]           production:
[INF]
[INF]           -before-init-local:
[INF]
[INF]           -init-local:
[INF]
[INF]           -after-init-local:
[INF]
[INF]           init-local:
[INF]
[INF]           find-cmd:
[INF]
[INF]           -before-init:
[INF]
[INF]           -init:
[INF]
[INF]           -after-init:
[INF]
[INF]           init:
[INF]
[INF]           -before-build:
[INF]
[INF]           sass:
[INF]
[INF]           -before-sass:
[INF]
[INF]           -sass:
[INF]           [shellscript]
[INF]           [shellscript] C:\xampp\htdocs\MyApp\resources\sass>compass compi
le --boring --force
[INF]           [shellscript] C:/Ruby187/lib/ruby/1.8/optparse.rb:1450:in `compl
ete''': invalid option: --boring (OptionParser::InvalidOption)
[INF]           [shellscript]   from C:/Ruby187/lib/ruby/1.8/optparse.rb:1448:in
 `catch'''
[INF]           [shellscript]   from C:/Ruby187/lib/ruby/1.8/optparse.rb:1448:in
 `complete'''
[INF]           [shellscript]   from C:/Ruby187/lib/ruby/1.8/optparse.rb:1261:in
 `parse_in_order'''
[INF]           [shellscript]   from C:/Ruby187/lib/ruby/1.8/optparse.rb:1254:in
 `catch'''
[INF]           [shellscript]   from C:/Ruby187/lib/ruby/1.8/optparse.rb:1254:in
 `parse_in_order'''
[INF]           [shellscript]   from C:/Ruby187/lib/ruby/1.8/optparse.rb:1248:in
 `order!'''
[INF]           [shellscript]   from C:/Ruby187/lib/ruby/1.8/optparse.rb:1339:in
 `permute!'''
[INF]           [shellscript]   from C:/Ruby187/lib/ruby/1.8/optparse.rb:1360:in
 `parse!'''
[INF]           [shellscript]   from C:/Ruby187/lib/ruby/gems/1.8/gems/chrisepps
tein-compass-0.8.17/lib/compass/exec.rb:65:in `parse!'''
[INF]           [shellscript]   from C:/Ruby187/lib/ruby/gems/1.8/gems/chrisepps
tein-compass-0.8.17/lib/compass/exec.rb:35:in `initialize'''
[INF]           [shellscript]   from C:/Ruby187/lib/ruby/gems/1.8/gems/chrisepps
tein-compass-0.8.17/bin/compass:7:in `new'''
[INF]           [shellscript]   from C:/Ruby187/lib/ruby/gems/1.8/gems/chrisepps
tein-compass-0.8.17/bin/compass:7
[INF]           [shellscript]   from C:/Ruby187/bin/compass:23:in `load'''
[INF]           [shellscript]   from C:/Ruby187/bin/compass:23
[ERR]
[ERR]           BUILD FAILED
[ERR]           com.sencha.exceptions.BasicException: The following error occurr
ed while executing this line:
[ERR]           C:\xampp\htdocs\MyApp\.sencha\app\build-impl.xml:109: The follow
ing error occurred while executing this line:
[ERR]           jar:file:/C:/xampp/htdocs/sencha/Sencha/Cmd/3.0.2.288/sencha.jar
!/com/sencha/ant/antlib.xml:364: shellscript returned: 1
[ERR]                   at com.sencha.exceptions.BasicException.wrap(BasicExcept
ion.java:43)
[ERR]                   at com.sencha.cli.Command.dispatch(Command.java:104)
[ERR]                   at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR]                   at com.sencha.cli.AbstractCommand.dispatch(AbstractComma
nd.java:182)
[ERR]                   at com.sencha.ant.SenchaCommandTask.doExecute(SenchaComm
andTask.java:69)
[ERR]                   at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:2
2)
[ERR]                   at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR]                   at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]                   at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR]                   at org.apache.tools.ant.Target.performTasks(Target.java:
413)
[ERR]                   at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1399)
[ERR]                   at org.apache.tools.ant.Project.executeTarget(Project.ja
va:1368)
[ERR]                   at org.apache.tools.ant.helper.DefaultExecutor.executeTa
rgets(DefaultExecutor.java:41)
[ERR]                   at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1251)
[ERR]                   at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR]                   at com.sencha.ant.AntRunner.run(AntRunner.java:72)
[ERR]                   at com.sencha.command.BasePluginCommands$BasePluginComma
nd.run(BasePluginCommands.java:94)
[ERR]                   at com.sencha.command.BasePluginCommands$BasePluginComma
nd.run(BasePluginCommands.java:98)
[ERR]                   at com.sencha.command.BasePluginCommands$BaseNamePathCom
mand.run(BasePluginCommands.java:142)
[ERR]                   at com.sencha.command.app.AppCommands$BuildCommand.execu
te(AppCommands.java:116)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR]                   at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR]                   at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR]                   at com.sencha.command.Sencha.main(Sencha.java:71)
[ERR]           Caused by: C:\xampp\htdocs\MyApp\.sencha\app\build-impl.xml:117:
 The following error occurred while executing this line:
[ERR]           C:\xampp\htdocs\MyApp\.sencha\app\build-impl.xml:109: The follow
ing error occurred while executing this line:
[ERR]           jar:file:/C:/xampp/htdocs/sencha/Sencha/Cmd/3.0.2.288/sencha.jar
!/com/sencha/ant/antlib.xml:364: shellscript returned: 1
[ERR]                   at org.apache.tools.ant.ProjectHelper.addLocationToBuild
Exception(ProjectHelper.java:551)
[ERR]                   at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:44
4)
[ERR]                   at org.apache.tools.ant.taskdefs.CallTarget.execute(Call
Target.java:105)
[ERR]                   at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR]                   at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown
Source)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR]                   at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]                   at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR]                   at org.apache.tools.ant.Target.performTasks(Target.java:
413)
[ERR]                   at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1399)
[ERR]                   at org.apache.tools.ant.Project.executeTarget(Project.ja
va:1368)
[ERR]                   at org.apache.tools.ant.helper.DefaultExecutor.executeTa
rgets(DefaultExecutor.java:41)
[ERR]                   at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1251)
[ERR]                   at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR]                   at com.sencha.ant.AntRunner.run(AntRunner.java:80)
[ERR]                   at com.sencha.command.ant.AntCommand.execute(AntCommand.
java:75)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR]                   ... 31 more
[ERR]           Caused by: C:\xampp\htdocs\MyApp\.sencha\app\build-impl.xml:109:
 The following error occurred while executing this line:
[ERR]           jar:file:/C:/xampp/htdocs/sencha/Sencha/Cmd/3.0.2.288/sencha.jar
!/com/sencha/ant/antlib.xml:364: shellscript returned: 1
[ERR]                   at org.apache.tools.ant.ProjectHelper.addLocationToBuild
Exception(ProjectHelper.java:551)
[ERR]                   at org.apache.tools.ant.taskdefs.MacroInstance.execute(M
acroInstance.java:401)
[ERR]                   at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR]                   at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown
Source)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR]                   at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]                   at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR]                   at org.apache.tools.ant.Target.performTasks(Target.java:
413)
[ERR]                   at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1399)
[ERR]                   at org.apache.tools.ant.helper.SingleCheckExecutor.execu
teTargets(SingleCheckExecutor.java:38)
[ERR]                   at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1251)
[ERR]                   at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:44
2)
[ERR]                   ... 52 more
[ERR]           Caused by: jar:file:/C:/xampp/htdocs/sencha/Sencha/Cmd/3.0.2.288
/sencha.jar!/com/sencha/ant/antlib.xml:364: shellscript returned: 1
[ERR]                   at org.apache.tools.ant.taskdefs.ExecTask.runExecute(Exe
cTask.java:646)
[ERR]                   at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTa
sk.java:672)
[ERR]                   at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTa
sk.java:498)
[ERR]                   at net.sf.antcontrib.platform.ShellScriptTask.execute(Sh
ellScriptTask.java:132)
[ERR]                   at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR]                   at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown
Source)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR]                   at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]                   at org.apache.tools.ant.taskdefs.Sequential.execute(Sequ
ential.java:68)
[ERR]                   at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:19
7)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR]                   at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.
java:154)
[ERR]                   at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR]                   at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown
Source)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR]                   at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]                   at org.apache.tools.ant.taskdefs.Sequential.execute(Sequ
ential.java:68)
[ERR]                   at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:19
7)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR]                   at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.
java:154)
[ERR]                   at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR]                   at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown
Source)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
w
[ERR]           n Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR]                   at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]                   at org.apache.tools.ant.taskdefs.Sequential.execute(Sequ
ential.java:68)
[ERR]                   at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR]                   at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown
Source)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR]                   at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]                   at org.apache.tools.ant.taskdefs.MacroInstance.execute(M
acroInstance.java:398)
[ERR]                   ... 64 more
[ERR]
[ERR]           Total time: 12 seconds
[ERR]           com.sencha.exceptions.BasicException: The following error occurr
ed while executing this line:
C:\xampp\htdocs\MyApp\.sencha\app\build-impl.xml:109: The following error occurr
ed while executing this line:
jar:file:/C:/xampp/htdocs/sencha/Sencha/Cmd/3.0.2.288/sencha.jar!/com/sencha/ant
/antlib.xml:364: shellscript returned: 1

C:\xampp\htdocs\MyApp>

3 个答案:

答案 0 :(得分:1)

你安装了指南针吗?您可以在此处执行此操作:http://compass-style.org/install/

答案 1 :(得分:0)

看来你的指南针版本已经过时了。如updating it所述,尝试user799301。它可能会要求您升级到Ruby 1.9。

Sencha Cmd正在使用Compass 0.12.2和Ruby 1.9.3_p286为我工作,但是任何最新的版本都可以。

答案 2 :(得分:0)

我认为你的红宝石,指南针和/或sass版本已经过时了。此行表示罗盘存在问题:

...
[INF] [shellscript] C:\xampp\htdocs\MyApp\resources\sass>compass compile --boring --force
[INF] [shellscript] C:/Ruby187/lib/ruby/1.8/optparse.rb:1450:in `complete''': invalid option: --boring (OptionParser::InvalidOption)
...

我昨天在Windows 7上遇到了一些问题,让“sass build step”运行起来。

基本上我做的是:

  • http://www.sencha.com/products/sencha-cmd/download
  • 安装Sencha CMD版本3.0.2.288
  • http://rubyinstaller.org/
  • 安装ruby 1.9.3
  • 输入以下内容升级gem系统: gem update --system (版本1.8.25)
  • 安装指南针:gem install compass(版本为0.12.2)
  • 安装Sass 3.1.10,罗盘的依赖。请查看 gem search sass ,因为如果您安装了多个或更早版本的sass,则可能无法构建指南针。

如果你想跳过sass版本,你也可以尝试输入:

skip.sass=1  
sencha.cfg

中的

注意:我还遇到了这样一个问题:即使我安装了所有依赖项后,新生成的sencha touch app的构建也失败了,因为 {app中的app.css文件.dir} /resources/css/app.css 不见了。

还有两个有趣的页面描述了我发现的构建过程: