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
> 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
···
On Fri, Sep 9, 2011 at 4:31 AM, treydock wrote:
Thanks
–
You received this message because you are subscribed to the Google Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en.
YES!
That fixed it, thank you.
···
On Sep 9, 12:36 am, Ohad Levy wrote:
> On Fri, Sep 9, 2011 at 4:31 AM, treydock 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
>
>
>
>
>
>
>
> > Thanks
> > - Trey
>
> > --
> > You received this message because you are subscribed to the Google Groups "Foreman users" group.
> > To post to this group, send email to foreman-users@googlegroups.com.
> > To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/foreman-users?hl=en.