mururu / mongoex

Elixir ODM-like module for MongoDB
54 stars 14 forks source link

Cant compile #9

Open tiagodll opened 10 years ago

tiagodll commented 10 years ago

Hi, i am trying to use this in a dynamo application, but I get this error all the time:

* Compiling mongodb
==> mongodb (compile)
src/mongo.erl:394: syntax error before: '.'
src/mongo.erl:34: function add_user/3 undefined
src/mongo.erl:391: spec for undefined function mongo:add_user/3
src/mongo.erl:380: Warning: crypto:md5/1 is deprecated and will be removed in in a future release; use crypto:hash/2
src/mongo.erl:383: Warning: crypto:md5/1 is deprecated and will be removed in in a future release; use crypto:hash/2
ERROR: compile failed while processing /home/tiago/code/test/deps/mongodb: rebar_abort
** (Mix) Could not compile dependency mongodb, /home/tiago/.mix/rebar command failed. If you want to recompile this dependency, please run: mix deps.compile mongodb

here it is my deps:

defp deps do
    [ { :cowboy, github: "extend/cowboy" },
      { :dynamo, "~> 0.1.0-dev", github: "elixir-lang/dynamo" },
      { :mongoex, github: "mururu/mongoex" },
      { :json, github: "cblage/elixir-json"}
    ]
  end

am I doing something wrong here?

thanks

ryanhall-ttec commented 10 years ago

This is an issue with the erlang driver and your version of erlang. Atoms with a . in them have to be wrapped in single quotes. If you find that line, and quote the system.user, you will be able to compile.

(I think you have to do this for a second line in that same function)

The issue then becomes dealing with that dependency going forward.