erlport icon indicating copy to clipboard operation
erlport copied to clipboard

Using erlport/ruby with Elixir v1.1.0 seems to have an issue, looking to understand the cause.

Open stochastic-thread opened this issue 10 years ago • 1 comments

I made a repo demonstrating example usage with Python in Elixir here: (https://github.com/arthurcolle/elixir-snake)

When I redownload it, run mix deps.get, then iex -S mix, in the interpreter, running this should work:

just like how iex(2)> {:ok, python} = :python.start() returns: {:ok, #PID<0.90.0>} the ruby version should also work, however running this: iex(2)> {:ok, ruby} = :ruby.start() {:ok, #PID<0.95.0>} iex(3)> /Users/arthur/.rubies/ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- erlport/cli (LoadError) from /Users/arthur/.rubies/ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire' from -e:1:in `

'

23:42:43.046 [error] GenServer #PID<0.95.0> terminating Last message: {#Port<0.3940>, {:exit_status, 1}} State: {:state, :infinity, 0, #Port<0.3940>, [], []} ** (stop) {:port_closed, {:code, 1}}

What exactly is the problem? Is there a gem that I need to download and install in order to make it work? I couldn't find this in the docs, but I'd appreciate any pointers. Thanks!

stochastic-thread avatar Jun 16 '15 03:06 stochastic-thread

You should build erlport with make to have ruby libs available. Also you can try erlport elixir wrapper: https://github.com/fazibear/export, it will build elport dependency for you.

fazibear avatar Mar 25 '16 12:03 fazibear