erlang - 为什么我无法运行这个 Erlang 演示应用程序?

标签 erlang rebar erlang-shell

我遇到了与 here for running an rebar app 类似的问题

基本上,我想运行以下位置的演示代码:https://github.com/hukl/fancyapi

当我在根目录中时,我这样做:

→ erl [...] -pa ebin -pa deps/*/ebin
Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:8:8] [async-threads:0] [hipe] [kernel-poll:false] [dtrace]

Eshell V5.9.2  (abort with ^G)
1> application
1> .
application
2> application:start(fancyapi).
{error,{"no such file or directory","fancyapi.app"}}
3> application:start("fancyapi").
{error,{bad_application,"fancyapi"}}
4> 

ERL 如何找到 fancyapi 代码?

最佳答案

[g@dev1 ~/work]$ git clone git://github.com/hukl/fancyapi.git
Cloning into 'fancyapi'...
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 12 (delta 0), reused 12 (delta 0)
Receiving objects: 100% (12/12), done.

[g@dev1 ~/work]$ cd fancyapi/

[g@dev1 ~/work/fancyapi]$ rebar get-deps
==> fancyapi (get-deps)
Pulling etest from {git,"git://github.com/wooga/etest.git"}
Cloning into 'etest'...
Pulling etest_http from {git,"git://github.com/wooga/etest_http.git"}
Cloning into 'etest_http'...
Pulling elli from {git,"git://github.com/knutin/elli.git"}
Cloning into 'elli'...
==> etest (get-deps)
==> etest_http (get-deps)
Pulling jiffy from {git,"git://github.com/davisp/jiffy.git","HEAD"}
Cloning into 'jiffy'...
==> jiffy (get-deps)
==> elli (get-deps)

[g@dev1 ~/work/fancyapi]$ rebar compile
==> etest (compile)
Compiled src/etest_runner.erl
==> jiffy (compile)
Compiled test/jiffy_tests.erl
Compiled test/util.erl
Compiled src/jiffy_utf8.erl
Compiled src/jiffy.erl
Compiled test/etap.erl
Compiling c_src/decoder.c
Compiling c_src/encoder.c
Compiling c_src/jiffy.c
Compiling c_src/utf8.c
Compiling c_src/util.c
==> etest_http (compile)
Compiled src/etest_http.erl
Compiled src/etest_http_json.erl
Compiled test/etest_http_test.erl
==> elli (compile)
Compiled src/elli_handler.erl
Compiled src/elli_middleware_compress.erl
Compiled src/elli_example_middleware.erl
Compiled src/elli_middleware.erl
Compiled src/elli_util.erl
Compiled src/elli_request.erl
Compiled src/elli.erl
Compiled src/elli_test.erl
Compiled src/elli_example_callback.erl
Compiled src/elli_http.erl
==> fancyapi (compile)
Compiled src/fancyapi_app.erl
Compiled src/fancyapi_callback.erl
Compiled src/fancyapi_sup.erl
Compiled test/my_fancy_test.erl

[g@dev1 ~/work/fancyapi]$ erl -pa ebin -pa ebin deps/*/ebin
Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:2:2] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9.3.1  (abort with ^G)
1> application:start(fancyapi).
ok

关于erlang - 为什么我无法运行这个 Erlang 演示应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15005047/

相关文章:

erlang - 在 Erlang 应用程序中设置环境变量

erlang - 无法启动任何版本?

erlang - 如何使用来自 erlang shell 的参数生成进程

Erlang 中的 Mysql

erlang - 测试 ejabberd 模块

Erlang 编译器优化

erlang - 如何使用 rebar 在每个文件的基础上使用不同的 c 编译器/链接器选项?

erlang - 原因: undef while running common tests in erl console [Erlang]

erlang - 短路 Erlang 端口映射器守护进程

javascript - 通过 Core Erlang 将 Erlang 编译为 Javascript