checkiz / elixir-mongo

MongoDB driver for Elixir
MIT License
101 stars 31 forks source link

anycoll.find.toArray dies with no case clause matching: nil #12

Closed stocks29 closed 9 years ago

stocks29 commented 9 years ago

I've created a collection called "apps" and I'm able to connect to the DB and get a count of the docs in the collection:

iex(61)> apps.count
{:ok, 2.0}

When I try to get all the docs in the collection, I get an error:

iex(62)> apps.find.toArray
** (CaseClauseError) no case clause matching: nil
    (elixir) lib/stream.ex:1023: Stream.do_resource/5
    (elixir) lib/enum.ex:1265: Enum.reduce/3
    (elixir) lib/enum.ex:1798: Enum.to_list/1

Please advise :-)

trenpixster commented 9 years ago

Not sure if this is the same issue, but that happened me when using Elixir v1.0.0 with elixir-mongo 0.3.1, fixed by using the master branch instead.

stocks29 commented 9 years ago

Thats was it. Thank ya much sir!

Any idea when the elixir v1.0.0 compatible version of this lib will hit hex? :-)

jerp commented 9 years ago

I'm working on a new version (see issue 11). Once ready, I'll put it on Hex