2016-11-24 66 views
1

我在我的本地機器上安裝的symfony 3.1.6的全新副本和我創建了一個簡單的項目,每一件事情進展順利,但是當我在詹金斯創建工作的開展構建我得到這個錯誤:類的Symfony 包 AsseticBundle AsseticBundle

[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
PHP Fatal error: Class 'Symfony\Bundle\AsseticBundle\AsseticBundle' not found in /var/lib/jenkins/workspace/projectfolder/app/AppKernel.php on line 29

這是我的作曲文件:

"require": { 
    "php": ">=5.5.9", 
    "symfony/symfony": "3.1.*", 
    "doctrine/orm": "^2.5", 
    "doctrine/doctrine-bundle": "^1.6", 
    "doctrine/doctrine-cache-bundle": "^1.2", 
    "symfony/swiftmailer-bundle": "^2.3", 
    "symfony/monolog-bundle": "^2.8", 
    "symfony/polyfill-apcu": "^1.0", 
    "sensio/distribution-bundle": "^5.0", 
    "sensio/framework-extra-bundle": "^3.0.2", 
    "incenteev/composer-parameter-handler": "^2.0", 
    "sonata-project/admin-bundle": "^3.9", 
    "sonata-project/doctrine-orm-admin-bundle": "^3.1", 
    "friendsofsymfony/user-bundle": "[email protected]", 
    "sonata-project/easy-extends-bundle": "^2.1", 
    "sonata-project/classification-bundle": "^3.1", 
    "sonata-project/core-bundle": "^3.1", 
    "sonata-project/media-bundle": "^3.3", 
    "symfony/assetic-bundle": "^2.8" 
}, 

任何幫助嗎?任何想法?

+0

檢查/供應商,以確保它的安裝 –

+0

我有一個文件夾命名爲供應商沒有供應商 –

回答

1

的問題是「.composer」文件夾不是在服務器上可寫的,所以我給它777

chmod 777 -R .composer 

,我解決了這個問題!

0

在我的新鮮Symfony3項目我使用的資產,我有我的composer.json沒有assetic包:

"require": { 
    "php": ">=5.5.9", 
    "symfony/symfony": "3.1.*", 
    "doctrine/orm": "^2.5", 
    "doctrine/doctrine-bundle": "^1.6", 
    "doctrine/doctrine-cache-bundle": "^1.2", 
    "symfony/swiftmailer-bundle": "^2.3", 
    "symfony/monolog-bundle": "^2.8", 
    "symfony/polyfill-apcu": "^1.0", 
    "sensio/distribution-bundle": "^5.0", 
    "sensio/framework-extra-bundle": "^3.0.2", 
    "incenteev/composer-parameter-handler": "^2.0", 
    "devio/pipedrive": "^1.0", 
    "google/recaptcha": "~1.1", 
    "friendsofsymfony/user-bundle": "[email protected]" 
}, 

什麼是你的目的是什麼?如果你只需要在模板中使用資產{{資產()}},那麼你就需要這個包。包括它,嘗試一下。

+0

結帳/vendor/composer/autoload_psr4.php – Rawburner

+0

應該有與行「Symfony的\\ \\捆綁\\ AsseticBundle」 =>陣列($ vendorDir。 '/ symfony的/ assetic束'),在它。如果沒有,運行作曲家重新安裝 – Rawburner

+0

它可以是一個解決辦法,但我需要這個包:( –

相關問題