Table of Contents
Configurations in Lafcadio are set in-Ruby, as opposed to an external file with YAML or XML. If you want to swap out different configurations, it's easy enough to do so by requiring different Ruby files.
For this tutorial we'll create a single Ruby file called
tutorial_setup.rb. Here's what it should look like to start:
require 'rubygems' require_gem 'lafcadio' Lafcadio::LafcadioConfig.set_values( 'dbuser' => 'test', 'dbpassword' => 'password', 'dbname' => 'test', 'dbhost' => 'localhost' )
Of course, if you're not using Rubygems you should just replace the first two lines with "require 'lafcadio'".
You can test this configuration with:
% ruby -e "require 'tutorial_setup'; Lafcadio::ObjectStore.get_object_store"