因此,请遵循本教程:
https://github.com/evanmiller/ChicagoBoss/wiki/An-Evening-With-Chicago-Boss
除了我不能使用"user“作为模型名之外,所有的东西都工作得很棒。最小用例:
-module(customer, [Id, Name, PasswordHash]).
-compile(export_all).这将工作得很好。
-module(user, [Id, Name, PasswordHash]).
-compile(export_all).这将堆栈跟踪,在./rebar compile上,它抛出:
ERROR: pre_compile failed while processing /Users/abe/github/awesome-name: {'EXIT',{{badmatch,{error,["code reload failed: user"]}},
[{boss_load,load_all_modules,3,
[{file,"src/boss/boss_load.erl"},{line,30}]},
{boss_load,load_all_modules_and_emit_app_file,2,
[{file,"src/boss/boss_load.erl"},{line,44}]},
{boss_rebar,compile,4,
[{file,"/Users/abe/github/ChicagoBoss/priv/rebar/boss_rebar.erl"},
{line,85}]},
{boss_plugin,pre_compile,2,
[{file,"priv/rebar/boss_plugin.erl"},{line,105}]},
{rebar_core,run_modules,4,[]},
{rebar_core,execute,5,[]},
{rebar_core,process_dir1,6,[]},
{rebar_core,process_commands,2,[]}]}}这在{db_adapter, mock}和{db_adapter, mongo}中都会发生。
有人知道这是怎么回事吗?user关键字是否保留在某处?如果是的话我在文档里找不到...
发布于 2013-05-20 14:05:24
Erlang有一个扁平的模块命名空间。在内核应用程序中有一个名为的模块。
https://stackoverflow.com/questions/16642675
复制相似问题