跳至主要内容

symfony2 assetic:dump error

This is really a bad documented feature. i try to find out the reason for why i always get error like:
'stty' 不是内部或外部命令,也不是可运行的程序 或批处理文件。
if i write this in my config.yml
assetic:
    debug:          %kernel.debug%
    use_controller: false
    java: "C:/Progra~1/Java/jre7/bin/java.exe"

should say, if you type: "C:\\Program File\\..." does not work, you need it "Progra~1" but even with this, i got error :
 

[file+] D:/workspace/symfony_bannieres/app/../web/js/vendors/core.js
'stty' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
[RuntimeException]
 用法: java [-options] class [args...]
            (执行类)
    或  java [-options] -jar jarfile [args...]
            (执行 jar 文件)
 其中选项包括:
     -d32        使用 32 位数据模型 (如果可用)
     -d64        使用 64 位数据模型 (如果可用)
     -client     选择 "client" VM
     -server     选择 "server" VM
     -hotspot    是 "client" VM 的同义词 [已过时]
                   默认 VM 是 client.

     -cp <目录和 zip/jar 文件的类搜索路径>
     -classpath <目录和 zip/jar 文件的类搜索路径>
                   用 ; 分隔的目录, JAR 档案
                   和 ZIP 档案列表, 用于搜索类文件。
     -D=
                   设置系统属性
     -verbose[:class|gc|jni]
                   启用详细输出
     -version      输出产品版本并退出
     -version:
                   需要指定的版本才能运行
     -showversion  输出产品版本并继续
     -jre-restrict-search | -no-jre-restrict-search
                   在版本搜索中包括/排除用户专用 JRE
     -? -help      输出此帮助消息
     -X            输出非标准选项的帮助
     -ea[:...|:]
     -enableassertions[:...|:]
                   按指定的粒度启用断言
     -da[:...|:]
     -disableassertions[:...|:]
                   禁用具有指定粒度的断言
     -esa | -enablesystemassertions
                   启用系统断言
     -dsa | -disablesystemassertions
                   禁用系统断言
     -agentlib:[=]
                   加载本机代理库 , 例如 -agentlib:hprof
                   另请参阅 -agentlib:jdwp=help 和 -agentlib:hprof=help
     -agentpath:[=]
                   按完整路径名加载本机代理库
     -javaagent:[=]
                   加载 Java 编程语言代理, 请参阅 java.lang.instrument
     -splash:
                   使用指定的图像显示启动屏幕
 有关详细信息, 请参阅 http://java.sun.com/javase/reference
so ,well, i do not know the reason. and another post says:
Let's start with the easy stuff. A working version of the config.yml can look like this:
assetic:
  debug: false
  use_controller: false
  java: C:\Program Files (x86)\Java\jre6\bin\java.exe
  sass: C:\Program Files (x86)\Ruby192\bin\sass.bat
  filters:
    scss: ~
    yui_js:
      jar: %kernel.root_dir%\Resources\java\yuicompressor-2.4.6.jar
For some reason, assetic is always importing a whole directory for scss, so I had to make a combine.scss which imports the other scss files in the correct order.
And now it gets ugly, as one have to change the assetics core in order to get this working. The developers of assetic know this bug and I think it is fixed in some development trunk/branch but not the stable one.
The Assetic\Util\ProcessBuilder has to be changed on line 95
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
,line 103
$script .= ' '.implode(' ', array_map('escapeshellarg', $args));
and line 110
return new Process($script, $this->cwd, null, $this->stdin, $this->timeout, $options);
I hope this bug get fixed soon and till then anybody trying to get it working finds this thread... Took me like 8 hours of debuging, reading and trying different approaches.
corresponding to this post:
which ask us to change assetic files. but it is a bug not fixed in this version.
well, finally, i make it works well in ubuntu, without java parameter.

评论

此博客中的热门博文

My childhood

"Each person's life is like a book; some people prefer to savor it slowly, while others like to gradually forget it. Looking back, I want to see if I can discern the trajectory of the world from my seemingly insignificant life. I am a child from the countryside, and perhaps most people cannot understand what my so-called countryside looks like. Indeed, the impressions of the countryside can be very different depending on the country, and moreover, more than 40 years have passed, during these 40 years of rapid development in China. A phrase suddenly comes to mind, 'I see him building tall buildings, I see him feasting, I see everything collapsing.' The place where I was born is a small town in the southwest of China, a town so small that it only has one street, and the widest part is only 3 meters. Paved with stone slabs, worn by many years of use, the slabs are not flat but rather filled with small bumps and hollows, yet strangely smooth. At the end of the street is a ...

对于GFW的看法

谈到这个问题的人很多,讲的也非常详细,但我窃以为大多数人对此都不够重视。在这一点上来讲,国民党堪称楷模,我想台湾能有今日,很大程度上是因为他们最终也没有建立一个可以堪比中国的新闻审查制度。从权利集中的角度来讲,中国共产党并不比任何一个封建王朝差,从执行力度上来讲,那也和历史上最严酷的王朝可以评分秋色。至少,国民党还是讲点道德,尊重文化的。 如果说计划生育阉割了中国人的人口,那么GFW,和新闻出版署以及文化部阉割了中国人的精神。也许乐观的人说我们总可以翻墙,我们总可以通过这样那样的方法来获得信息。但是悲观的我并不这么认为,这种限制创造的是一种环境,是空气,你固然可以戴着口罩,但是你永远无法自由的呼吸,当大家都在这样的空气中活着的时候,戴着口罩的你是会被人另眼相看的。其实群体意识在掌握了所有媒体的政府面前就是一个面团,想怎么捏就怎么捏,本来就是信息不对称的更何况还是受到随意控制的。这是无解的,中国亟待提高公民意识,哲学思想,文化水平,等等,政府做的不过是又一轮的愚民罢了。鲁迅先生为之殚精极虑,奋斗一生的东西,过了一个世纪依然没有什么本质的改变,阿Q在国人里占的比例是在太大了。就好比是我以诚待国人,以心侍之,以身献之,奈何国人谓之以“傻逼”。你却又待何如?这样的文化封锁,信息封锁导致的唯一结果就是,你振臂一呼之时,便是阿Q们结队去看你被看头之日。 其实,中国政府早已脱离了共产主义这个哲学思想了。换句话说,这个哲学思想本身是没什么对错的,只是一旦应用起来就满不是那么回事了,几乎可以说,共产主义的集权必然导致共产主义的被抛弃。

chrome extension Error: attempting to use a disconnected prot object

if you get this error: Port error: Could not establish connection. Receiving end does not exist. miscellaneous_bindings:236 chromeHidden.Port.dispatchOnDisconnect miscellaneous_bindings:236 Uncaught Error: Attempting to use a disconnected port object miscellaneous_bindings:58 PortImpl.postMessage miscellaneous_bindings:58 responseCallback miscellaneous_bindings:143 xhr.onreadystatechange That means you have make some mistake as this discussed: This is caused when a connection get closed. For example if you open a tab that has the content_script injected, it opens a connection, the tab is closed, and then the background_page tries to pass a message. It will fail because the tab is no longer active to receive the message. In your case I would guess that as tabs close and new tabs open you are attempting to post messages with the old tabId instead of creating a new connection to the new tab. I would recommend reading through the  long-lived connectio...