-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is Poolboy supported on Windows? #81
Comments
That's an erlang version difference problem. Your erlang on windows is probably older. |
@ejstembler What is your Erlang version on Windows? Give me the output of |
It looks like both are the same, 18. On my Windows 8 x64 VM: >erl
Eshell V7.0 (abort with ^G)
1> erlang:system_info(otp_release).
"18"
2> On my Mac OS X El Capitan: $ erl
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Eshell V7.1 (abort with ^G)
1> erlang:system_info(otp_release).
"18"
2> |
This isn't really a bug. You just need to install Rebar on your Windows machine. http://theburningmonk.com/2014/08/getting-started-with-rebar-on-windows/ |
By the way, Eshell v7.0 is not the same as Eshell v7.1. They're both major version 18 but they're different minor versions. |
@OnorioCatenacci Wont |
That's a good question. I'm not sure. I just manually downloaded rebar On Mon, Oct 26, 2015 at 4:00 PM, Devin Torres [email protected]
Onorio Catenacci |
Here's something that may have relevance: elixir-lang/elixir#2152 While the bug mentioned may have been fixed last year it's still worth taking a look at the comments. |
@OnorioCatenacci I cloned rebar, compiled it locally, then added it to my path. The output: C:\Users\my_user\Projects\my_project>mix deps.get
* Getting poolboy (https://github.com/devinus/poolboy.git)
Cloning into 'c:/Users/my_user/Projects/my_project/deps/poolboy'...
remote: Counting objects: 838, done.�[K
Receiving objects: 100% (838/838), 1.83 MiB, done.
Resolving deltas: 100% (404/404), done.
remote: Total 838 (delta 0), reused 0 (delta 0), pack-reused 838�[K
C:\Users\my_user\Projects\my_project>mix
==> poolboy (compile)
src/poolboy.erl:17: type queue() undefined
Compiling src/poolboy.erl failed:
ERROR: compile failed while processing c:/Users/my_user/Projects/my_project/deps/poolboy: rebar_abort
** (Mix) Could not compile dependency :poolboy, "c:/Users/my_user/Projects/rebar/rebar.cmd" command failed. You can recompile this dependency with "mix deps.compile poolboy", update it with "mix deps.update poolboy" or clean it with "mix deps.clean poolboy" |
That wouldn't have been the way that I would have suggested to get rebar Onorio On Tue, Oct 27, 2015 at 9:26 AM, Edward J. Stembler <
Onorio Catenacci |
@OnorioCatenacci Well, I followed the instructions on the link you provided on the mailing list. In any case, typing rebar was the first thing I did after modify my path, and starting a new terminal window. It complains about no parameters and displays the usage: >rebar
No command to run specified!
Usage: rebar [-h] [-c] [-v <verbose>] [-q <quiet>] [-V] [-f]
... Also, on Windows I can do a where: >where rebar
C:\Users\my_user\Projects\rebar\rebar
C:\Users\my_user\Projects\rebar\rebar.cmd |
Ok--just to insure we're all playing from the same playbook: type rebar Also I'd try calling rebar directly (as opposed to calling it from within From a command prompt within the poolboy directory of course. All of this is not to say that mix shouldn't work with this but it's easier Just my suggestions of course. On Tue, Oct 27, 2015 at 9:46 AM, Edward J. Stembler <
Onorio Catenacci |
@OnorioCatenacci Sure. Good suggestions. Here's the output: >rebar version
rebar 2.6.1 18 20151027_131239 git 2.6.1-10-g992dfac C:\Users\my_user\Projects\my_project\deps\poolboy>rebar compile poolboy
==> poolboy (compile)
src/poolboy.erl:17: type queue() undefined
Compiling src/poolboy.erl failed:
ERROR: compile failed while processing C:/Users/my_user/Projects/my_project/deps/poolboy: rebar_abort @devinus I'm not privy to the poolboy source, however, where is queue coming from in src/poolboy.erl:16? Is it imported from somewhere? |
Devin can comment more on this but I believe this would be the queue in http://www.erlang.org/doc/man/queue.html One thing though--it looks like the code is thinking Erlang is "pre17"? I -ifdef(pre17). I don't think your version of Erlang is pre17 (I'm assuming that's 16 or I'd also suggest that you check your code path in Erlang. See if you've Onorio On Tue, Oct 27, 2015 at 10:08 AM, Edward J. Stembler <
Onorio Catenacci |
Yeah, I do have queue.beam in C:/Program Files/erl7.1/lib/stdlib-2.6/ebin/. Anyone know how pre17 gets set? It doesn't come up when I search the erlang or rebar repos. I see a reference to in the poolboy's rebar config though: rebar.config:3. I'm not sure what that means, but I found a previously closed issue with the regex: compile fails with erlang 18 |
@ejstembler You don't have |
Maybe it's a codepath issue? I forget how to check the codepath. But it On Tue, Oct 27, 2015 at 12:03 PM, Devin Torres [email protected]
Onorio Catenacci |
@ejstembler I'm not sure how you installed Erlang or Elixir, but it seems messed up.
|
@devinus That's what I had before. However, I uninstalled everything to be safe, rebooted, and re-installed. I used:
Checked the versions from the shells: >erl
Eshell V7.1 (abort with ^G)
1> erlang:system_info(otp_release).
"18" >iex --version
Eshell V7.1 (abort with ^G)
Elixir 1.1.1 Wheres: >where erl
C:\Program Files\erl7.1\bin\erl.exe
>where iex
C:\Program Files (x86)\Elixir\bin\iex
C:\Program Files (x86)\Elixir\bin\iex.bat I get the same output though: C:\Users\my_user\Projects\my_project>mix deps.get
* Getting poolboy (https://github.com/devinus/poolboy.git)
Cloning into 'c:/Users/my_user/Projects/my_project/deps/poolboy'...
remote: Counting objects: 838, done.�[K
Receiving objects: 100% (838/838), 1.83 MiB | 2.28 MiB/s, done.
Resolving deltas: 100% (404/404), done.
remote: Total 838 (delta 0), reused 0 (delta 0), pack-reused 838�[K
C:\Users\my_user\Projects\my_project>mix
==> poolboy (compile)
src/poolboy.erl:17: type queue() undefined
Compiling src/poolboy.erl failed:
ERROR: compile failed while processing c:/Users/my_user/Projects/my_projects/deps/poolboy: rebar_abort
** (Mix) Could not compile dependency :poolboy, "c:/Users/my_user/Projects/rebar/rebar.cmd" command failed. You can recompile this dependency with "mix deps.compile poolboy", update it with "mix deps.update poolboy" or clean it with "mix deps.clean poolboy" I deleted my cloned copy of rebar, and tried again: C:\Users\my_user\Projects\my_project>mix deps.get
* Getting poolboy (https://github.com/devinus/poolboy.git)
Cloning into 'c:/Users/my_user/Projects/my_project/deps/poolboy'...
remote: Counting objects: 838, done.�[K
Receiving objects: 100% (838/838), 1.83 MiB, done.
Resolving deltas: 100% (404/404), done.
remote: Total 838 (delta 0), reused 0 (delta 0), pack-reused 838�[K
C:\Users\my_user\Projects\my_projects>mix
==> poolboy (compile)
Compiling src/poolboy.erl failed:
src/poolboy.erl:17: type queue() undefined
ERROR: compile failed while processing c:/Users/my_user/Projects/my_project/deps/poolboy: rebar_abort
** (Mix) Could not compile dependency :poolboy, "escript.exe "c:/Users/my_user/.mix/rebar"" command failed. You can recompile this dependency with "mix deps.compile poolboy", update it with "mix deps.update poolboy" or clean it with "mix deps.clean poolboy" It seems like it's trying to use the version of rebar mix includes. But it fails too. |
@ejstembler Try deleting After that, try cloning |
@devinus Well, I think we're getting closer... C:\Users\my_user\.mix>rm rebar
C:\Users\my_user\Projects\my_project>mix local.rebar
* creating c:/Users/my_user/.mix/rebar
C:\Users\my_user\Projects\my_project\deps>git clone https://github.com/devinus/poolboy.git
Cloning into 'poolboy'...
remote: Counting objects: 838, done.
Receiving objects: 100% (838/838), 1.83 MiB, done.ack-reused 838 eceiving objects: 100% (838/838)
Resolving deltas: 100% (404/404), done.
C:\Users\my_user\Projects\my_project\deps\poolboy>c:\Users\my_user\.mix\rebar compile
'c:\Users\my_user\.mix\rebar' is not recognized as an internal or external command,
operable program or batch file. For Windows, should there be a corresponding rebar.bat file? Similar to how there's an iex and iex.bat? |
rebar itself is an escript. So yes, you'd need a bat or cmd file or "%PROGRAMFILES%/erl7.1/bin/escript.exe" On Tue, Oct 27, 2015 at 2:08 PM, Edward J. Stembler <
Onorio Catenacci |
@OnorioCatenacci @devinus I got it to work! Thanks for your help Devin and Onorio! C:\Users\my_user\Projects\my_project\deps\poolboy>c:\Users\my_user\.mix\rebar compile
==> poolboy (compile)
Compiled src/poolboy_sup.erl
Compiled src/poolboy_worker.erl
Compiled src/poolboy.erl I created a rebar.bat similar to how they do their bootstrap.bat @echo off
escript.exe rebar %* So, maybe the issue is that Elixir (or mix?) needs to create that additional rebar.bat file for Windows? |
@josevalim Thoughts? |
Was this ever resolved? I'm getting the same error after installing Elixir and Erlang via the elixir-websetup.exe ... it appears that mix is correctly passing rebar to escript:
It still fails to run (attempts to compile poolboy again) after running the command manually as above.
|
What is your Windows, Elixir and Erlang versions? I am confident Poolboy On Wednesday, September 14, 2016, tymoor [email protected] wrote:
José Valimwww.plataformatec.com.br |
Due to the error, it seems your issue is either an old Poolboy version (try José Valimwww.plataformatec.com.br |
Yeah, that was it - when I got to the hex page ( [(https://hex.pm/] ) I just copied the ecto tuple it suggests:
into my sample program... that tuple is old, and has a dependency on an old version of poolboy. |
I tried using poolboy in my Elixir program on Windows. Mix fails to compile it. Something about rebar.
On Mac it complied fine:
The text was updated successfully, but these errors were encountered: