Using Riak ez files from Webmachine

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Riak ez files from Webmachine

Alan McKean
I jave a Webmachine app that uses RiakClient to communicate with Riak. With 0.8, I simply put a softlink to the Riak beam files in Webmachine's deps directory. But it doesn't work that way with the ez files. I know I can just build riak and use the 0.9.1 beam files in the same fahsion, but is there a way that I can reference Riak's ez files from Webmachine?

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Using Riak ez files from Webmachine

Rusty Klophaus
Hi Alan,

You have a few options here:

.ez files are really just zip files, so if you want you can unzip riak-0.9.1.ez into a deps directory in your webmachine application and add it to your code path using the "-pa" argument. (Remember to update this during upgrades.)

Alternatively, check if $ERL_LIBS is defined in your system by running "echo $ERL_LIBS". This points to a location from which Erlang will load code packaged in .ez format. 
  • If $ERL_LIBS is set, then simply copy the "riak-0.9.1" directory and "riak-0.9.1.ez" file into this directory.(Again, remember to update this during upgrades.)
  • If $ERL_LIBS is not set, then you can set it to point to the ./riak/lib directory. Put "export ERL_LIBS=$RIAK/lib" in the startup script for your Webmachine application, and Erlang will load code from the lib directory. Be careful, as this will make ALL of the code under the lib directory available. If your webmachine application runs on a different version of webmachine or mochiweb than what Riak uses, then this could lead to problems.
Best,
Rusty

On Fri, Mar 12, 2010 at 11:37 AM, Alan McKean <[hidden email]> wrote:
I jave a Webmachine app that uses RiakClient to communicate with Riak. With 0.8, I simply put a softlink to the Riak beam files in Webmachine's deps directory. But it doesn't work that way with the ez files. I know I can just build riak and use the 0.9.1 beam files in the same fahsion, but is there a way that I can reference Riak's ez files from Webmachine?

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



--
Rusty Klophaus
Basho Technologies, Inc.
http://basho.com

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com