Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile Erlang in Intellij

I try compile erl files in Intellij with Erlang plugin. Everything is good with compilation but in out/production the folder does not create any files .beam and when I run console I get message:

exception error: undefined function. 

When I use c("file"). everything is all right. Why does Intellij not create .beam files?

like image 263
sebax Avatar asked Nov 06 '15 16:11

sebax


2 Answers

Try to fix it by going to Preferences -> Build, Execution, Deployment -> Erlang Compiler and check "Compile project with rebar". Also, verify that rebar is installed and configured in IntelliJ by going to Preferences -> Other Settings -> Erlang External Tools and specifying the path to the rebar installation.

like image 164
Igor Khvostenkov Avatar answered Sep 30 '22 11:09

Igor Khvostenkov


I was having the same issue ..

The problem is very strange erlang plugin doesn't compile and copy the files to out directories meanwhile if you compiled from terminal or command prompt (windows) it is working fine. this issue arose after installing IntelliJ Idea v 15.

What I have done here to fix the issue:

  • Uninstall Intellij Idea v 15
  • Downgrade IntelliJ Idead to version 14.1.4
  • Install Intellij Idea again (v. 0.5.11)
  • Configure SDK to reference src of erlang language.
  • Create a new test project and start making the project again .. it should work fine...

Hope this helps you

like image 43
Muhammad Soliman Avatar answered Sep 30 '22 13:09

Muhammad Soliman