Where can I get "authenticate_with_http_basic"?


I just installed Rails 2.0.2

[root@mymachine easyx]# ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]
[root@mymachine easyrx]# gem install rails --include-dependencies
Need to update 16 gems from http://gems.rubyforge.org
Successfully installed rails-2.0.2
[root@remandev easyrx]#

But I'm getting this error in my restful_authentication plugin:

NoMethodError in RegisterController#start
undefined method `authenticate_with_http_basic' for
RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace
register_controller.rb:41:in `start'

How can I troubleshoot this? Below is the code for my
autehnticated_system.rb file, installed by the plugin. - Dave

module AuthenticatedSystem
    # Returns true or false if the user is logged in.
    # Preloads @current_user with the user model if they're logged in.
    def logged_in?
      current_user != :false

    # Accesses the current user from the session. Set it to :false if
login fails
    # so that future calls do not hit the database.
    def current_user
      @current_user ||= (login_from_session || login_from_basic_auth

login_from_cookie || :false)


    # Store the given user id in the session.
    def current_user=(new_user)
      session[:user_id] = (new_user.nil? || new_user.is_a?(Symbol)) ?
nil : new_user.id
      @current_user = new_user || :false

    # Check if the user is authorized

Is RAILS_GEM_VERSION (in environment.rb) is pointing to an older
version of Rails? That could be the source of your troubles.

That was it. RAILS_GEM_VERSION was pointing to 1.2.

5 stars, - Dave