布法罗测试错误的一个新项目,我创建了这个命令。
buffalo new coke --db-type sqlite3
buffalo test
下面是错误:
[POP] 2023/02/23 13:43:02 warn - unable to load connection development: could not create new connection: sqlite3 support was not compiled into the binary
[POP] 2023/02/23 13:43:02 warn - unable to load connection test: could not create new connection: sqlite3 support was not compiled into the binary
[POP] 2023/02/23 13:43:02 warn - unable to load connection production: could not create new connection: sqlite3 support was not compiled into the binary
Usage:
buffalo test [flags]
Flags:
-h, --help help for test
ERRO[0000] Error: could not find connection named test
在这个项目上运行测试之前,我错过了什么吗?请让我知道。谢谢
1条答案
按热度按时间34gzjxbg1#
输出的第二行,
正如您在此处所看到的,根本原因是您的
buffalo
二进制文件未编译为支持SQLite3。您是如何安装它的?如果您使用go install
,则应使用-tags sqlite
选项,因此类似这样的命令应为有关更多安装选项,请参阅文档。
https://gobuffalo.io/documentation/getting_started/installation/#custom-installation-with-sqlite3-support