开发者

Problems while trying to install recaptcha gem on Ruby on Rails 3

Im trying to install recaptcha on a Rails3 app (Im using Passenger), this is what I did:

1) gem install recaptcha

2) In Gemfile I wrote:

gem 'recaptcha', "0.3.1", :require => 'recaptcha/rails'

3) In the controller where Im going to use it I wrote:

require 'net/http'

But when I do: bundle install, it says "开发者_运维问答Killed", and when I try to run the web app, it says:

Could not find gem 'recaptcha (= 0.3.1, runtime)' in any of the gem sources. (Bundler::GemNotFound)

What should I do? thanks in advance!


You don't need to do 'gem install...'; just run 'bundle install' and bundler will fetch everything it needs to satisfy the requirements you specify in your Gemfile.

The 'killed' bit is new to me. Are you running this on a hosted service by any chance? If so, bundler could be getting killed if it's using too much memory. That page advises you to use bundle package before deployment.


Solution: I started from scratch and follow this: http://thekindofme.wordpress.com/2010/09/25/recaptcha-with-rails-3-without-plugins/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜