Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Please describe 'Erlang Aplication' configuration dialog functionality #184

Closed
strobe opened this Issue · 9 comments

2 participants

@strobe

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)

@ignatov
Owner

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

@strobe

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

@ignatov
Owner

@strobe please provide your sample project for reproducing.

@ignatov
Owner

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 ignatov closed this
@strobe

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.

@ignatov
Owner

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

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

@ignatov
Owner

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
Something went wrong with that request. Please try again.