2013-02-21 57 views
1

我有一個類似的問題,因爲here for running an rebar app爲什麼我無法運行這個Erlang演示應用程序?

基本上,我想從運行演示代碼: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代碼?

+1

適合我。你運行過'rebar compile'嗎?它是否在'ebin'目錄下產生了'fancyapi.app'文件? – legoscia 2013-02-21 15:10:38

+0

是的,那是我的問題。 – poseid 2013-02-21 15:34:05

回答

2
[[email protected] ~/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. 

[[email protected] ~/work]$ cd fancyapi/ 

[[email protected] ~/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) 

[[email protected] ~/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 

[[email protected] ~/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 
+0

好吧,太好了......我沒有意識到需要運行「鋼筋編譯」 – poseid 2013-02-21 15:33:48

相關問題