This project is basically an ActiveRecord connector for the Mimer SQL database. It uses ODBC to communicate with the database, and supports most regular operations and migrations.
unixODBC 2.2.8 or later
A good installation instruction can be found at http://developer.mimer.com/howto/howto_57.htm
Using ActiveRecord Mimer
Standalone, with ActiveRecord
Using this adapter is very simple, but requires that you manually add the adapter. So, to use it in a script, add this to the requires':
RAILS_CONNECTION_ADAPTERS = ['mimer'] require 'active_record'
After this you can establish a JDBC connection like this:
ActiveRecord::Base.establish_connection( :adapter => 'mimer', :dsn => 'yourODBCdsn', :username => 'username', :password => 'pwd' )
If provided, password and username will be used. After the connection is established Active Record can be used as usual.
Using the adapter inside Rails is slightly more complicated, since we don't have control over the load process. The easiest way to add Mimer support is to manually edit your environment.rb, and add this line:
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
The head of my environment.rb after these modifications look like this:
RAILS_GEM_VERSION = '1.1.6' # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') require 'mimer_adapter' Rails::Initializer.run do |config| # Settings in config/environments/* take precedence those specified here
This project was written by: Fredrik Ålund and Ola Bini with some code from rails-odbc.
ActiveRecord-Mimer is released under an MIT license.