Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/60.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 我怎样才能得到安贝西亚';在rails 3中使用的验证码插件?_Ruby On Rails_Ruby On Rails Plugins_Captcha_Ruby On Rails 3 - Fatal编程技术网

Ruby on rails 我怎样才能得到安贝西亚';在rails 3中使用的验证码插件?

Ruby on rails 我怎样才能得到安贝西亚';在rails 3中使用的验证码插件?,ruby-on-rails,ruby-on-rails-plugins,captcha,ruby-on-rails-3,Ruby On Rails,Ruby On Rails Plugins,Captcha,Ruby On Rails 3,我已经在rails 3应用程序中安装了插件。当我将放入我的视图时,它会在页面上打印: <script type="text/javascript" src="http://api.recaptcha.net/challenge?k=my_key&error=expression"></script> <noscript> <iframe src="http://api.recaptcha.net/noscript?k=my_other_key"

我已经在rails 3应用程序中安装了插件。当我将
放入我的视图时,它会在页面上打印:

<script type="text/javascript" src="http://api.recaptcha.net/challenge?k=my_key&error=expression"></script> <noscript> <iframe src="http://api.recaptcha.net/noscript?k=my_other_key" height="300" width="500" frameborder="0"></iframe><br/> <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea> <input type="hidden" name="recaptcha_response_field" value="manual_challenge"></noscript> 

有没有一种方法可以在rails 3中实现这一点?非常感谢您的帮助。


<%=raw recaptcha_tags %>

您已经接受了答案,但是,我将其与Desive一起使用,不需要使用raw-是的,我在Rails 3上:

app/views/users/registrations/new.html.erb

<h2>Sign up</h2>

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
  <%= devise_error_messages! %>

  <p><%= f.label :email %><br />
  <%= f.text_field :email %></p>

  <p><%= f.label :password %><br />
  <%= f.password_field :password %></p>

  <p><%= f.label :password_confirmation %><br />
  <%= f.password_field :password_confirmation %></p>

  <p><%= recaptcha_tags %></p>

  <p><%= f.submit "Sign up" %></p>
<% end %>

<%= render :partial => "devise/shared/links" %>
注册
资源名称:url=>注册路径(资源名称))do | f |%>



“设计/共享/链接”%>
代码的其余部分在下面的一篇文章中: