Skip to content

undefined method `review_metrics' when rake frab:conference_export #598

@pcfe

Description

@pcfe

disclaimer, noob frab user

I started looking into frab only 2 days ago and I know little to no Ruby, so I may very well be doing something wrong.

description of problem

Trying to backup I run into

undefined method `review_metrics' for #<Conference…

steps to reproduce

  1. install frab (container deployment)
  2. create a test conference
  3. add days
  4. add events, set as 'scheduled' (simply because it was a first test)
  5. do not test submission grading yet
  6. try to backup with RAILS_ENV=production CONFERENCE=acronym rake frab:conference_export

actual result

pcfe@karhu frab (pcfe-testing-201911) $ oc rsh frab-68-wx9qn 
$ bash
frab@frab-68-wx9qn:~/app$ . .env.production 
frab@frab-68-wx9qn:~/app$ RAILS_ENV=production CONFERENCE=desm201911 rake frab:conference_export --trace
** Invoke frab:conference_export (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute frab:conference_export
rake aborted!
NoMethodError: undefined method `review_metrics' for #<Conference:0x000055a656d12fc0>
/usr/local/bundle/gems/activemodel-5.2.2.1/lib/active_model/attribute_methods.rb:430:in `method_missing'
/home/frab/app/app/lib/import_export_helper.rb:27:in `block in run_export'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `block in transaction'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `transaction'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/transactions.rb:212:in `transaction'
/home/frab/app/app/lib/import_export_helper.rb:20:in `run_export'
/home/frab/app/lib/tasks/frab_import_export.rake:12:in `block (2 levels) in <main>'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/task.rb:280:in `block in execute'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/task.rb:280:in `each'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/task.rb:280:in `execute'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/task.rb:198:in `invoke_with_call_chain'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/task.rb:187:in `invoke'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/application.rb:160:in `invoke_task'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/application.rb:116:in `each'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/application.rb:116:in `block in top_level'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/application.rb:110:in `top_level'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/application.rb:83:in `block in run'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/bundle/gems/rake-13.0.0/lib/rake/application.rb:80:in `run'
/usr/local/bundle/gems/rake-13.0.0/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/rake:23:in `load'
/usr/local/bundle/bin/rake:23:in `<main>'
Tasks: TOP => frab:conference_export
frab@frab-68-wx9qn:~/app$

expected result

export written to tmp/frab_export

additional info

if I revert 658c7ef, then I can create an export just fine
(which I then pull off the pod with oc rsync)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions