datanoise / mongo.cr

Crystal binding for MongoDB C Driver
MIT License
97 stars 35 forks source link

Is this project dead? #17

Closed ghost closed 7 years ago

ghost commented 7 years ago

Sure, there was a last commit some time ago, but there are so old issues and pull requets, also it isn't working with the current crystal version.

You solved on error, than you have another one. No end there.

@datanoise

datanoise commented 7 years ago

I'm trying to keep the project up to date with recent crystal and mongo-c version. In particular, all spec pass on OSX with crystal 0.20.5 and mongo-c 1.6.0.

Closing this, since this is not an issue report.

ghost commented 7 years ago

I am trying to use this library but it isn't working at all. Only errors over errors.

datanoise commented 7 years ago

I can't help if you don't post any details.

ghost commented 7 years ago

The error I get every time

/home/vagrant/.cache/crystal/crystal-run-spec.tmp: error while loading shared libraries: libmongoc-1.0.so.0: cannot open shared object file: No such file or directory

Without sudo:

.....................................Invalid memory access (signal 11) at address 0xa0
[4896085] *CallStack::print_backtrace:Int32 +117
[4776904] __crystal_sigfault_handler +56
[6236964] sigfault_handler +40
[140240773700784] ???
[140240784889338] ???
[140240784889580] mongoc_client_new +76
[5585662] *Mongo::Client#initialize<String>:Nil +30
[5585601] *Mongo::Client::new<String>:Mongo::Client +81
[4833136] *create_client:Mongo::Client +16
[4833027] *create_database:Mongo::Database +19
[4831676] ~procProc(Nil) +12
[4786322] *it<String, String, Int32, Int32, &Proc(Nil)>:(Array(Spec::Result) | Nil) +482
[4831451] ~procProc(Nil) +91
[5171751] *Spec::RootContext::describe<String, String, Int32, &Proc(Nil)>:Spec::Context+ +391
[4831351] *describe<Mongo::BulkOperation:Class, String, Int32, &Proc(Nil)>:Spec::Context+ +55
[4715759] ???
[4776649] main +41
[140240761034733] __libc_start_main +237
[4710937] ???
datanoise commented 7 years ago

it looks like a configuration issue. If you are on linux, check the output of ldconfig -v and make sure that libmongoc-1.0.so.0 is listed.

ghost commented 7 years ago

libmongoc-1.0.so.0 -> libmongoc-1.0.so.0.0.0 is listed

ghost commented 7 years ago

@datanoise Ok, works now. I don't know why but it works. We need to create a setup guide for Linux.

And I won't use crystal spec again for testing, only errors.

ghost commented 7 years ago

@datanoise I developed a simpler interface for mongo.cr, I also worked with Database Models to simplify stuff. Maybe you could take a look trough the code. mongodb.cr