2013-08-25 2 views
0

Я пытаюсь установить MopaBootstrapBundle, я создал представление со следующим кодом:MopaBootstrapBundle Не удалось найти composer.phar

{% extends 'MopaBootstrapBundle::base.html.twig' %} 

{% block title %}Yourapp{% endblock %} 

{# and define more blocks ... #} 

, но когда я перейти к этой точке зрения, я получаю следующее исключение:

An exception has been thrown during the compilation of a template ("Unable to find file "@MopaBootstrapBundle/Resources/bootstrap/js/bootstrap-transition.js".") in "MopaBootstrapBundle::base.html.twig". 

Я считаю, что это может быть из-за не в состоянии установить мЕНЬШЕ, я получаю следующее сообщение об ошибке:

C:\xampp\htdocs\Project>php app/console mopa:bootstrap:symlink:less 
'which' is not recognized as an internal or external command, 
operable program or batch file. 
'which' is not recognized as an internal or external command, 
operable program or batch file. 



    [RuntimeException] 
    Could not find composer.phar 



mopa:bootstrap:symlink:less [-f|--force] [-m|--manual] [--no-symlink] [pathToTwi 
tterBootstrap] [pathToMopaBootstrapBundle] 

Даже если я установил композитор и она работает, когда я делаю следующее:

C:\xampp\htdocs\Project>composer install 
Loading composer repositories with package information 
Installing dependencies (including require-dev) from lock file 
Nothing to install or update 
Generating autoload files 
Updating the "app/config/parameters.yml" file. 
Clearing the cache for the dev environment with debug true 
Installing assets using the hard copy option 
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework 
Installing assets for FL\FifaLeagueBundle into web/bundles/fifaleague 
Installing assets for Mopa\Bundle\BootstrapBundle into web/bundles/mopabootstrap 

Installing assets for Acme\DemoBundle into web/bundles/acmedemo 
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodi 
stribution 
Checking Symlink ... OK 

Мой composer.json:

{ 
    "name": "symfony/framework-standard-edition", 
    "license": "MIT", 
    "type": "project", 
    "description": "The \"Symfony Standard Edition\" distribution", 
    "autoload": { 
     "psr-0": { "": "src/" } 
    }, 
    "repositories": [ 
     { 
      "type": "package", 
      "package": { 
       "name": "jquery/jquery", 
       "version": "1.9.1", 
       "dist": { 
        "url": "http://code.jquery.com/jquery-1.9.1.js", 
        "type": "file" 
       } 
      } 
     }, 
     { 
      "type": "package", 
      "package": { 
       "version": "master", 
       "name": "twbs/bootstrap", 
       "source": { 
        "url": "https://github.com/twbs/bootstrap.git", 
        "type": "git", 
        "reference": "master" 
       }, 
       "dist": { 
        "url": "https://github.com/twbs/bootstrap/zipball/master", 
        "type": "zip" 
       } 
      } 
     } 
    ], 
    "require": { 
     "php": ">=5.3.3", 
     "symfony/symfony": "2.3.*", 
     "doctrine/orm": ">=2.2.3,<2.4-dev", 
     "doctrine/doctrine-bundle": "1.2.*", 
     "twig/extensions": "1.0.*", 
     "symfony/assetic-bundle": "2.3.*", 
     "symfony/swiftmailer-bundle": "2.3.*", 
     "symfony/monolog-bundle": "2.3.*", 
     "sensio/distribution-bundle": "2.3.*", 
     "sensio/framework-extra-bundle": "2.3.*", 
     "sensio/generator-bundle": "2.3.*", 
     "incenteev/composer-parameter-handler": "~2.0", 
     "friendsofsymfony/user-bundle": "[email protected]", 
     "doctrine/doctrine-fixtures-bundle": "dev-master", 
     "doctrine/data-fixtures" : "dev-master",  
     "leafo/lessphp": "dev-master", 
     "mopa/bootstrap-bundle": "dev-master", 
     "twbs/bootstrap": "dev-master", 
     "knplabs/knp-paginator-bundle": "dev-master", 
     "knplabs/knp-menu": "2.0.*@dev", 
     "knplabs/knp-menu-bundle": "dev-master", 
     "craue/formflow-bundle": "dev-master" 
    }, 
    "scripts": { 
     "post-install-cmd": [ 
      "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 
      "Mopa\\Bundle\\BootstrapBundle\\Composer\\ScriptHandler::postInstallSymlinkTwitterBootstrap" 
     ], 
     "post-update-cmd": [ 
      "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 
      "Mopa\\Bundle\\BootstrapBundle\\Composer\\ScriptHandler::postInstallSymlinkTwitterBootstrap" 
     ] 
    }, 
    "config": { 
     "bin-dir": "bin" 
    }, 
    "minimum-stability": "stable", 
    "extra": { 
     "symfony-app-dir": "app", 
     "symfony-web-dir": "web", 
     "incenteev-parameters": { 
      "file": "app/config/parameters.yml" 
     }, 
     "branch-alias": { 
      "dev-master": "2.3-dev" 
     } 
    } 

} 

ответ

0

Ну, если вы посмотрите на source code, вы увидите, что ошибка исходит из библиотеки, неспособной найти ее в вашей системе, в частности, я предполагаю, что строка this терпит неудачу, потому что в окнах нет команды which.

Я предполагаю, что решением будет использовать файл composer.phar непосредственно в каталоге проекта.

0

Если вы изучите пакет twbs/bootstrap, вы можете обнаружить, что он установил среди других скриптов transition.js, но mopabootstrapbundle base.html.twig запрашивает bootstrap-transition.js. Если это так, я думаю, вам придется переименовать скрипты или изменить base.html.twig. У меня был twitter/bootstrap, который содержит bootstrap-transition.js, поэтому я скорректировал символическую ссылку. Я не уверен, что пакет на самом деле дает мне.

Смежные вопросы