erlangwebmachine

Error setting up Webmachine


I'm on OS X 10.10.1 and I have Erlang installed. Namely:

Erlang/OTP 17 [erts-6.2.1] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

I would like to follow one of the many webmachine introductory tutorials, and create a new project - unfortunately I always get stuck. Here's my process:

  1. $ git clone https://github.com/basho/webmachine.git
  2. $ ./webmachine/scripts/new_webmachine.sh testproject

The second command fails with:

==> priv (create) ERROR: Template wmskel not found. ERROR: create failed while processing /Users/wasabii/webmachine/priv: rebar_abort

I have not been able to get any further than the above error message, displayed on both Ubuntu 14 and OS X. In the former case, it was a fresh setup, that only performed a sudo apt-get git/erlang before attempting to run the shell script.

Is there something I'm missing? I don't quite understand the error message.


Solution

  • Unfortunately it appears you've run into a problem caused by an update to the rebar executable in the top-level directory of the webmachine repository. If you check out commit a85499e instead, everything should work as you'd expect:

    $ git checkout develop
    Switched to branch 'develop'
    Your branch is up-to-date with 'origin/develop'.
    $ ./scripts/new_webmachine.sh testproject /tmp
    ==> priv (create)
    ERROR: Template wmskel not found.
    ERROR: create failed while processing /usr/local/src/webmachine/priv: rebar_abort
    $ git checkout a85499e
    Note: checking out 'a85499e'.
    
    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.
    
    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:
    
      git checkout -b new_branch_name
    
    HEAD is now at a85499e... Merge pull request #210 from basho/feature/log-request-times
    $ ./scripts/new_webmachine.sh testproject /tmp
    ==> priv (create)
    Writing /tmp/testproject/README
    Writing /tmp/testproject/Makefile
    Writing /tmp/testproject/rebar.config
    Writing /tmp/testproject/rebar
    Writing /tmp/testproject/start.sh
    Writing /tmp/testproject/src/testproject.app.src
    Writing /tmp/testproject/src/testproject.erl
    Writing /tmp/testproject/src/testproject_app.erl
    Writing /tmp/testproject/src/testproject_sup.erl
    Writing /tmp/testproject/src/testproject_config.erl
    Writing /tmp/testproject/src/testproject_resource.erl
    

    I've reported this as an issue in the webmachine github repository.