Closed tleyden closed 12 years ago
I managed to get couchbeam to load in the shell via the following:
$ cd ebin
$ erl
> code:add_patha("/Users/tleyden/Documents/work/tools/couchbeam/deps/ibrowse/ebin").
> code:add_patha("/Users/tleyden/Documents/work/tools/couchbeam/deps/jiffy/ebin").
> code:add_patha("/Users/tleyden/Documents/work/tools/couchbeam/deps/mochiweb/ebin").
> code:add_patha("/Users/tleyden/Documents/work/tools/couchbeam/deps/oauth/ebin").
> code:add_patha("/Users/tleyden/Documents/work/tools/couchbeam/deps/proper/ebin").
> application:start(crypto).
> application:start(public_key).
> application:start(sasl).
> application:start(ibrowse).
> application:start(ssl).
> application:start(couchbeam).
> Host = "localhost",
> Port = 5984,
> Prefix = "",
> Options = [],
> S = couchbeam:server_connection(Host, Port, Prefix, Options).
> {ok, _Version} = couchbeam:server_info(S).
Which prints:
{ok,{[{<<"couchdb">>,<<"Welcome">>},
{<<"version">>,<<"1.2.0">>}]}}
Is there an easier way to get this to work or some crucial step I'm missing?
The easiest way is to get rebar (https://github.com/basho/rebar) which is a neat tool for building erlang applications. Then $ cd couchbeam $ rebar get-deps (this will fetch the required dependencies for you) $ rebar compile (this will build the application) $ cd ebin $ erl 1> couchbeam:start(). (this will start couchbeam application making sure all the required dependencies are loaded.
No idea why tests fail though.
Cheers
Great, that worked! The tests now pass too.
I'm an erlang and couchbeam noob .. and just want to be in an erlang shell where I can experiment with couchbeam as I'm writing my own module.
Here's what I've tried:
and then:
Also, not sure if it is related, but I'm not able to run "make test" either: