theforeman / puppetdb_foreman

PuppetDB proxy in Foreman
http://theforeman.org
GNU General Public License v3.0
32 stars 23 forks source link

3.1.1 not starting up #44

Closed timogoebel closed 7 years ago

timogoebel commented 7 years ago
2017-08-30T14:11:32 2bfa4e39 [app] [I] Completed 500 Internal Server Error in 126ms (Views: 3.3ms | ActiveRecord: 4.7ms)
2017-08-30T14:11:32 280827f6 [app] [I] Started GET "/settings" for 2a00:cb0:8002:1055:6af7:28ff:fec1:b973 at 2017-08-30 14:11:32 +0200
2017-08-30T14:11:32 280827f6 [app] [I] Processing by SettingsController#index as HTML
2017-08-30T14:11:32 280827f6 [app] [I] Current user: mmoll (administrator)
2017-08-30T14:11:32 280827f6 [app] [I]   Rendered settings/category/_email.html.erb (0.7ms)
2017-08-30T14:11:32 280827f6 [app] [I]   Rendered settings/index.html.erb within layouts/application (161.4ms)
2017-08-30T14:11:32 280827f6 [app] [W] Action failed
| NameError: uninitialized constant PuppetDB
| /usr/share/foreman/vendor/ruby/2.3.0/gems/puppetdb_foreman-3.1.1/app/models/setting/puppetdb.rb:34:in `block in default_settings'
| /usr/share/foreman/app/models/setting.rb:269:in `block (2 levels) in set'
| /usr/share/foreman/app/helpers/settings_helper.rb:7:in `value'
| /usr/share/foreman/app/views/settings/index.html.erb:30:in `block (2 levels) in _693c7dd7edb049ca322cd91a6fdc4573'
| /usr/share/foreman/app/views/settings/index.html.erb:27:in `each'
| /usr/share/foreman/app/views/settings/index.html.erb:27:in `block in _693c7dd7edb049ca322cd91a6fdc4573'
| /usr/share/foreman/app/views/settings/index.html.erb:15:in `each'
| /usr/share/foreman/app/views/settings/index.html.erb:15:in `_693c7dd7edb049ca322cd91a6fdc4573'
timogoebel commented 7 years ago

The reason for this is just a typo: Puppetdb vs PuppetDB. In addition, the version descriptions are wrong:

API_VERSIONS = {
    '4' => 'v4: PuppetDB 4.0, 4.1, 4.2, 4.3',
    '3' => 'v3: PuppetDB 3.0, 3.1, 3.2',
    '1' => 'v1: PuppetDB 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1, 2.2, 2.3'
  }.freeze