我有来自 Laravel 的github repo的最新 Laravel 4 beta 5 版本。
我已经构建了一个简单的 Web API,它运行良好。我想将项目复制到另一个文件夹并继续从副本中处理它。但是,当我尝试这样做时,我收到以下错误消息:
InvalidArgumentException
Driver [native] not supported.
/Users/tolga/Sites/l4api-copy/bootstrap/compiled.php
Line 10908: throw new \InvalidArgumentException("Driver [{$driver}] not supported.");
这是我为了复制项目所做的:
[/Users/tolga/Sites] $ cp -R l4api l4api-copy
[/Users/tolga/Sites] $ chmod -R 755 l4api-copy
它没有用,所以我尝试了:
[/Users/tolga/Sites] $ chmod -R 777 l4api-copy/app/storage
还是不行,尝试运行composer dump-autoload:
[/Users/tolga/Sites] $ cd l4api-copy
[/Users/tolga/Sites/l4api-copy] $ composer.phar dump-autoload
Generating autoload files
[/Users/tolga/Sites/l4api-copy] $
同样的错误。我还尝试删除该app/storage
文件夹并重新创建它。
[/Users/tolga/Sites/l4api-copy] $ rm -Rf app/storage
[/Users/tolga/Sites/l4api-copy] $ mkdir app/storage
[/Users/tolga/Sites/l4api-copy] $ chmod -R 777 app/storage/
这是一个全新的错误:
ErrorException
Warning: file_put_contents(/Users/tolga/Sites/l4api-copy/bootstrap/../app/storage/meta/services.json):
failed to open stream: No such file or directory in
/Users/tolga/Sites/l4api-copy/bootstrap/compiled.php line 5507
Line 5507: return file_put_contents($path, $contents);
composer.phar dump-autoload
清空app/storage
文件夹后,我也再次运行命令。
最后,我也尝试过composer.phar install
:
[/Users/tolga/Sites/l4api-copy] $ composer.phar install
Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating autoload files
[/Users/tolga/Sites/l4api-copy] $
以上都没有帮助。我究竟做错了什么?复制工作项目的正确方法是什么?