How to create new Genie Application?

Viewed 61

I am trying to create new Genie application, as follows:

julia> Genie.newapp("MyGenieApp")

But, getting the following error:

[ Info: Done! New app created at /root/MyGenieApp
[ Info: Changing active directory to /root/MyGenieApp
ERROR: UndefVarError: LibGit2 not defined
Stacktrace:
 [1] pkgproject(::Pkg.Types.Context, ::String, ::String) at /opt/julia/julia-1.4.1/share/julia/stdlib/v1.4/packages/Genie/Uav0c/src/Generator.jl:482
 [2] (::Genie.Generator.var"#35#36")(::String) at /opt/julia/julia-1.4.1/share/julia/stdlib/v1.4/packages/Genie/Uav0c/src/Generator.jl:461
 [3] mktempdir(::Genie.Generator.var"#35#36", ::String; prefix::String) at ./file.jl:682
 [4] mktempdir at ./file.jl:680 [inlined] (repeats 2 times)
 [5] generate_project(::String) at /opt/julia/julia-1.4.1/share/julia/stdlib/v1.4/packages/Genie/Uav0c/src/Generator.jl:458
 [6] post_create(::String, ::String; autostart::Bool, testmode::Bool, dbsupport::Bool) at /opt/julia/julia-1.4.1/share/julia/stdlib/v1.4/packages/Genie/Uav0c/src/Generator.jl:669
 [7] newapp(::String; autostart::Bool, fullstack::Bool, dbsupport::Bool, mvcsupport::Bool, testmode::Bool) at /opt/julia/julia-1.4.1/share/julia/stdlib/v1.4/packages/Genie/Uav0c/src/Generator.jl:657
 [8] newapp(::String) at /opt/julia/julia-1.4.1/share/julia/stdlib/v1.4/packages/Genie/Uav0c/src/Generator.jl:634
 [9] top-level scope at REPL[34]:1
 [10] eval(::Module, ::Any) at ./boot.jl:331
 [11] eval_user_input(::Any, ::REPL.REPLBackend) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
 [12] run_backend(::REPL.REPLBackend) at /opt/julia/julia-1.4.1/share/julia/stdlib/v1.4/packages/Revise/OgnOk/src/packagedef.jl:1233
 [13] top-level scope at REPL[5]:0

Please guide me in creating new Genie Application.

2 Answers

With Julia 1.6 installed you can update Genie to v.3.3.0 and create an app using

using Genie

Genie.newapp_mvc("Watch tonight", dbadapter= :SQLite) 
""" DB adapter as mentioned is SQLite could pass MySQL and so on..."""

or

Genie.newapp("MyGenieApp")

as logan mentioned in the issue: Pkg did not have LibGit2 in Julia 1.4

Related