我试图在本地安装字形图标,而不是从 CDN 中提取(由于我没有调查的原因,CDN 已停止显示它们)。现在运行assetic:dump会导致异常,我不知道如何修复:
me@server:/var/www/blah$ php app/console assetic:dump -vvv
Dumping all dev assets.
Debug mode is on.
20:26:32 [file+] /var/www/blah/app/../web/fonts/glyphicons-halflings-regular.eot
/var/www/blah/app/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.eot
20:26:32 [file+] /var/www/blah/app/../web/fonts/glyphicons-halflings-regular_glyphicons-halflings-regular_1.eot
/var/www/blah/app/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.eot
20:26:32 [file+] /var/www/blah/app/../web/fonts/glyphicons-halflings-regular.svg
/var/www/blah/app/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.svg
20:26:32 [file+] /var/www/blah/app/../web/fonts/glyphicons-halflings-regular_glyphicons-halflings-regular_1.svg
/var/www/blah/app/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.svg
20:26:32 [file+] /var/www/blah/app/../web/fonts/glyphicons-halflings-regular.ttf
/var/www/blah/app/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.ttf
20:26:32 [file+] /var/www/blah/app/../web/fonts/glyphicons-halflings-regular_glyphicons-halflings-regular_1.ttf
/var/www/blah/app/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.ttf
20:26:32 [file+] /var/www/blah/app/../web/fonts/glyphicons-halflings-regular.woff
/var/www/blah/app/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.woff
20:26:32 [file+] /var/www/blah/app/../web/fonts/glyphicons-halflings-regular_glyphicons-halflings-regular_1.woff
/var/www/blah/app/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.woff
20:26:32 [file+] /var/www/blah/app/../web/css/bootstrap.css
/var/www/blah/app/../vendor/twbs/bootstrap/less/bootstrap.less
[Exception]
.pull-right is undefined: line: 60
Exception trace:
() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:3465
lessc_parser->throwError() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:2008
lessc->throwError() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:685
lessc->compileProp() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:282
lessc->compileProps() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:220
lessc->compileCSSBlock() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:194
lessc->compileBlock() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:656
lessc->compileProp() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:282
lessc->compileProps() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:220
lessc->compileCSSBlock() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:194
lessc->compileBlock() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:656
lessc->compileProp() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:282
lessc->compileProps() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:235
lessc->compileMedia() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:197
lessc->compileBlock() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:656
lessc->compileProp() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:160
lessc->compileImportedProps() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:766
lessc->compileProp() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:282
lessc->compileProps() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:276
lessc->compileRoot() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:191
lessc->compileBlock() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:1810
lessc->compile() at /var/www/blah/vendor/leafo/lessphp/lessc.inc.php:1937
lessc->parse() at /var/www/blah/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessphpFilter.php:104
Assetic\Filter\LessphpFilter->filterLoad() at /var/www/blah/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php:62
Assetic\Filter\FilterCollection->filterLoad() at /var/www/blah/vendor/kriswallsmith/assetic/src/Assetic/Asset/BaseAsset.php:90
Assetic\Asset\BaseAsset->doLoad() at /var/www/blah/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php:65
Assetic\Asset\FileAsset->load() at /var/www/blah/vendor/kriswallsmith/assetic/src/Assetic/Asset/BaseAsset.php:99
Assetic\Asset\BaseAsset->dump() at /var/www/blah/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:151
Assetic\Asset\AssetCollection->dump() at /var/www/blah/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php:222
Symfony\Bundle\AsseticBundle\Command\DumpCommand->doDump() at /var/www/blah/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php:162
Symfony\Bundle\AsseticBundle\Command\DumpCommand->dumpAsset() at /var/www/blah/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php:61
Symfony\Bundle\AsseticBundle\Command\DumpCommand->execute() at /var/www/blah/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:244
Symfony\Component\Console\Command\Command->run() at /var/www/blah/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:904
Symfony\Component\Console\Application->doRunCommand() at /var/www/blah/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:191
Symfony\Component\Console\Application->doRun() at /var/www/blah/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/blah/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:121
Symfony\Component\Console\Application->run() at /var/www/blah/app/console:27
assetic:dump [--watch] [--force] [--period="..."] [write_to]
config.yml 包括:
assetic:
debug: %kernel.debug%
use_controller: false
filters:
cssrewrite: ~
lessphp:
apply_to: "\.less$"
file: "%kernel.root_dir%/../vendor/leafo/lessphp/lessc.inc.php"
assets:
fonts_glyphicons_eot:
inputs:
- "%kernel.root_dir%/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.eot"
output: "fonts/glyphicons-halflings-regular.eot"
fonts_glyphicons_svg:
inputs:
- "%kernel.root_dir%/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.svg"
output: "fonts/glyphicons-halflings-regular.svg"
fonts_glyphicons_ttf:
inputs:
- "%kernel.root_dir%/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.ttf"
output: "fonts/glyphicons-halflings-regular.ttf"
fonts_glyphicons_woff:
inputs:
- "%kernel.root_dir%/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.woff"
output: "fonts/glyphicons-halflings-regular.woff"
css_bootstrap:
inputs:
- "%kernel.root_dir%/../vendor/twbs/bootstrap/less/bootstrap.less"
output: "css/bootstrap.css"
filters:
- lessphp
js_bootstrap:
inputs:
- "%kernel.root_dir%/../vendor/twbs/bootstrap/js/*.js"
output: "js/bootstrap.js"
composer.json 包括:
"require": {
"twbs/bootstrap": "v3.0.0",
"components/jquery": "1.10.2",
"leafo/lessphp": "0.4.*@dev",
}
任何意见是极大的赞赏!