Guest User

Untitled

a guest
Feb 11th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. root@infor01p1.infra.smf1.mobitv: ~# foreman-rake console
  2. Loading production environment (Rails 5.2.1)
  3. Failed to load console gems, starting anyway
  4. irb(main):001:0> User.current = User.where(:admin => true).first
  5. => #<User id: 3, login: "admin", firstname: "Admin", lastname: "User", mail: "root@infra.smf1.mobitv", admin: true, last_login_on: "2019-02-11 12:39:24", auth_source_id: 1, created_at: "2016-05-06 21:23:59", updated_at: "2016-12-09 19:51:56", password_hash: "1fd1230d7205a56b9b07426d07e447135b155946", password_salt: "79901d1e0fb1771247aae6d650eceb6752759fc3", locale: nil, avatar_hash: nil, default_organization_id: nil, default_location_id: nil, lower_login: "admin", mail_enabled: true, timezone: nil, description: nil, password: nil>
  6. irb(main):002:0> c = Foreman::Model::Vmware.where(:name => 'PAYTV-DEV')
  7. => #<ActiveRecord::Relation [#<Foreman::Model::Vmware id: 22, name: "PAYTV-DEV", description: "", url: "invct01p1.infra.smf1.mobitv", user: "infra.smf1.mobitv\\it", password: "encrypted-cWFrSDR5L2lEY1BvZFJSV2FaRVVsT0ZUcm05QW0v...", uuid: "PAYTV-DEV", type: "Foreman::Model::Vmware", created_at: "2019-01-21 13:05:01", updated_at: "2019-01-21 13:05:01", attrs: {:setpw=>1, :pubkey_hash=>"64aa51dac42cfb7f477dcb19d858cab810af29bbf685d68c00bd542c1f472d7c"}, email: nil, caching_enabled: true, domain: nil, http_proxy_id: nil>]>
  8.  
  9. NameError (undefined local variable or method `networks' for main:Object)
  10. irb(main):004:0> c.networks
  11. Traceback (most recent call last):
  12. 2: from lib/tasks/console.rake:5:in `block in <top (required)>'
  13. 1: from (irb):4
  14. NoMethodError (undefined method `networks' for #<Foreman::Model::Vmware::ActiveRecord_Relation:0x0000000009c8aa10>)
  15. irb(main):005:0> c.available_networks
  16. Traceback (most recent call last):
  17. 2: from lib/tasks/console.rake:5:in `block in <top (required)>'
  18. 1: from (irb):5
  19. NoMethodError (undefined method `available_networks' for #<Foreman::Model::Vmware::ActiveRecord_Relation:0x0000000009c8aa10>)
  20. irb(main):006:0>
Add Comment
Please, Sign In to add comment