@Back1115

Ошибка создания базы данных из db / schema.rb?

Привет, мне нужно из одной бд перенести данные в новую бд желательно сохранив при этом информацию (есть оригинальный schema.rb).
При выполнении команды rake db:migrate или rake db:schema:load то выходит такая ошибка:
Tasks: TOP => db:schema:load => environment
Ошибка длинная так что я её поместил в:
spoiler
I, [2017-12-26T09:35:49.851043 #9601] INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ git.io/vJf3J ]
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
ArgumentError: wrong number of arguments (2 for 1)
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-0.17.3/lib/celluloid/calls.rb:48:in `check'
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-0.17.3/lib/celluloid/calls.rb:26:in `dispatch'
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:16:in `dispatch'
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-0.17.3/lib/celluloid/cell.rb:50:in `block in dispatch'
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-0.17.3/lib/celluloid/cell.rb:76:in `block in task'
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-0.17.3/lib/celluloid/actor.rb:339:in `block in task'
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-0.17.3/lib/celluloid/task.rb:44:in `block in initialize'
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-0.17.3/lib/celluloid/task/fibered.rb:14:in `block in create'
(celluloid):0:in `remote procedure call'
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:45:in `value'
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-0.17.3/lib/celluloid/proxy/sync.rb:22:in `method_missing'
/home/user/.rvm/gems/ruby-2.4.1/gems/listen-2.7.12/lib/listen/listener.rb:206:in `_init_actors'
/home/user/.rvm/gems/ruby-2.4.1/gems/listen-2.7.12/lib/listen/listener.rb:87:in `block in '
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-fsm-0.20.5/lib/celluloid/fsm.rb:176:in `instance_eval'
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-fsm-0.20.5/lib/celluloid/fsm.rb:176:in `call'
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-fsm-0.20.5/lib/celluloid/fsm.rb:129:in `transition_with_callbacks!'
/home/user/.rvm/gems/ruby-2.4.1/gems/celluloid-fsm-0.20.5/lib/celluloid/fsm.rb:97:in `transition'
/home/user/.rvm/gems/ruby-2.4.1/gems/listen-2.7.12/lib/listen/listener.rb:100:in `start'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/evented_file_update_checker.rb:90:in `boot!'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/evented_file_update_checker.rb:61:in `initialize'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/i18n_railtie.rb:59:in `new'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/i18n_railtie.rb:59:in `initialize_i18n'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/i18n_railtie.rb:15:in `block in '
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:67:in `block in execute_hook'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:49:in `each'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks'
/home/user/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/application/finisher.rb:65:in `block in '
/home/user/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/initializable.rb:30:in `instance_exec'
/home/user/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/initializable.rb:30:in `run'
/home/user/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/user/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
/home/user/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/home/user/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
/home/user/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
/home/user/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:347:in `each'
/home/user/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:347:in `call'
/home/user/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
/home/user/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
/home/user/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
/home/user/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/initializable.rb:54:in `run_initializers'
/home/user/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/application.rb:352:in `initialize!'
/home/user/apps/drillsystem/config/environment.rb:5:in `'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:293:in `require'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:293:in `block in require'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:259:in `load_dependency'
/home/user/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:293:in `require'
/home/user/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/application.rb:328:in `require_environment!'
/home/user/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/task.rb:251:in `each'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
/home/user/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/task.rb:217:in `block in invoke_prerequisites'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/task.rb:215:in `each'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/task.rb:215:in `invoke_prerequisites'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
/home/user/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:160:in `invoke_task'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:116:in `each'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:125:in `run_with_threads'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:110:in `top_level'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:83:in `block in run'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
/home/user/.rvm/gems/ruby-2.4.1/gems/rake-12.3.0/exe/rake:27:in `'
/home/user/.rvm/gems/ruby-2.4.1/bin/rake:22:in `load'
/home/user/.rvm/gems/ruby-2.4.1/bin/rake:22:in `'
/home/user/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
/home/user/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `'
  • Вопрос задан
  • 85 просмотров
Пригласить эксперта
Ответы на вопрос 2
Лучше сделать перенос данных средствами СУБД. Для mysql это mysqldump.
Ответ написан
Комментировать
Dem1
@Dem1 Куратор тега Ruby on Rails
Ruby on Rails developer
Для PostgreSQL:
pg_dump db_name > db_name_2017_12_26.sql
psql new_db_name < db_name_2017_12_26.sql
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы