rubycas / rubycas-client

Ruby client for Yale's Central Authentication Service protocol -- an open source enterprise single sign on system for web applications.
http://code.google.com/p/rubycas-client/
Other
332 stars 217 forks source link

Can't find constant CASClient::Frameworks #14

Closed metasoarous closed 13 years ago

metasoarous commented 13 years ago

I am having some issues regarding CASClient::Frameworks not being found. As such, whether I put

CASClient::Frameworks::Rails::Filter.configure(
  :cas_base_url => "http://localhost:4000/"
)

in environment.rb after the initialize or in an initializer, it can't find CASClient::Frameworks. I get the error

uninitialized constant CASClient::Frameworks (NameError)

When I take that line out and load the console, I still can't seem to find that constant. When I do

ruby-1.8.7-p330 :006 > CASClient.constants
 => ["BadResponseException", "CASException", "LoggerWrapper", "Logger", "ServiceTicket", "ProxyGrantingTicket", "XmlResponse", "ProxyResponse", "Client", "ProxyTicket", "ValidationResponse", "VERSION", "LoginResponse"] 

I have the gem installed. Is there some other initialization process that is not taking place here? I am running Rails 3 - is this some rails 3 related issue?

Chris

metasoarous commented 13 years ago

Sorry - should have seen the note about

Note: If Rails complains about missing constants, try adding this before the CASClient configuration:

require 'casclient'
require 'casclient/frameworks/rails/filter'

Putting that in the initializer did the trick.

dcruz112 commented 11 years ago

This was very helpful-- I also missed the note