Comments (6)
erl -pa ebin/ deps/bson/ebin/
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.4 (abort with ^G)
1> application:start(bson).
ok
2> application:start(crypto).
ok
3> application:start(mongodb).
ok
4> mongo:connect(<<"test">>).
{ok,<0.45.0>}
Everything seems to be working.
Did you run make
in mongodb-erlang directory?
In the last (tooday commit) version crypto application and one more dependency (pbkdf2) were added. But their lack should not rise exception as you post.
from mongodb-erlang.
I tried the exact steps again and the result is the same. I'm running it with erleng R15B01 and you run 17. Could that be the issue?
[edit] i tried with 17.5, the latest in kerl, and no success. I pasted the output below, the last lines are result of trying autocomplete with tab. mongo isn't recognised....
erl -pa ebin/ deps/bson/ebin/
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.4 (abort with ^G)
1> application:start(bson).
ok
2> application:start(crypto).
ok
3> application:start(mongodb).
ok
4> mongo_
mongo_app mongo_id_server
4> mongo_
mongo_app mongo_id_server
4> mongo_
also after removing the mongo-erlang dir and starting from scratch:
git clone git://github.com/mongodb/mongodb-erlang.git
Cloning into 'mongodb-erlang'...
remote: Counting objects: 935, done.
remote: Total 935 (delta 0), reused 0 (delta 0), pack-reused 935
Receiving objects: 100% (935/935), 301.88 KiB | 201 KiB/s, done.
Resolving deltas: 100% (499/499), done.
alex@ElementaryElexy~/dev/erlang $ cd mongodb-erlang/
alex@ElementaryElexy~/dev/erlang/mongodb-erlang $ make
WARN: Expected /home/alex/dev/erlang/mongodb-erlang/deps/bson to be an app dir (containing ebin/*.app), but no .app found.
==> mongodb-erlang (get-deps)
WARN: Expected /home/alex/dev/erlang/mongodb-erlang/deps/bson to be an app dir (containing ebin/*.app), but no .app found.
Pulling bson from {git,"git://github.com/soundrop/bson-erlang","HEAD"}
Cloning into 'bson'...
==> bson (get-deps)
==> bson (compile)
Compiled src/bson_schema.erl
/home/alex/dev/erlang/mongodb-erlang/deps/bson/src/bson.erl:168: Warning: Non-UTF-8 character(s) detected, but no encoding declared. Encode the file in UTF-8 or add "%% coding: latin-1" at the beginning of the file. Retrying with latin-1 encoding.
Compiled src/bson.erl
Compiled src/bson_binary.erl
==> mongodb-erlang (compile)
Compiled src/main/mongo_app.erl
Compiled src/main/mc_super_sup.erl
Compiled src/connection/mc_worker_logic.erl
Compiled src/api/mongo.erl
Compiled src/connection/mc_connection_man.erl
Compiled src/connection/mc_worker.erl
Compiled src/cursor/mc_cursor_sup.erl
Compiled src/core/mc_action_man.erl
Compiled src/core/mongo_id_server.erl
Compiled src/cursor/mc_cursor.erl
Compiled src/core/mongo_protocol.erl
alex@ElementaryElexy~/dev/erlang/mongodb-erlang $ erl -pa ebin deps/bson/ebin
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.4 (abort with ^G)
1> application:start
start/1 start/2 start_boot/1 start_boot/2 start_type/0
1> application:start(bson).
ok
2> application:start(mongodb).
ok
3> mongo_ <-- pressed TAB here
mongo_app mongo_id_server
3> mongo_
from mongodb-erlang.
ok, I see. You clone wrong repo.
git://github.com/mongodb/mongodb-erlang.git is old one, not supported.
Use https://github.com/comtihon/mongodb-erlang.git
It is former mongodb's repo, transfered to me (you can see it on mongodb-drivers official page).
Also I advice you to switch to newer erlang, as this driver may not support <16 version.
from mongodb-erlang.
Yeah, that was it! Thanks.
I made a PR to correct the readme ;-)
#66
from mongodb-erlang.
how to fix this?
sudo ejabberdctl debug
Erlang R16B03 (erts-5.10.4) [source] [64-bit] [async-threads:10] [kernel-poll:true]
Eshell V5.10.4 (abort with ^G)
(ejabberd@localhost)1> Database = <<"test">>.
<<"test">>
(ejabberd@localhost)2> {ok, Connection} = mongo:connect (Database).
** exception error: undefined function mongo:connect/1
from mongodb-erlang.
Please, check if mongo:connect:1
exists in repo you cloned. May be you cloned wrong repo, as above.
Also check, if source server can load mongo module - may be mondodb-erlang/ebin is not included.
Finally - check if you built mongodb-erlang.
from mongodb-erlang.
Related Issues (20)
- Generic server terminating HOT 4
- Issue connecting to ReplicaSet HOT 2
- Issue connecting to ReplicaSet HOT 7
- Failed to update package rebar_ct from repo hexpm HOT 3
- Are distinct and aggregate command supported? HOT 2
- Maintenance plans? HOT 2
- MongoDB 4.2 cluster "Can't pass authentification" in 2nd erlang node HOT 8
- API Consistency Question HOT 1
- Connection Pool Issue HOT 2
- How to use SSL? HOT 2
- Is collation supported?
- undefined function erlang:get_stacktrace/0 HOT 1
- Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true
- Add support for MongoDB 6.X+ HOT 15
- How can I create/drop a collection using the driver HOT 1
- Master-slave switchover error
- Can't canonicalize query :: caused by :: unknown operator: $maxDistance
- OP_QUERY is no longer supported HOT 1
- How to add limit in find function in mongo_api call
- MongoDB 7.0.12 Does it work?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongodb-erlang.