Topic: rack-recaptcha always returns false

I am experimenting with recaptcha for rails 3.For that iam trying out a simple app. I'm using rack-recaptcha Plugin. I have followed all the steps as mentioned on the gem page.But, when i run the app, the reCaptcha always returns false.
Here's my view:
I am experimenting with recaptcha for rails 3.For that iam trying out a simple app. I'm using rack-recaptcha Plugin. I have followed all the steps as mentioned on the gem page.But, when i run the app, the reCaptcha always returns false.
Here's my view:

<%@digits.each do |c|%>
  <h1><%=c.value%></h1>
  <p id="fail" style="display:none">Incorrect recaptcha</p>
  <p id="para" style="display:none">Succesfully Incremented</p>
  <%=raw recaptcha_tag(:challenge)%>
  <%=button_to 'Increment',increment_path(:format=>:js,:id=>c.id),:remote=>true%>
  <%end%>

Here's my controller:

include Rack::Recaptcha::Helpers
  def display
    @digits=Digit.all
  end
  
  def increment
    if recaptcha_valid?
    @digit= Digit.find(params[:id])
    @digit.increment!(:value)
    respond_to do |format|
      format.js
    end
     else
       respond_to do |format|
      format.js {render 'fail.js.erb'}
    end
  end
  end