跳至主要内容

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.

评论

此博客中的热门博文

jquery on 的问题

return false  from  within a jQuery event handler  is effectively the same as calling both  e.preventDefault and  e.stopPropagation  on the passed  jQuery.Event object. e.preventDefault()  will prevent the default event from occuring,  e.stopPropagation()  will prevent the evet from bubbling up and  return false  will do both. Note that this behaviour differs from  normal  (non-jQuery) event handlers, in which, notably,  return false   does  not  stop the event from bubbling up . 所以on前半部分的selector必须是静态的。

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 connections s

工作合同 , 离职,工会 相关

转自战法: 平常受主管和同事歧视和欺负,准备把他们告到 Prud'hommes, 所以最近和工会的人走的比较近,学会如何 monter un dossier, 和一些保护自己的方法,特别想跟大家分享。 1. Il faut acter 也就是说,如果同事对你有行为或言语上的 Harcèlement, 当下不要过激,但是一定要给主管发一封邮件。 邮件可以保存下来作为证据。 邮件是 Daté 的,可以记录时间日期。 只要邮件是你发的,对方回不回都无所谓,因为你已经公开表示了不满。 如果是言语骚扰,邮件里一定要引用同事骚扰你的原话。 邮件不要有攻击性,你的请求一定是合理的,但是让对方很难回复。比如我主管不批我的RTT,因为他说“RTT不能半天半天的批”,于是工会的哥们帮我起草了一封邮件,就说“我这个月想提交RTT申请的时候,惊讶地发现四月份的申请被拒了。我不明白,全公司的员工都可以请半天的RTT,为什么我不行?而且你已经批了我三月份两个半天RTT的申请。“ 2. Prise d'acte 如果公司没有很好的履行合同,没有支付工资,同事对你有骚扰,甚至是暴力,等等,你就可以立刻终止你的合同。 这个很厉害,不要轻易使用。因为如果法官判定你的请求不合理,就要赔偿公司 Préavis 的钱。 相关链接: http://vosdroits.service-public.fr/F24409.xhtml http://www.journaldunet.com/management/pratique/contrats/4643/la-prise-d-acte.html http://www.juritravail.com/Actualite/prise-acte-rupture-par-salarie/Id/2136  (prise d'acte 和 démission 的区别) 3. 保存邮件 最好是把你所有的邮件都保存在U盘上,备份在自己家的电脑,以免公司突然给你来个 mise à pied, 你就没办法带走任何证据了。但是千万不要大张旗鼓地做,要不然公司就会怀疑你要做什么对公司不好的事。 4. 最有,一些有用链接: http://vosdroits.service-public.fr/particuliers/N19806.xh