Getting mochiweb on windows working

210 views
Skip to first unread message

John Smith

unread,
Sep 19, 2013, 4:29:53 PM9/19/13
to moch...@googlegroups.com
Hi,
I have been following this guide (http://alexmarandon.com/articles/mochiweb_tutorial/) but I am trying to get this on Windows 7 64bit. I understand most people would rather use Linux but for the project I am working on I need it to work on both Linux and Windows.

Basically, I have gotten as far as making my project (make app PROJECT=odse) and then when I go to the project directory and then call make it seems to hang on pulling mochiweb from the git repository.


C:\mochiweb\mochiweb>make app PROJECT=odse
==> mochiweb (create)
Writing ../odse/src/odse.app.src
Writing ../odse/src/odse.erl
Writing ../odse/src/odse_app.erl
Writing ../odse/src/odse_deps.erl
Writing ../odse/src/odse_sup.erl
Writing ../odse/src/odse_web.erl
Writing ../odse/start-dev.sh
Writing ../odse/priv/www/index.html
Writing ../odse/.gitignore
Writing ../odse/Makefile
Writing ../odse/rebar.config
Writing ../odse/rebar

C:\mochiweb\mochiweb>cd ../odse

C:\mochiweb\odse>make
==> odse (get-deps)
Pulling mochiweb from {git,"git://github.com/mochi/mochiweb.git",
                           {branch,"master"}}
make: *** [all] Interrupt

Bob Ippolito

unread,
Sep 19, 2013, 4:37:14 PM9/19/13
to moch...@googlegroups.com
I don't know anyone who has tried using this on Windows, but if it's hanging at that point I would guess that it's perhaps a problem with the network (firewall perhaps?). Try changing the rebar.config file to point to the http URL and see if that works: https://github.com/mochi/mochiweb.git

Worst case you could just copy over the dependency instead of having rebar fetch it for you with git. Just make a folder called "deps" and copy over your checkout of mochiweb into that folder (you should have a "odse/deps/mochiweb" folder after that). rebar shouldn't try and get the dependency anymore if it already exists, so you should be fine after that.

-bob


--
You received this message because you are subscribed to the Google Groups "MochiWeb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mochiweb+u...@googlegroups.com.
To post to this group, send email to moch...@googlegroups.com.
Visit this group at http://groups.google.com/group/mochiweb.
For more options, visit https://groups.google.com/groups/opt_out.

Dave Cottlehuber

unread,
Sep 20, 2013, 2:21:39 AM9/20/13
to moch...@googlegroups.com
Are you just wanting to run the project on Windows, or also develop on Windows?

erlang, rebar, & Mochiweb work fine on Windows, although many
community erlang modules assume a unix-like shell (msys or cygwin),
make & makefiles.

I've found that git:// urls work better than http ones on Windows, no
useful explanation though.

Here's the setup I use for building CouchDB releases on Windows now:
http://dch.github.io/glazier/ or http://documentup.com/dch/glazier -
seems chrome doesn't display the former link atm.

I've just checked & under cygwin + R15B03-1 this generates an app
perfectly on Windows.

This might be useful later if your project in future needs end-users
to run rebar without a unixish environment: a portable rebar.cmd
https://people.apache.org/~dch/dist/tools/ that only wants > R14B
erlang.

A+
Dave

John Smith

unread,
Sep 20, 2013, 10:59:20 AM9/20/13
to moch...@googlegroups.com
Thats got it working, I am not sure why it hangs because I could checkout from the command prompt with no problem, but it works!!!

John Smith

unread,
Sep 20, 2013, 11:00:07 AM9/20/13
to moch...@googlegroups.com
Right now, I just want it to work. But eventually I will need Windows builds so I will keep those links in mind. Thank you.
Reply all
Reply to author
Forward
0 new messages