Forum: Ruby on Rails active_rbac doesn't understand before_filter

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Abfecec49e4871d38bfeedf7590c06ed?d=identicon&s=25 Milo Thurston (milo)
on 2007-03-08 15:12
I've moved an application onto the production server, and found that
when I run it under the production environment active_rbac doesn't work
(it's fine under the development environment). I find this in the logs
when trying to view a protected page:

NoMethodError (undefined method `before_filter' for
ActiveRbac::ComponentController:Class):
/app/controllers/active_rbac/component_controller.rb:2
...lots more stuff...

The offending code is:

class ActiveRbac::ComponentController
        before_filter :protect_with_active_rbac

        protected

                def protect_with_active_rbac
                        # only protect certain controllers
                        return true if [ActiveRbac::LoginController,
ActiveRbac::RegistrationController,
ActiveRbac::MyAccountController].include?(self.class)

                        # protect!
                        if !session[:rbac_user_id].nil? and
User.find_by_id(session[:rbac_user_id]).has_role?("Admin")
                                return true
                        else
                                flash[:notice] = "Please log in to
access this page."
                                redirect_to "/login"
                                return false
                        end
                end
end

Can anyone suggest where I might begin to look for the cause of this
error?
This topic is locked and can not be replied to.