checkiz / elixir-mongo

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

Cannot use anycoll.find.toArray #6

Closed rizafahmi closed 10 years ago

rizafahmi commented 10 years ago

Trying to get documents from mongodb using find.toArray, but get this error:

** (ArgumentError) Got FunctionClauseError with message "no function clause matching in String.Unicode.do_downcase/1" while inspecting %{__struct__: Bson.ObjectId,
  oid: <<83, 203, 170, 13, 66, 103, 129, 127, 73, 179, 187, 210>>}
(elixir) lib/inspect/algebra.ex:174: Inspect.Algebra.to_doc/2
(elixir) lib/inspect.ex:310: Inspect.List.keyword/2
(elixir) lib/inspect/algebra.ex:424: Inspect.Algebra.surround_many/4
(elixir) lib/inspect/algebra.ex:411: Inspect.Algebra.surround_many/6
(elixir) lib/inspect.ex:356: Inspect.Map.inspect/2
(elixir) lib/inspect/algebra.ex:424: Inspect.Algebra.surround_many/4
(elixir) lib/inspect/algebra.ex:411: Inspect.Algebra.surround_many/6
(elixir) lib/kernel.ex:1553: Kernel.inspect/2

Using Elixir version 0.14.1.

mkolosick commented 10 years ago

This seems to be a problem with the elixir-bson. I have forks of elixir-mongo and elixir-bson that work. They're currently both updated for Elixir v0.15.0, but if you look back a few commits it should work on Elixir v0.14.* The latest version may also work on Elixir v0.14.*

jerp commented 10 years ago

Hi, please try with version updated today of elixir-mongo and elixir-bson for Elixir v0.15.1