Ivanchuk-1: how to set ":company" by rail runner script?

  • Following script used to work, but for new ivanchuk-1 , it is breaking due to unavailable “.set_config” method.
[root@miqtest01 vmdb]#  bin/rails runner  'MiqServer.my_server.set_config(:server => {:name => "miqtest01", :company => "My company"})'
Please specify a valid ruby command or the path of a script to run.
Run 'bin/rails runner -h' for help.

undefined method `set_config' for #<MiqServer:0x00000000030c3318>
[root@miqtest01 vmdb]#

Apparently this has been changed to add_settings_for_resource

1 Like

@buc, Thanks for the pointer to source code. I updated my script and confirm the change from “set_config” to “add_settings_for_resource” was able set the setting I wanted.