我正在研究Symfony2.I我正在使用SVN。所以问题是我的代码运行正常。当我提交代码并在另一台笔记本电脑上更新并运行代码时,它会给我这样的错误
FileLoaderLoadException: Cannot load resource "."
当我清除缓存然后我收到此错误
[Symfony\Component\Config\Exception\FileLoaderLoadException]
Cannot load resource ".".
我不明白实际问题是什么。 我通过此命令安装资产
php app/console assets:install web
但仍然是同样的问题。如何解决此错误。
routing.yml
admin:
resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
prefix: /admin
_sonata_admin:
resource: .
type: sonata_admin
prefix: /admin
sonata_user:
resource: '@SonataUserBundle/Resources/config/routing/admin_security.xml'
prefix: /admin
sonata_user_security:
resource: "@SonataUserBundle/Resources/config/routing/sonata_security_1.xml"
sonata_user_resetting:
resource: "@SonataUserBundle/Resources/config/routing/sonata_resetting_1.xml"
prefix: /resetting
sonata_user_profile:
resource: "@SonataUserBundle/Resources/config/routing/sonata_profile_1.xml"
prefix: /profile
sonata_user_register:
resource: "@SonataUserBundle/Resources/config/routing/sonata_registration_1.xml"
prefix: /register
sonata_user_change_password:
resource: "@SonataUserBundle/Resources/config/routing/sonata_change_password_1.xml"
prefix: /profile
gallery:
resource: '@SonataMediaBundle/Resources/config/routing/gallery.xml'
prefix: /media/gallery
media:
resource: '@SonataMediaBundle/Resources/config/routing/media.xml'
prefix: /media
答案 0 :(得分:0)
您是否提交了文件夹缓存? (你不能)
我部署时总是在我的项目中使用SVN
svn update
cache:clear --env=prod
assets:install
assetic:dump
这很好(您可以使用phing
计算机化)