从documentation这个司机看起来很棒 . 我不知道如何安装它,以便我可以使用它 . 我读过某个地方,我应该使用rebar?我看了那个文档,但似乎有相反的问题 . 它说如何安装它,但不是如何使用它 .
Update
所以看起来在安装钢筋后,我可以添加线条
{deps, [
{mysql, ".*", {git, "https://github.com/mysql-otp/mysql-otp",
{tag, "1.3.3"}}}
]}.
到我的文件rebar.config . 我不知道这是做什么的 . 我现在必须编译或制作此文件吗? rebar.config必须与我的项目位于同一目录中吗?右边没有rebar.config的路径是 ~/rebar/rebar.config
放置我的项目以使它成为文件层次结构中钢筋的兄弟是否正确?
Update
我用rebar文件夹运行了 ./rebar get-deps
并得到了
Pulling mysql from {git,"https://github.com/mysql-otp/mysql-otp",
{tag,"1.3.3"}}
Cloning into 'mysql'...
==> mysql (get-deps)
我仍然不知道这意味着什么,当我尝试编译我的erlang文件时,我收到了结果 .
c(erlangFile.erl).
{error,non_existing}
1 回答
rebar是erlang的构建工具 . 请通过https://github.com/rebar/rebar/wiki/Rebar-commands获取命令 . 获得依赖后,需要"rebar compile"来编译它 . 要使用光束文件,必须使用Add Path to Erlang Search Path?这些方法提供输出光束路径 . 然后,您就可以在代码中使用它 .