title: RoR: undefined method `http_basic_authenticate_with'
body: <p>I'm following: <a href="http://guides.rubyonrails.org/getting_started.html#security" rel="nofollow">The infamous RoR blog tutorial security section</a></p>
  
  <p>And from some odd reason when trying to reach the specific relevant page i'm getting a:</p>
  
  <p><code>undefined method 'http_basic_authenticate_with' for PostsController:Class</code> error</p>
  
  <p>I'm using:</p>
  
  <ul>
  <li>Rails 3.0.9,</li>
  <li>RubyGems 1.8.11,</li>
  <li>Ruby 1.9.2p290</li>
  </ul>
  
  <p>Any idea what might cause this or maybe a specific gem which is missing?</p>
  
  <p>part of the controller code:</p>
  
  <pre><code>class PostsController &lt; ApplicationController
    http_basic_authenticate_with :name =&gt; "dhh", :password =&gt; "secret", 
                                 :except =&gt; :index
   # GET /posts
   # GET /posts.xml
  def index
    @posts = Post.all
  
    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml =&gt; @posts }
      format.json { render :json =&gt; @posts }
    end
  end
  </code></pre>