uninitialized constant ApplicationController::CASClient (NameError)

189 views
Skip to first unread message

d@Ve

unread,
Oct 23, 2009, 7:07:27 PM10/23/09
to RubyCAS
get this message after following the instructions detailed at
http://rubycas-client.rubyforge.org/files/README_txt.html:

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/
active_support/dependencies.rb:105:in `const_missing': uninitialized
constant ApplicationController::CASClient (NameError)

here is a snippet of my environment.rb, and yes, all of the CAS code
is at the vERY BOTTOM of the file:

# Note: If Rails complains about missing constants, try adding this
before
# the CASClient configuration:
require 'casclient'
require 'casclient/frameworks/rails/filter'

# Enable CAS Authentication (make sure that you put it at the bottom
of the file,
# after the Rails Initializer):
CASClient::Frameworks::Rails::Filter.configure(
:cas_base_url => "https://login.up.edu/cas/"
)

and here is my entire applications_controller.rb:

class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
protect_from_forgery # See
ActionController::RequestForgeryProtection for details

# Since we want to protect the entire Rails application (rather than
just some
# subset of controllers), we will add the following filter to our
# ApplicationController:
before_filter CASClient::Frameworks::Rails::Filter

# Scrub sensitive parameters from your log
# filter_parameter_logging :password
end

any idea as to why i am seeing this error? everything seems
straightforward enough :-/

cheers,
daVe

d@Ve

unread,
Nov 19, 2009, 1:40:28 PM11/19/09
to RubyCAS
it's been almost a month...can anyone assist on this, please?!

cheers,
daVe

On Oct 23, 3:07 pm, "d@Ve" <kungfuk...@gmail.com> wrote:
> get this message after following the instructions detailed athttp://rubycas-client.rubyforge.org/files/README_txt.html:

Si Sutcliffe

unread,
Nov 23, 2009, 2:17:21 PM11/23/09
to rubycas...@googlegroups.com
Hi daVe

Try putting the following lines at the top of your application controller as well as in environment.rb:

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

Regards
Si

2009/11/20 d@Ve <kungf...@gmail.com>
--

You received this message because you are subscribed to the Google Groups "RubyCAS" group.
To post to this group, send email to rubycas...@googlegroups.com.
To unsubscribe from this group, send email to rubycas-serve...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubycas-server?hl=.



Reply all
Reply to author
Forward
0 new messages