Ruby on Rails -creating a new rails app using non standard database adapter in ruby on rails- ruby on rails tutorial - rails guides - rails tutorial - ruby rails
Rails is shipped by default with ActiveRecord, an ORM (Object Relational Mapping) derived from the pattern with the same name. As an ORM, it is built to handle relational-mapping, and more precisely by handling SQL requests for you, hence the limitation to SQL databases only. However, you can still create a Rails app with another database management system
- simply create your app without active-record
- add our own database management system in Gemfile
- bundle install and follow the installation steps from the desired database.
In this example, mongoid is an object mapping for MongoDB and - as many other database gems built for rails - it also inherits from ActiveModel the same way as ActiveRecord, which provides a common interface for many features such as validations, callbacks, translations, etc.
Other database adapters include, but are not limited to :
- datamapper
- sequel-rails