New Install - Databases data initialization error

Hi all,

Im trying to initialize the empty databases during initial installation and get an error “rake aborted!”.
Any assistance would be appreciated. :slight_smile:

root@debian:~# cd /opt/yeti-web
root@debian:/opt/yeti-web# su -s /bin/bash yeti-web
yeti-web@debian:~$ RAILS_ENV=production ./bin/bundle.sh exec rake db:structure:load db:migrate
rake aborted!
Don’t know how to build task ‘db:structure:load’ (See the list of available tasks with rake --tasks)
Did you mean? db:test:load
/opt/yeti-web/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in <top (required)>' ./vendor/bundler/bin/bundler:25:in load’
./vendor/bundler/bin/bundler:25:in `’
(See full trace by running task with --trace)
yeti-web@debian:~$

Full Trace

yeti-web@debian:~$ RAILS_ENV=production ./bin/bundle.sh exec rake db:structure:load db:migrate --trace
rake aborted!
Don’t know how to build task ‘db:structure:load’ (See the list of available tasks with rake --tasks)
Did you mean? db:test:load
/opt/yeti-web/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task_manager.rb:59:in []' /opt/yeti-web/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:159:in invoke_task’
/opt/yeti-web/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in block (2 levels) in top_level' /opt/yeti-web/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in each’
/opt/yeti-web/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in block in top_level' /opt/yeti-web/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:125:in run_with_threads’
/opt/yeti-web/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:110:in top_level' /opt/yeti-web/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:83:in block in run’
/opt/yeti-web/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:186:in standard_exception_handling' /opt/yeti-web/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:80:in run’
/opt/yeti-web/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in <top (required)>' /opt/yeti-web/vendor/bundle/ruby/3.2.0/bin/rake:25:in load’
/opt/yeti-web/vendor/bundle/ruby/3.2.0/bin/rake:25:in <top (required)>' /opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/cli/exec.rb:58:in load’
/opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/cli/exec.rb:58:in kernel_load' /opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/cli/exec.rb:23:in run’
/opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/cli.rb:492:in exec' /opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/command.rb:27:in run’
/opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' /opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor.rb:392:in dispatch’
/opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/cli.rb:34:in dispatch' /opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/base.rb:485:in start’
/opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/cli.rb:28:in start' /opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.10/libexec/bundle:45:in block in <top (required)>’
/opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/friendly_errors.rb:117:in with_friendly_errors' /opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.10/libexec/bundle:33:in <top (required)>’
/opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.10/libexec/bundler:4:in load' /opt/yeti-web/vendor/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.10/libexec/bundler:4:in <top (required)>’
./vendor/bundler/bin/bundler:25:in load' ./vendor/bundler/bin/bundler:25:in
yeti-web@debian:~$

/opt/yeti-web/config/database.yml

production:
adapter: postgresql
encoding: unicode
database: yeti
pool: 5
username: yeti
password: yeti
host: 127.0.0.1
schema_search_path: ‘gui, public, switch, billing, class4, runtime_stats, sys, logs, data_import’
port: 5432
min_messages: notice

secondbase:
production:
adapter: postgresql
encoding: unicode
database: cdr
pool: 5
username: cdr
password: cdr
host: 192.168.1.53
schema_search_path: ‘cdr, reports, billing’
port: 5432
min_messages: notice

try to use db:schema:load instead of db:structure:load

documentation updated

@dmitry.s Many thanks! This worked like a charm. :slight_smile: