Kunstmaan / KunstmaanBundlesStandardEdition

The "Kunstmaan Bundles Standard Edition" distribution
http://bundles.kunstmaan.be
MIT License
89 stars 39 forks source link

Installation fails on `app/console assetic:dump` #155

Closed laymain closed 9 years ago

laymain commented 9 years ago

On windows, the following installation step fails app/console assetic:dump:

 An error occurred while running:
  "/usr/local/bin/node" "/usr/local/bin/uglifyjs" "--compress" ...

It fails because node, uglifyjs and uglifycss are not installed in /usr/local/bin/.

It seems that the config_dev.yml file should not refers to absolute path:

assetic:
    use_controller: "%use_assetic_controller%"
    node: /usr/local/bin/node
    filters:
        uglifyjs2:
            bin: /usr/local/bin/uglifyjs
            compress: true
        uglifycss:
            bin: /usr/local/bin/uglifycss

https://github.com/Kunstmaan/KunstmaanBundlesStandardEdition/blob/8e64931e2ee0e931c3b81b7179536ecfda2f764c/app/config/config_dev.yml#L32-40

denbatte commented 9 years ago

Did everything worked on Windows after you changed all the node uglify paths?

laymain commented 9 years ago

I use Mingw to have an "unix-like" environment (the bundle won't work with a standard windows command prompt). But paths are mixed up between unix style and windows style.

I finally went through the uglify step by using windows style path in the config_dev.yml file:

assetic:
    use_controller: "%use_assetic_controller%"
    node: "d:\\Programs\\nodejs\\node"
    filters:
        uglifyjs2:
            bin: "C:\\Users\\Laymain\\AppData\\Roaming\\npm\\node_modules\\uglify-js\\bin\\uglifyjs"
            compress: true
        uglifycss:
            bin: "C:\\Users\\Laymain\\AppData\\Roaming\\npm\\node_modules\\uglifycss\\uglifycss"

But the next step failed:

 [Assetic\Exception\FilterException]
  An error occurred while running:
  "C:\Ruby22-x64\bin\ruby.EXE" "C:\Ruby22-x64\bin\sass.BAT" "--load-path" "D:\Projects\test-win\vendor\kunstmaan\bundles-cms\src\Kunstmaan\Ad
  minBundle/Resources/ui/scss" "--scss" "--load-path" "D:\Projects\test-win\app/../web" "--cache-location" "D:\Projects\test-win\app\ca
  che\dev" "C:\Users\Laymain\AppData\Local\Temp\assC95.tmp"
  Error Output:
  C:/Ruby22-x64/bin/sass.BAT:1: syntax error, unexpected tCONSTANT, expecting end-of-input
  Input:
  /* ==========================================================================
     Kunstmaan Bundles CMS
     Include your theme's main-file here
     This file is exclusively intended for setting up imports
     Never add styles directly to this file
     ========================================================================== */
  @import "default-theme/main";

I have spent really too much time on trying to make it work on windows so I just gave up.

I don't really know why I was trying this on windows, I have my development Ubuntu virtual machine, so I've just installed the bundle on it and all went fine.

denbatte commented 9 years ago

Hi Laymain,

Thank you for trying it on Windows, to bad it didn't work out. It is possible though because we had (have?) some users working on Windows.

At Kunstmaan we use mac and linux so we know it works on these OS'es. Glad it all worked out on Ubuntu.