[英]CakeDC users plugin: How can i install cakedc users plugin, i have read the documentation
https://github.com/cakedc/users/tree/2.0
After extracting the cakedc users plugin i copied it to app/Plugin folder. 解压缩cakedc用户插件后,我将其复制到app / Plugin文件夹。
I ran this command and got error: 我运行了此命令并收到错误消息:
cake migration all -plugin users
Why is this error? 为什么会出现此错误? It's cakephp-2.0 and after extracting the users plugin, i see the convention of the folders are like cakehp-1.3
它是cakephp-2.0,解压缩了用户插件后,我看到文件夹的约定就像cakehp-1.3
Error: Shell class MigrationShell could not be found.
#0 /var/www/cakephp/lib/Cake/Console/ShellDispatcher.php(167): ShellDispatcher->_getShell('migration')
#1 /var/www/cakephp/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
#2 /var/www/cakephp/lib/Cake/Console/cake.php(24): ShellDispatcher::run(Array)
#3 {main}
How can i install this users plugin and use it ? 如何安装和使用此用户插件?
In case someone will search this, here's how to use Migrations and Users plugins from CakeDC with CakePHP 2.x: 万一有人会搜索,这是在CakePHP 2.x中使用来自CakeDC的Migrations和Users插件的方法:
1) Make sure you downloaded correct branches (2.0) from git. 1)确保您从git下载了正确的分支(2.0)。 It can be checked by camel-cased directory names of plugins
可以通过驼峰式插件目录名称进行检查
2) Place them inside app/Plugins/ with corresponding names: Migrations
and Users
2)将它们放入具有相应名称的app / Plugins /中:
Migrations
和Users
3) make sure you loaded plugins by including them in app/Config/bootstrap.php like: CakePlugin::load('Migrations');
3)确保通过在app / Config / bootstrap.php中包含插件来加载插件,例如:
CakePlugin::load('Migrations');
4) to import Users plugins scheme go to app/ and run command ./Console/cake Migrations.migration all --plugin Users
4)要导入Users插件方案,请转到app /并运行命令
./Console/cake Migrations.migration all --plugin Users
This sequence worked for me. 这个顺序对我有用。 Hope it will help someone else.
希望它会帮助别人。 If there are any improvements to this - all are welcome.
如果对此有任何改进-都欢迎。
Syntax is a bit wrong on the docs. 语法在文档上有点错误。 For migration, (first install the CakeDC Migrations plugin) you should run ..
对于迁移,(首先安装CakeDC Migrations插件)应运行..
Console/cake Migrations.migration run all --plugin Users
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.