我正在关注本教程:https ://genieframework.com/docs/tutorials/Developing-MVC-Web-Apps.html#connectingtothedatabase并选择了一个 MySQL 数据库。当我去连接数据库时,我收到以下环境错误:
julia> include(joinpath("config", "initializers", "searchlight.jl"))
[ Info: Precompiling SearchLight [340e8cb6-72eb-11e8-37ce-c97ebeb32050]
┌ Warning: Module DataStructures with build ID 13086853553042 is missing from the cache.
│ This may mean DataStructures [864edb3b-99cc-5e75-8d2d-829cb0a9cfe8] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:1030
┌ Warning: Module DataStructures with build ID 13086853553042 is missing from the cache.
│ This may mean DataStructures [864edb3b-99cc-5e75-8d2d-829cb0a9cfe8] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:1030
[ Info: Skipping precompilation since __precompile__(false). Importing SortingAlgorithms [a2af1166-a08f-5f64-846c-94a0d3cef48c].
┌ Error: KeyError("GENIE_ENV")
└ @ Main ~/Desktop/freeCodeCampMVC/config/initializers/searchlight.jl:11
作为参考,我的connection.yml
文件如下所示:
env: ENV["GENIE_ENV"]
dev:
adapter: MySQL
database: db/freeCodeCamp_articles.mysql
host:
username:
password:
port:
config: