Please describe 'Erlang Aplication' configuration dialog functionality #184

Closed
strobe opened this Issue Mar 1, 2013 · 9 comments

Comments

Projects
None yet
2 participants

strobe commented Mar 1, 2013

This looks like a simple feature but is not at all.
Please, try to describe how to setup the cowboy examples applications for running as Erlang Aplication (https://github.com/extend/cowboy/tree/master/examples/rest_hello_world) in intellij-erlang. This examples used start.sh script. If I tried to put something like content of start.sh to 'Erlang Aplication' configuration dialog as result I got not correct command like that: /usr/local/lib/erlang/bin/erl -pa -run rest_hello_world start -pa ebin -noshell -s init stop
(but correct is: erl -pa ebin -s rest_hello_world
Screen Shot 2013-03-02 at 1 32 14 AM)

Owner

ignatov commented Mar 1, 2013

Hi, @strobe please disable the checkbox Stop Erlang interpreter automatically after execution. For further information see #161.

strobe commented Mar 2, 2013

Hi, Thanks.
I looked #161 but I guess that my case is different.
I switched to off this checkbox but it's didn't solve my issue - full error text:

/usr/local/lib/erlang/bin/erl -pa -run rest_hello_world start -pa ebin -noshell
{"init terminating in do_boot",{{badmatch,{error,{"no such file or directory","rest_hello_world.app"}}},      [{rest_hello_world,start,0,[{file,"/Volumes/Home/Users/eugene/tmp/rest_hello_world/src/rest_hello_world.erl"}, {line,14}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

same command from terminal launched successfully.

I also tried to create external command 'erl -version' to check PATH but it's also worked correctly.
Screen Shot 2013-03-02 at 5 12 26 PM
Screen Shot 2013-03-02 at 5 14 39 PM

Owner

ignatov commented Mar 27, 2013

@strobe please provide your sample project for reproducing.

Owner

ignatov commented Apr 8, 2013

Hi, @strobe I've just configured your project, check it out: http://dl.dropbox.com/u/4294872/rest_hello_world.zip
My steps:

  1. Get dependencies via rebar
  2. Setup modules for cowboy and ranch
  3. Add dependencies via Module settings dialog
  4. Setup output paths for all modules like %MODULE_PATH%/ebin
  5. Disable the checkbox Stop Erlang interpreter automatically after execution
  6. Execute your run configuration

BTW, I hope I will have enough time for providing better Erlang code compilation via IntelliJ.

ignatov closed this Apr 8, 2013

strobe commented Apr 9, 2013

Thanks,
in my case I didn't this:

2. Setup modules for cowboy and ranch
3. Add dependencies via Module settings dialog
4. Setup output paths for all modules like %MODULE_PATH%/ebin

I have used modules directly from erlang directories.

Owner

ignatov commented Apr 9, 2013

So, at the present everything is OK, right? Also I'll improve Rebar importer for your case, e.g. getting dependencies via rebar get_deps.

strobe commented Apr 10, 2013

Yes all are ok.

But I guess it will be good if you'll write some note about necessity of 'modules setup' in project readme or wiki (for new users like me).

Thanks

Owner

ignatov commented Apr 21, 2013

I've just merged a feature branch with better rebar import. Please, try it for your projects as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment