rebar

Erlang “Kernel pid terminated” error

。_饼干妹妹 提交于 2019-12-13 02:04:51
问题 I try to use relx for release application. Relx did it without problems. But when I start application, I have the error: {"Kernel pid terminated",application_controller," {application_start_failure,iqServer,{bad_return,{{iqServer_app,start,[normal,[]]}, {'EXIT',{undef,[{iqServer_app,start,[normal,[]],[]}, {application_master,start_it_old,4,[{file,\"application_master.erl\"}, {line,272}]}]}}}}}"} As I understand from the error, I have a problem in the function iqServer:start/2 . start/2 looks

Where should you put application properties in a rebar erlang application?

倖福魔咒の 提交于 2019-12-12 11:23:42
问题 A newbie question: I wrote my first rebar based erlang application. I want to configure some basic properites like server host etc. Where is the best place to put them and how should I load them into the app? 回答1: The next steps are to make a release and create a node in it. A node runs your application in a standalone Erlang VM. A good starting point for creating a release using rebar: Erlang Application Management with Rebar Once you have created a release. The configuration properties for

Rebar fails compiling / bulding from source on R16B02

霸气de小男生 提交于 2019-12-11 14:51:28
问题 Running Erlang R16B02 (its installed through source and compiled, erl is on path). Recompile: src/rebar_utils Recompile: src/rebar_xref Uncaught error in rebar_core: {'EXIT', {undef, [{crypto,start,[],[]}, {rebar,run_aux,2, [{file,"src/rebar.erl"},{line,163}]}, {rebar,main,1, [{file,"src/rebar.erl"},{line,58}]}, {erl_eval,do_apply,6, [{file,"erl_eval.erl"},{line,569}]}, {escript,eval_exprs,5, [{file,"escript.erl"},{line,856}]}, {erl_eval,local_func,5, [{file,"erl_eval.erl"},{line,467}]},

Cover report from Common Test when using rebar

懵懂的女人 提交于 2019-12-11 03:28:31
问题 I have an Erlang application that uses Rebar, and has tests written using Common Test. I'd like to see the test coverage report for these tests, so I included the following line in my rebar.config file: {cover_enabled, true}. However, the "Coverage log" link in the Common Test report just leads to a page that says "Cover tool is not used". How can I get it to use the cover tool and give me a cover report when running the tests? 回答1: The cover_enabled setting in rebar.config is necessary but

Configuring Lager - I get this error: undefined parse transform 'lager_transform'

烂漫一生 提交于 2019-12-10 17:08:49
问题 I'm testing this https://github.com/saleyn/erws_example on R16B03 (both on windows & Ubuntu) ==> erws_example (compile) src/erws_handler.erl:none: undefined parse transform 'lager_transform' ERROR: compile failed while processing /home/charles/erws_example: rebar_abort I've seen this suggestion http://philipcristiano.com/2013/05/27/ordering-of-rebar-dependencies.html So far, i'm unable to get any headway. Thanks. 回答1: It seems rebar can not compile parse transforms before compiling everything

How to debug erlang code during rebar3 eunit?

微笑、不失礼 提交于 2019-12-10 15:22:40
问题 I have created an release app with rebar3 (beta-4). Added some eunit tests and wrote some code. For now I have to debug one test case to see what I have to add to make the implementation to work properly. I found some articles about using dbg from erlang console and I found how to write debug info from eunit. But I need to get info from code that I have to test (the actual implementation(logic)). Is there a way to debug erlang code (actual source code, not the test one) when rebar3 is used

passing runtime arguments to erlang when running rebar eunit

大憨熊 提交于 2019-12-10 11:13:06
问题 In my startup script, I am starting erlang with: erl -args_file vm.args Currently, while trying to run unit tests with rebar eunit is there a way for me to pass custom runtime arguments such as the -args_file option to the erlang process that rebar kicks off? I have searched docs high and low to no avail... I appreciate the help. 回答1: I answered my own question. I use the ERL_FLAGS variable to pass command line args. Here is a snippet from my Makefile: ERL_FLAGS="-args_file test/conf/vm.eunit

Win10下 Erlang生成依赖项本地副本

孤者浪人 提交于 2019-12-10 08:18:08
有时候几个不同的应用程序会用到相同的依赖项,在这种情况下,我们会在应用程序的外部创建一个依赖项目录结构。对于我的本地项目,我会把所有已下载的rebar依赖项保存在一个地方。例如,我把所有这些依赖项保存在 G:\ErlangWorkSpace\erl_imports 路径下。 我这台机器的组织方式是ErlangWorkSpace 目录下的任何文件都不会有备份。因为这些我感兴趣的文件在Web上到处都是,所以没有必要创建本地备份。 默认你的主机已经安装了rebar和git,在git bash 下分别执行 rebar -V 和 git version 指令,如下说明已经安装成功: 1、在 G:\ErlangWorkSpace\erl_imports路径下新建一个 rebar.config 文件,在rebar.config文件下列出我想要使用的所有依赖项,它的的内容如下: {deps,[ {cowboy,".*",{git,"git://github.com/extend/cowboy.git","master"}}, {ranch,".*",{git,"git://github.com/extend/ranch.git","master"}}, {bitcask,".*",{git,"git://github.com/basho/bitcask.git","master"}},

用rebar来构建,编译,测试,发布Erlang应用程序

半城伤御伤魂 提交于 2019-12-10 08:17:42
rebar 是一个遵循Erlang/OTP原则的Erlang项目构建工具,使用它可以减少构建标准Erlang/OTP项目架构配置的工作量,并且可以很容易的编译,测试,发布Erlang应用程序。更强大的是,rebar提供了一种依赖管理机制,它可以使开发者很方便的通过Git,Hg等方式重用常见的第三方Erlang模块或库。 安装 你可以从 https://github.com/rebar/rebar/wiki/rebar 下载并编译好的版本,也可以自己下载rebar的源代码,自己编译一个: git clone git://github.com/rebar/rebar.git cd rebar ./bootstrap 上面编译好之后,在当前目录下就会生成一个名为 "rebar" 独立的 erlang 脚本(escript),把它放在你想创建标准 Erlang/OTP 项目的目录路径下即可使用。 在终端输入 "rebar -c" 将列出所有可执行的 rebar 命令。或者输入 "rebar -h" 查看更多的 rebar 参数信息。 用rebar 创建项目 创建一个名为rebarapp的文件夹 mkdir rebarapp cd rebarapp 创建名为rebarapp项目: ./rebar create-app appid=rebarapp rebar 会根据默认模板(template

Command 'generate' not understood or not applicable

三世轮回 提交于 2019-12-10 01:52:19
问题 I am trying to run rebar generate to generate a release for an erlang rebar project and getting the following error. Any ideas what I am doing wrong? ./rebar generate Command 'generate' not understood or not applicable I am on OSX with erlang version Erlang R14B03 and below is my rebar.conf {lib_dirs, ["deps"]}. {sub_dirs, ["rel"]}. {deps, [ {folsom, ".*", {git, "git://github.com/boundary/folsom", "master"}} ]}. {require_otp_vsn, "R14|R15"}. {erl_opts, [ fail_on_warning, debug_info, warn