Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
undefined method `hypervisor' when Edit host
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
treydock  
View profile  
 More options Sep 8 2011, 9:31 pm
From: treydock <treyd...@gmail.com>
Date: Thu, 8 Sep 2011 18:31:03 -0700 (PDT)
Local: Thurs, Sep 8 2011 9:31 pm
Subject: undefined method `hypervisor' when Edit host
I just upgraded Foreman to the nightly from Sept 7th, and now when I
select "Edit" on any host I get the following...

undefined method `hypervisor' for # NoMethodError

/usr/share/foreman/vendor/rails/activerecord/lib/active_record/
attribute_methods.rb:260:in `method_missing'
/usr/share/foreman/app/controllers/hosts_controller.rb:480:in
`load_vars_for_ajax'
/usr/share/foreman/app/controllers/hosts_controller.rb:102:in `edit'

This happens on all hosts, physical and virtual.

Thanks
- Trey


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ohad Levy  
View profile  
 More options Sep 9 2011, 1:36 am
From: Ohad Levy <ohadl...@gmail.com>
Date: Fri, 9 Sep 2011 08:36:34 +0300
Local: Fri, Sep 9 2011 1:36 am
Subject: Re: [foreman-users] undefined method `hypervisor' when Edit host
On Fri, Sep 9, 2011 at 4:31 AM, treydock <treyd...@gmail.com> wrote:
> I just upgraded Foreman to the nightly from Sept 7th, and now when I
> select "Edit" on any host I get the following...

> undefined method `hypervisor' for # NoMethodError

> /usr/share/foreman/vendor/rails/activerecord/lib/active_record/
> attribute_methods.rb:260:in `method_missing'
> /usr/share/foreman/app/controllers/hosts_controller.rb:480:in
> `load_vars_for_ajax'
> /usr/share/foreman/app/controllers/hosts_controller.rb:102:in `edit'

> This happens on all hosts, physical and virtual.

my bad :)

does the following fixes it?

diff --git a/app/controllers/hosts_controller.rb b/app/controllers/hosts_control
index 1f031d5..b2c95e6 100644
--- a/app/controllers/hosts_controller.rb
+++ b/app/controllers/hosts_controller.rb
@@ -477,7 +477,7 @@ class HostsController < ApplicationController
     @domain          = @host.domain
     @operatingsystem = @host.operatingsystem
     @medium          = @host.medium
-    @hypervisor      = @host.hypervisor
+    @hypervisor      = @host.hypervisor if @host.respond_to?(:hypervisor)
   end

Ohad


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
treydock  
View profile  
 More options Sep 9 2011, 10:42 am
From: treydock <treyd...@gmail.com>
Date: Fri, 9 Sep 2011 07:42:58 -0700 (PDT)
Local: Fri, Sep 9 2011 10:42 am
Subject: Re: undefined method `hypervisor' when Edit host

On Sep 9, 12:36 am, Ohad Levy <ohadl...@gmail.com> wrote:

YES!

That fixed it, thank you.

- Trey


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »