Undefined method `to_label' for #<Fog::Compute::Vsphere::Folder:...>

hi,

after reinstalling our production foreman host i do get the following
exception in production.log if i try to create a new host within vmware
vsphere:

<snip>
Started POST "/hosts/compute_resource_selected" for 10.255.1.30 at Thu May
23 10:17:19 +0200 2013
Processing by HostsController#compute_resource_selected as
Parameters: {"operatingsystem_id"=>"", "architecture_id"=>"",
"compute_resource_id"=>"9"}
ESC[1mESC[36mUser Load (0.4ms)ESC[0m ESC[1mSELECT "users".* FROM "users"
WHERE "users"."id" = 1 LIMIT 1ESC[0m
Setting current user thread-local variable to admin
ESC[1mESC[35mSetting Load (0.4ms)ESC[0m SELECT "settings".* FROM
"settings" WHERE "settings"."name" = 'authorize_login_delegation' ORDER BY
LOWER(settings.name) LIMIT 1
ESC[1mESC[36mCACHE (0.0ms)ESC[0m ESC[1mSELECT "settings".* FROM
"settings" WHERE "settings"."name" = 'authorize_login_delegation' ORDER BY
LOWER(settings.name) LIMIT 1ESC[0m
ESC[1mESC[35mSQL (0.9ms)ESC[0m SELECT a.attname,
format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"compute_resources"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
ESC[1mESC[36mComputeResource Load (0.4ms)ESC[0m ESC[1mSELECT
"compute_resources".* FROM "compute_resources" WHERE
"compute_resources"."id" = 9 ORDER BY LOWER(compute_resources.name) LIMIT
1ESC[0m
Rendered compute_resources_vms/form/_vmware.html.erb (1672.7ms)
Rendered hosts/_compute.html.erb (3054.2ms)
Operation FAILED: undefined method to_label&#39; for #&lt;Fog::Compute::Vsphere::Folder:0x7fd5c9dd1d40&gt; /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.20/lib/action_view/helpers/form_options_helper.rb:341:insend'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.20/lib/action_view/helpers/form_options_helper.rb:341:in
options_from_collection_for_select&#39; /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.20/lib/action_view/helpers/form_options_helper.rb:340:inmap'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.20/lib/action_view/helpers/form_options_helper.rb:340:in
options_from_collection_for_select&#39; /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.20/lib/action_view/helpers/form_options_helper.rb:571:into_collection_select_tag'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.20/lib/action_view/helpers/form_options_helper.rb:166:in
collection_select&#39; /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.20/lib/action_view/helpers/form_options_helper.rb:615:incollection_select'
/usr/share/foreman/app/helpers/layout_helper.rb:112:in `select_f'
</snip>

i'm sure this is a stupid mistake i made, but i'm pretty much stuck.
creating new hosts within rhev or libvirt works without problems.
our old system also still works, so i'm sure this as to do with the foreman
installation.

i've used the standard foreman release repo for the installation.

versions install:

foreman 1.1stable
foreman-vmware 1.1stable
rubygem-fog 1.9.0
ruby 1.8.7.352
rubygem-rails 3.0.20

any help would be desperately appreciated
toni

after adding a function to_label (a copy of to_s) to fog
(lib/fog/vsphere/modules/compute/folder.rb, i'm now able to display
the list of folders in foreman. there is no function to_label in the old
environment…

but now im getting

Failed to create a compute VC5 (VMWare) instance ftest99.eb.lan.at: failed
to create vm: undefined method datastore&#39; for [&quot;datastore&quot;, &quot;T-DS-SERVERS_NMT3_NFST11&quot;]:Array /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/create_vm.rb:26:in create_vm'
/usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/models/compute/server.rb:172:in
save&#39; /usr/share/foreman/lib/foreman/model/vmware.rb:86:in create_vm'

maybe i should start with a fresh install…

lg
toni

··· On Thursday, May 23, 2013 10:30:21 AM UTC+2, toni+fore...@stderr.at wrote:

Operation FAILED: undefined method `to_label’ for
#Fog::Compute::Vsphere::Folder:0x7fd5c9dd1d40