En el archivo de configuración (config/application.rb para todos los entornos o ambientes config// $ (medio ambiente) .RB particular, sólo para el medio ambiente) añadir esta línea:
config.paths['db/migrate'] += 'db/migrate/other_db'
Y si desea cambiar por defecto '/ db emigran' ruta (config.paths [ 'db/migrar'] es una matriz con una cadena 'db/migrate' de forma predeterminada), haga esto:
config.paths['db/migrate'] = ['db/my_migrate']
Éstos son config.paths predeterminados, que también podemos cambiar:
"app" => ["app"],
"app/assets" => ["app/assets"],
"app/controllers" => ["app/controllers"],
"app/helpers" => ["app/helpers"],
"app/models" => ["app/models"],
"app/mailers" => ["app/mailers"],
"app/views" => ["app/views"],
"lib" => ["lib"],
"lib/assets" => ["lib/assets"],
"lib/tasks" => ["lib/tasks"],
"config" => ["config"],
"config/environments" => ["config/environments"],
"config/initializers" => ["config/initializers"],
"config/locales" => ["config/locales"],
"config/routes" => ["config/routes.rb"],
"db" => ["db"],
"db/migrate" => ["db/migrate"],
"db/seeds" => ["db/seeds.rb"],
"vendor" => ["vendor"],
"vendor/assets" => ["vendor/assets"],
"vendor/plugins" => ["vendor/plugins"],
"config/database" => ["config/database.yml"],
"config/environment" => ["config/environment.rb"],
"lib/templates" => ["lib/templates"],
"log" => ["log/development.log"],
"public" => ["public"],
"public/javascripts" => ["public/javascripts"],
"public/stylesheets" => ["public/stylesheets"],
"tmp" => ["tmp"],
En Rails 4: 'config.paths [ 'db/migrar'] << 'db/migrar/other_db'' – Kris
La correcta la respuesta es 'config.paths ['db/migrate'] << 'db/migrate/other_db'' para Rails 3 o 4. – pisaruk
' config.paths [' db/migrate '] + = [' db/migrate/other_db '] 'también funcionaría. –