Captcha Trouble

Hello Rails, I have a problem.

I would like to use captcha in one of my project. When I did try to install, this is what I got

$ sudo gem install captcha Building native extensions. This could take a while... ERROR: Error installing captcha:   ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)   from extconf.rb:1

Gem files will remain installed in /var/lib/gems/1.8/gems/ rmagick-2.12.2 for inspection. Results logged to /var/lib/gems/1.8/gems/rmagick-2.12.2/ext/RMagick/ gem_make.out

Could any one help me out on this?

Looks like you are missing the tools to build the extensions. If you are on a Debain based distro, try

sudo apt-get install build-essential

If that doesn't work, search for guides on installing rails on Debian systems.

Got captcha installed. But when I tried ( refering http://rdoc.info/projects/zendesk/captcha )

$rake captcha:generate COUNT=250

It gave the following output

rake aborted! Don't know how to build task 'captcha:generate'

This is looking like rocket science to me.

Sorry, can't help much there. I'm still learning Rails and find that building my own instead of using plugins helps me grok things better. Like rolling my own authentication and authorization.

For example, instead of captchas for user validation, I use a simple email challenge. Of course that meant I had to learn ActionMailer, but that's built in.

Has any one else run into the following problem?

use captcha service: http://captchator.com/

Thanks a lot! Thanks to all who have taken pains to answer this question. I found perfect solution in http://www.codeandcoffee.com/2007/06/implementing-a-captcha-with-ruby-on-rails-in-10-minutes-or-less/ . I haven't tested catchcaptor.com , but it looks impressive.

Hope this discussion will be helpful to those who are having trouble with captcha.