rails get current database name code example Example: rails get current database name Rails.configuration.database_configuration["development"]["database"]