Getting Started » Installation
Choose one or more adapters that you intend to use, and run the install command
for each one (or add it to your
Compatible with rom 3.0:
|Adapter||Install Command||On production?|
Outdated (help wanted!) adapters:
|Adapter||Install Command||Production ready?|
How to choose an adapter?
The most popular adapter is
rom-sql, but some projects connect to an HTTP API, or need the expandability of MongoDB and CouchDB. It's up to you to choose the appropriate solution for your application's needs.
rom-repository or add it to your
Gemfile. Adapters will be
auto-loaded based on configuration settings.
For example, if you'd like to use ROM with an SQL database, add following gems to
gem 'rom-repository' gem 'rom-sql'
ROM needs a setup phase to provide a persistence environment for your entities. The end result is the container, an object that provides access to relations and commands, and integrates the two with your mappers.
Depending on your application needs, you may want to use different setup strategies:
- Setup DSL - suitable for small scripts
- Rails - setup integrated with Rails
- Explicit - suitable for custom environments (advanced usage)
Note: Most guide examples are written specifically for the
rom-sqladapter. If you are using a different one, consult that adapter's documentation as well.