ruby-on-railsrubyredminecasredmine-plugins

Redmine CAS plugin - Missing :cas_base_url parameter


I'm getting this error after installing redmine (3.3.4) and redmine_cas plugin.

ArgumentError (Missing :cas_base_url parameter!):
  plugins/redmine_cas/lib/redmine_cas.rb:21:in `setup!'
  plugins/redmine_cas/init.rb:26:in `block (2 levels) in <top (required)>'  

The code:

def setup!
    return unless enabled?
    CASClient::Frameworks::Rails::Filter.configure(
      :cas_base_url => setting(:cas_url), <- This line is generating the error
      :logger => Rails.logger,
      :enable_single_sign_out => single_sign_out_enabled?
    )
  end

I have this plugin running in other redmine 3.3.4 installation, but it doesn't work in this new installation. Any idea what's wrong??


Solution

  • Finally I fixed this.

    Seems that there was an old installation of the plugin in the database but not in the plugins folder. The data was still there but wasn't the expected and that was generating the issue.

    Data stored previously:

      --- !ruby/hash:ActiveSupport::HashWithIndifferentAccess
     enabled: 'false'
     cas_base_url: https://mycas.com
     cas_logout: 'true'
    

    I updated the data from database in the table settings, the row with name = plugin_redmine_cas to

     --- !ruby/hash-with-ivars:ActionController::Parameters
     elements:
       enabled: '1'
       cas_base_url: https:/mycas.com/
       attributes_mapping: ''
     ivars:
       :@permitted: false