CodeSlave
CodeSlave

Reputation: 457

Symfony - Fatal error: Uncaught exception 'Twig_Error_Loader'

I want to deploy a symfony project to production but I get the following exception

Fatal error: Uncaught exception 'Twig_Error_Loader' with message 'The "/home/technqoc/public_html\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle/Resources/views" directory does not exist.' in /home/technqoc/public_html/vendor/twig/twig/lib/Twig/Loader/Filesystem.php:93

I suspect it's because of the way the server is trying to access the directory. How can I change the backslash to forward slash in the directory path?

Upvotes: 4

Views: 8446

Answers (2)

saeed asalisaf
saeed asalisaf

Reputation: 93

Simply clear any file and folder in cache directory.

Upvotes: 5

Francesco Abeni
Francesco Abeni

Reputation: 4265

As @HPierce pointed out, I think you have to run "composer install" to rebuild the autoloader according to your local environment, or it will try to use the folder structure of another server.

Upvotes: 4

Related Questions