Can we put any number of databases in YML file?

Eriko Uchi wrote:

By default, RubyOnRails let you have 3 databases, development, test and production. Can we add more databases in this file? Is there any limitation?

Can we change RAILS_ENV to 'beatlemania', add a matching item to the config/environment folder and the database.yml file?

Under Rails, I suspect the answer is yes, because Convention over Configuration allows the system to minimize all its configuration systems. But I suspect nobody ever needed to do this.

You are not asking for a new concept, beyond the natural trinity of test, develop, and produce. You are just asking for alternate databases. Toke some eRB:

production:   adapter: mysql   database: rails_production

  database: <%= ENV['RAILS_DB'] %>

Now set that environmental variable (in the environment, or in config/boot.rb if you can't access the environment).