Forum: Ruby mogilefs-1.0.1

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Eric H. (Guest)
on 2006-03-22 21:24
(Received via mailing list)
Rubyforge Project:


== About

This is a client for Danga's MogileFS distributed file system.  For
on MogileFS see:

== Installing mogilefs

First you need a MogileFS setup.  You can find information on how to
do that at the above URL.

Then install the gem:

   $ sudo gem install mogilefs

== Using mogilefs

   # Create a new instance that will communicate with these trackers:
   hosts = %w[]
   mg = => 'test', :hosts => hosts
                               :root => '/mnt/mogilefs')

   # Stores "A bunch of text to store" into 'some_key' with a class
of 'text'.
   mg.store_content 'some_key', 'text', "A bunch of text to store"

   # Retrieve data from 'some_key'
   data = mg.get_file_data 'some_key'

   # Store the contents of 'image.jpeg' into the key 'my_image' with
a class of
   # 'image'.
   mg.store_file 'my_image', 'image', 'image.jpeg'

   # Store the contents of 'image.jpeg' into the key 'my_image' with
a class of
   # 'image' using an open IO. 'image.jpeg' do |fp|
     mg.store_file 'my_image', 'image', fp

   # Remove the key 'my_image' and 'some_key'.
   mg.delete 'my_image'
   mg.delete 'some_key'


This client is only known to work in NFS mode.  HTTP mode is
implemented but
completely untested.  If you find a bug, please report it on the

Eric H. - removed_email_address@domain.invalid -
This implementation is HODEL-HASH-9600 compliant
Ezra Z. (Guest)
on 2006-03-22 21:35
(Received via mailing list)
Awesome Eric Thanks!

This topic is locked and can not be replied to.