I have started developing for Erlang using Rebar3 in the IntelliJ IDE and have run into the following problem - when trying to use the ide to clean or run i get the following error:
Testing started at 8:33 AM ...
D:\DevelopmentTools\erl10.0.1\bin\escript.exe D:\DevelopmentTools\erl10.0.1\rebar\rebar3.cmd skip_deps=true clean -C C:\Users\coreRNM\AppData\Local\Temp\eunit_teamcity1\rebar.config
D:\DevelopmentTools\erl10.0.1\rebar\rebar3.cmd:2: syntax error before: set
escript: There were compilation errors.
It should be a fairly easy configuration but the code breaks in the following location.
#echo off
setlocal
set rebarscript=%~f0
escript.exe "%rebarscript:.cmd=%" %*
My question is: has anyone experienced this before or am I missing something?
Honestly, I have no idea what's happened here and it doesn't look like an integration issue. Better ask guys about running rebar3 on Windows.
Related
I'm trying to deploy my application on Gigalixir, following the getting started with an existing app.
I have added [{:distillery, "~> 2.1"}] to my mix.deps
building the release for production
SECRET_KEY_BASE="$(mix phx.gen.secret)"
DATABASE_URL="postgresql://postgres:postgres#localhost:5432/rumbl_dev"
MIX_ENV=prod
mix distillery.release --env=prod
But then I run _build/prod/rel/rumbl/bin/rumbl start, and that fails with
Could not locate code path for m{elixir-1.7.2","./lib/elixir-1.7.2!
Any ideas what could be going on?
You should compare elixir version in your mix file and version installed at the server.
On MacOS, the command "unset GREP_OPTIONS" solved this issue for me. I found this issue is relevant to the wrong return value of function __rel_apps() in phoenix/{your-app}/_build/prod/rel/{your-app}/releases/{your-version}/libexec/erts.sh. Then, the solution is referenced from underlying link.
https://github.com/bitwalker/distillery/issues/592
I am new to the world of erlang and phoenix. Anyways, I am trying to figure out a compiling issue and I have hit wits end for now.
I will do my best to provide as much information as possible to help with this problem. If I've missed anything just let me know.
When running the command mix deps.get everything is compiled properly from my mix.exs.
However, once I run mix conform.configure
I get the error:
==> eredis (compile)
include/eredis_sub.hrl:19: type queue() undefined
** (Mix) Could not compile dependency eredis, /usr/bin/rebar command failed. If you want to recompile this dependency, please run: mix deps.compile eredis
Running mix dep.compile eredis produces the same error as above.
Oh and I am running erlang 18. Any help would be greatly appreciated.
Thanks.
Either use v17, or change to queue:queue().
Use rebar compile instead of make. Makefile of eredis is broken. They are probably using eredis exclusively as subproject and is no longer compiled using make.
And as well update to at least v1.7.0 but preferably v1.0.8.
Is it possible to use Erlang with ZMQ on Windows? I have tried to use erlzmq2, but rebar fails to compile it with cryptic linker errors. Of course i can invest some time and investigate makefiles, but maybe other way exists?
Update
Whose who are interested in compilation errors can download latest erlang for windows and try to build erlzmq2 (Visual Studio 2012 compiler, msys sh and make). Error looks like:
cl : Command line error D8021 : invalid numeric argument '/Wl,-DLL,-IMPLIB:.libs
\zmq.dll.lib'
Makefile:541: recipe for target 'libzmq.la' failed
make[3]: *** [libzmq.la] Error 2
Please note that other erlang libs are compiling with this setup without any problems.
Your problem lies in compiling ZeroMQ for Windows. You haven't actually gotten to any Erlang yet. Here are some of the clues that tell you this:
Makefile:541: recipe for target 'libzmq.la' failed
This line says there's a problem on line 541 of the Makefile. But in erlzmq2, you can see that neither the main Makefile nor the c_src Makefile (which is what would build libzmq.la) has anything close to that many lines.
make3: * [libzmq.la] Error 2
The [3] means that you're 3 invocations deep into Make. Specifically, you started at the top-level Makefile, which called Rebar, which ran make -C c_src, which downloads ZeroMQ version 3.2.2 and tries to do a ./configure && make
To fix this Unix-style, go into the deps directory of erlzmq2 and figure out how to correctly compile ZeroMQ. Hopefully, you will just need to pass some arguments to configure. Then you can edit c_src/Makefile and set ZMQ_FLAGS to whatever you had to do for configure, clean, and make.
To fix it more Windows-style, follow the Windows build instructions for ZeroMQ. Put the compiled libzmq under deps and just edit the c_src Makefile to a no-op.
Finally, if you don't actually need to run this code on Windows, but are just using Windows as your development environment, I think you'll have the easiest time by running the build inside a Linux VM (not a hard thing at all with tools like Vagrant). Sorry, but Unix is the real system for this stuff; Windows support is an afterthought.
I'm trying to debug ejabberd. I have compiled the files with debug_info. I start ejabberd, then use ejabberd debug to get into the shell. Once in there, running im() produces "Call to i:im() in application debugger failed". I can't figure out what's causing this. Any ideas on how to debug?
Edit
I've tried running this in just the erl shell independent of ejabberd and it still fails. So it looks like it's related to my erlang setup as opposed to a problem with my ejabberd setup.
Foolish me: apt-get install erlang-debugger solved the problem.
I'm a newbie and i'm working follow this link http://dima.github.com/2009/03/19/working-with-restfulx-model-attachments.html
But I stuck on the step run ./script/generate rx_config. I don't know how can I run it.
I tried to go to the path of folder script and typed generate rx_cofig on command line but it doesn't work.
C:\Data\Workspace\rx_model_attachments\script>generate rx_config
I got the error 'generate' is not recognized as an internal or external command, operable program or batch file.
Anyone can tell me step by step of doing this. Big thanks!
Since you're on windows, you will need to preface all of the scripts in the scripts folder with ruby:
C:\Data\Workspace\rx_model_attachments\script>ruby script/generate rx_config
The usual hash-bang (#!) at the start of the script files to let the shell know which interpreter to run does not work on windows.