Category Archives: erlang

Generate and publish edoc in Jenkins using Javadoc plugin

edoc is Erlang’s answer to javadoc and can be easily added to an existing Jenkins  Erlang build job leveraging the Jenkins javadoc plugin to generate and display documentation. Generate edoc Generate edoc for a rebar enabled project by invoking the following command ./rebar doc skip_deps=true This automatically creates creates a doc dir which will be […]

webmachine – wmtrace exception

webmachine – wmtrace exception – Problem discription I was getting the following exception when i thought i had wmtrace successfully set up. The server encountered an error while processing this request: [{erlang,iolist_to_binary,[error],[]}, {webmachine_decision_core,encode_body,1, [{file,"src/webmachine_decision_core.erl"}, {line,668}]}, {webmachine_decision_core,decision,1, [{file,"src/webmachine_decision_core.erl"}, {line,567}]}, {webmachine_decision_core,handle_request,2, [{file,"src/webmachine_decision_core.erl"}, {line,33}]}, {webmachine_mochiweb,loop,2,[{file,"src/webmachine_mochiweb.erl"},{line,74}]}, {mochiweb_http,parse_headers,5,[{file,"src/mochiweb_http.erl"},{line,180}]}, {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}] I had following setup complete and i was seeing the .trace […]

escript: bad_central_directory

escript: bad_central_directory escript is packaged as part of the erlang otp and essentially executes uncompiled erlang code. Rebar delegates alot of work to it. Recently, I was getting the following error when trying to run the webmachine project files from the excellent book, ‘7 webservers in 7 weeks‘. I’m running R16B02 on OS X $ […]

Creating a RESTful Service in Chicago Boss

Here’s an end-to-end REST implementation in Chicago Boss. Not sure has anyone a nice concise guide out there so hope this is useful. Overview A very simple model (Book[title, author, insertTimestamp, updateTimestamp]) CRUD implementation where             Create is a POST request             Read is a […]

ChicagoBoss – The requested template (“src/view/blaindex.{dtl,html,txt,js,jade,eex}”) was not found. Additionally, no handler was found for processing 404 errors. You probably want to modify bla.routes to prevent errors like this one.

I wasted a lot of time with the above exception. Editing the routes file to no avail. The problem here is most likely with the controller. The problem in my case was that IntelliJ added below by default %% API -export([]). where it should have been %% API -compile(export_all). Simple one, but wasted a lot […]

Vagrantfile for an Erlang/MySql project using Chef

Vagrant is a great tool for getting a virtualized server up and running The following is a cookbook and Vagrantfile for setting up a 64bit ubuntu box. I had a lot of workarounds to get an environment successfully set up, hopefully this will ease the pain Install Vagrant and VirtualBox Create cookbook folder for chef Clone […]

bcrypt install trouble

Bcrypt is a useful library for erlang encryption. It is used by the Colosimo sample app I had some trouble installing bcrypt. When i typed the following in terminal: erl crypto:start(). bcrypt:start(). I got the following exception: ** exception error: undefined function bcrypt:start/0 or the following from ChicagoBoss: {undef, [{bcrypt,start,[],[]}, To get it working, start […]

ChicagoBoss Project Structure

ChicagoBoss is really neat. One thing I’m swinging toward though in relation to project layout is to keep the ChicagoBoss-<Version#> at the dir structure. A lot of the tutorials talk about renaming to ‘ChicagoBoss’. I’d see the benefits of keeping the version number as follows: Easier to upgrade Easier to test with different versions (including […]


simple blog documenting issue solutions and gotcha’s from someone trying to get up to speed on erlang