首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Julia-Genie创建新资源时出错

使用Julia-Genie创建新资源时出错
EN

Stack Overflow用户
提问于 2018-05-09 07:50:46
回答 1查看 367关注 0票数 1

在Genie (http://genieframework.com/)中

我尝试使用以下命令创建一个新的资源名“Toto”

代码语言:javascript
复制
./bin/repl --resource:new=Toto

我得到以下错误:

代码语言:javascript
复制
ERROR: LoadError: UndefVarError: SearchLight not defined
execute(::Genie.Configuration.Settings) at /home/vlaugier/.julia/v0.6/Genie/src/Commands.jl:38
run() at /home/vlaugier/.julia/v0.6/Genie/src/Genie.jl:52
eval(::Module, ::Any) at ./boot.jl:235
eval_ew_expr at ./distributed/macros.jl:116 [inlined]
(::Base.Distributed.##135#136{Base.Distributed.#eval_ew_expr,Tuple{Expr},Array{Any,1}})() at ./distributed/remotecall.jl:314
run_work_thunk(::Base.Distributed.##135#136{Base.Distributed.#eval_ew_expr,Tuple{Expr},Array{Any,1}}, ::Bool) at ./distributed/process_messages.jl:56
#remotecall_fetch#140(::Array{Any,1}, ::Function, ::Function, ::Base.Distributed.LocalProcess, ::Expr, ::Vararg{Expr,N} where N) at ./distributed/remotecall.jl:339
remotecall_fetch(::Function, ::Base.Distributed.LocalProcess, ::Expr, ::Vararg{Expr,N} where N) at ./distributed/remotecall.jl:339
#remotecall_fetch#144(::Array{Any,1}, ::Function, ::Function, ::Int64, ::Expr, ::Vararg{Expr,N} where N) at ./distributed/remotecall.jl:367
remotecall_fetch(::Function, ::Int64, ::Expr, ::Vararg{Expr,N} where N) at ./distributed/remotecall.jl:367
(::##13#15)() at ./distributed/macros.jl:102
#remotecall_fetch#140(::Array{Any,1}, ::Function, ::Function, ::Base.Distributed.LocalProcess, ::Expr, ::Vararg{Expr,N} where N) at ./distributed/remotecall.jl:340
remotecall_fetch(::Function, ::Base.Distributed.LocalProcess, ::Expr, ::Vararg{Expr,N} where N) at ./distributed/remotecall.jl:339
#remotecall_fetch#144(::Array{Any,1}, ::Function, ::Function, ::Int64, ::Expr, ::Vararg{Expr,N} where N) at ./distributed/remotecall.jl:367
remotecall_fetch(::Function, ::Int64, ::Expr, ::Vararg{Expr,N} where N) at ./distributed/remotecall.jl:367
(::##13#15)() at ./distributed/macros.jl:102
sync_end() at ./task.jl:287
macro expansion at ./distributed/macros.jl:112 [inlined]
anonymous at ./<missing>:?
include_from_node1(::String) at ./loading.jl:576
include(::String) at ./sysimg.jl:14
(::Base.Distributed.##135#136{Base.#include,Tuple{String},Array{Any,1}})() at ./distributed/remotecall.jl:314
run_work_thunk(::Base.Distributed.##135#136{Base.#include,Tuple{String},Array{Any,1}}, ::Bool) at ./distributed/process_messages.jl:56
#remotecall_fetch#140(::Array{Any,1}, ::Function, ::Function, ::Base.Distributed.LocalProcess, ::String, ::Vararg{String,N} where N) at ./distributed/remotecall.jl:339
remotecall_fetch(::Function, ::Base.Distributed.LocalProcess, ::String, ::Vararg{String,N} where N) at ./distributed/remotecall.jl:339
#remotecall_fetch#144(::Array{Any,1}, ::Function, ::Function, ::Int64, ::String, ::Vararg{String,N} where N) at ./distributed/remotecall.jl:367
remotecall_fetch(::Function, ::Int64, ::String, ::Vararg{Any,N} where N) at ./distributed/remotecall.jl:367
(::Base.##507#509{Base.JLOptions})() at ./task.jl:335
while loading /home/vlaugier/CODE/sandbag/julia/genie/first_app_in_genie/genie.jl, in expression starting on line 32
#remotecall_fetch#140(::Array{Any,1}, ::Function, ::Function, ::Base.Distributed.LocalProcess, ::String, ::Vararg{String,N} where N) at ./distributed/remotecall.jl:340
remotecall_fetch(::Function, ::Base.Distributed.LocalProcess, ::String, ::Vararg{String,N} where N) at ./distributed/remotecall.jl:339
#remotecall_fetch#144(::Array{Any,1}, ::Function, ::Function, ::Int64, ::String, ::Vararg{String,N} where N) at ./distributed/remotecall.jl:367
remotecall_fetch(::Function, ::Int64, ::String, ::Vararg{Any,N} where N) at ./distributed/remotecall.jl:367
(::Base.##507#509{Base.JLOptions})() at ./task.jl:335
Stacktrace:
 [1] sync_end() at ./task.jl:287
 [2] macro expansion at ./task.jl:303 [inlined]
 [3] process_options(::Base.JLOptions) at ./client.jl:279
 [4] _start() at ./client.jl:371

尽管如此,还是创建了一些文件:

  • app/resources/totos/TotosController.jl
  • app/resources/totos/TotosChannel.jl
  • app/resources/totos/Authization.yml
  • test/unit/totos_test.jl

我对朱莉娅的看法如下:

代码语言:javascript
复制
julia> versioninfo()
Julia Version 0.6.2
Commit d386e40c17 (2017-12-13 18:08 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)
EN

回答 1

Stack Overflow用户

发布于 2018-05-15 10:13:50

对不起,从Genie中提取SearchLight ORM的过程似乎打破了Commands模块。我为此推出了一个快速修复程序,您将在运行Pkg.update()时得到它。

但是,这不再是与Genie的生成器功能交互的推荐方法。相反,启动Genie ($> ./bin/repl),然后使用各个模块公开的方法。在shell中提供的每个功能如下:

  • Genie.Generator (new_resourcenew_controllernew_channel)
  • SearchLight.Generator (db_initnew_modelnew_migration)
  • Migration
  • Toolbox
  • AppServer

Commands模块是出于历史原因而保留的,因为它似乎是帮助发现特性的一种很好的方法,缺乏广泛的文档。一旦更好的文档可用,更多这样的早期特性将被删除或重构/重组。

最后,对于任何其他错误,请在Genie的GitHub回购中打开一个问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50248193

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档