2

I am following along with this tutorial: https://genieframework.com/docs/tutorials/Developing-MVC-Web-Apps.html#connectingtothedatabase and have selected a MySQL database. When I go to connect the database, I get the following env error:

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

For reference, my connection.yml file looks like:

env: ENV["GENIE_ENV"]

dev:
  adapter: MySQL
  database: db/freeCodeCamp_articles.mysql
  host:
  username:
  password:
  port:
  config:
logankilpatrick
  • 13,148
  • 7
  • 44
  • 125
  • 2
    I need to check why this specific error regarding the "GENIE_ENV" config, so more details are needed regarding the way you run the app. However, what's clear, is that the configuration for MySQL is not correct. You would need to pass a database name (which is not a file, MySQL runs as a server) and host, username and password are required. I have opened a GitHub issue here https://github.com/GenieFramework/Genie.jl/issues/478 let's follow up there for more details. – essenciary Jan 31 '22 at 17:39

1 Answers1

0

You need to add SearchLightMySQL to the project by running Pkg add SearchLightMySQL

CHINONSO
  • 1
  • 1