1
votes

I am trying to call rpc from Erlang to Elixir, I get:

rpc:call(chat@localhost, 'Node' , 'list', []).

{badrpc,{'EXIT',{undef,[{'Node',list,[],[]},
                        {rpc,'-handle_call_call/6-fun-0-',5,
                             [{file,"rpc.erl"},{line,197}]}]}}}

Whats the proper syntax for achieving this simple call?

1

1 Answers

7
votes

When Elixir code gets compiled, the module names actually become Elixir.Module. So in order to call an Elixir module from Erlang, you will need to use 'Elixir.Module'. In this case,

rpc:call('chat@localhost', 'Elixir.Node', list, [])