Closed spacerobotTR closed 5 years ago
I figured it out! In my LDAP.yml file the production connection section was indented by one space. This was causing it to not load the config correctly. Everything is working now.
thanks, I'm getting this error too, resolve by delete one space in development
I have deployed a site to a linux server via capistrano and I cannot get the LDAP authentication to function on it. It works fine in development on my windows machine and my MAC dev machine but on the production serer it errors out with nomethod error in devise::sessions::create. undefined method `[]' for nil:NilClass.
The highlighted error code is:
ldap_options = params ldap_config["ssl"] = :simple_tls if ldap_config["ssl"] === true ldap_options[:encryption] = ldap_config["ssl"].to_sym if ldap_config["ssl"]
LDAP.yml:
`authorizations: &AUTHORIZATIONS required_groups: - CN=GROUP1,OU=Users,OU=mysite,DC=ad,DC=com
initializers/devise.rb
`Devise.setup do |config|
user.rb
I've been all over this but have not gotten it to work yet. I am wondering if the production site can't find the ldap files maybe?
Any help is appreciated.