CAPTCHA gem

S

Ss Kk

Hi All,

I am using 'captcha gem' in my code to implement 'CAPTCHA' functionality
,It gives following error :
---------------------------------------------------------------------------------------------------------
MissingSourceFile in UserController#sign_in

no such file to load -- GD

RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace

d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/captcha-0.1.2/lib/captcha.rb:22
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`gem_original_require'
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
#{RAILS_ROOT}/app/controllers/user_controller.rb:9

d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/captcha-0.1.2/lib/captcha.rb:22
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`gem_original_require'
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in
`load_without_new_constant_marking'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in
`load_file'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:202:in
`load_file'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:94:in
`require_or_load'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:248:in
`load_missing_constant'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in
`const_missing'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in
`const_missing'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/inflector.rb:250:in
`constantize'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/string/inflections.rb:148:in
`constantize'
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1284:in
`recognize'
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in
`dispatch'
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:in
`handle_dispatch'
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in
`service'
d:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
d:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
d:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
d:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
d:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
d:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
d:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
d:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
d:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
d:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:in
`dispatch'
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/webrick.rb:59
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
script/server:3

d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/captcha-0.1.2/lib/captcha.rb:22
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`gem_original_require'
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
#{RAILS_ROOT}/app/controllers/user_controller.rb:9
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in
`load_without_new_constant_marking'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in
`load_file'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:202:in
`load_file'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:94:in
`require_or_load'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:248:in
`load_missing_constant'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in
`const_missing'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in
`const_missing'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/inflector.rb:250:in
`constantize'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/string/inflections.rb:148:in
`constantize'
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1284:in
`recognize'
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in
`dispatch'
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:in
`handle_dispatch'
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in
`service'
d:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
d:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
d:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
d:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
d:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
d:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
d:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
d:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
d:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
d:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:in
`dispatch'
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/webrick.rb:59
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
script/server:3

This error occurred while loading the following files:
captcha
GD

Request

Parameters: None

Show session dump

---
:user_id:
:fr: {}

flash: !map:ActionController::Flash::FlashHash {}


Response
Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"}
 
A

Axel Etzold

-------- Original-Nachricht --------
Datum: Thu, 15 May 2008 17:55:06 +0900
Von: Ss Kk <[email protected]>
An: (e-mail address removed)
Betreff: CAPTCHA gem
Hi All,

I am using 'captcha gem' in my code to implement 'CAPTCHA' functionality
,It gives following error :
---------------------------------------------------------------------------------------------------------
MissingSourceFile in UserController#sign_in

no such file to load -- GD

RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace

d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'

Hello,

do you require rubygems in your script, ie., do you have a line

require "rubygems"

before

require "captcha" ...

in your script ?
Maybe you can post some shortened bit of code ...

Best regards,

Axel
 
S

Ss Kk

Axel said:
-------- Original-Nachricht --------


Hello,

do you require rubygems in your script, ie., do you have a line

require "rubygems"

before

require "captcha" ...

in your script ?
Maybe you can post some shortened bit of code ...

Best regards,

Axel

Hi,
Thanks for your reply Butit is not making any change ,Still same
error


Here is code of my user controller:
require 'rubygems'
require 'captcha'//Gives error to this line

class UserController < ApplicationController

def register
var= CAPTCHA::Web.new
var.to_html("captcha_temp")
end
end

And code of Captcha file: ,you will get :

"D:\ruby\lib\ruby\gems\1.8\gems\captcha-0.1.2\lib\captcha.rb"
(If installed Captha gem)


Tell me what's going wrong.
 
V

Vassilis Rizopoulos

Ss said:
Hi All,

I am using 'captcha gem' in my code to implement 'CAPTCHA'
functionality ,It gives following error :
---------------------------------------------------------------------------------------------------------
MissingSourceFile in UserController#sign_in

no such file to load -- GD

RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace
| Full Trace

d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
Well, from what you posted, require 'rubygems' is done somewhere in the
code you load (that's the custom_require line right there) and I guess
the captcha gem tries to load GD and cannot find it.
So your problem is either that GD is not correctly installed or that you
don't have the correct GD version.
Try to isolate the problem by making a small unit test of just a test
program that does only the one thing you're trying to do here:

require 'rubygems'
require 'captcha'

var= CAPTCHA::Web.new
p var.to_html("captcha_temp")

so that you don't have all the Rails snick-snack to wade through.

Also, here's a link to a discussion talking about the captcha gem
http://groups.google.com/group/uso-dev/browse_thread/thread/63642201fb194e0d

I think it mentions that it needs the ruby-gd gem and that that gem is
source-only (so you need to compile yourself)

V.-
 
A

Axel Etzold

-------- Original-Nachricht --------
Datum: Thu, 15 May 2008 19:16:41 +0900
Von: Ss Kk <[email protected]>
An: (e-mail address removed)
Betreff: Re: CAPTCHA gem
Hi,
Thanks for your reply Butit is not making any change ,Still same
error


Here is code of my user controller:
require 'rubygems'
require 'captcha'//Gives error to this line

class UserController < ApplicationController

def register
var= CAPTCHA::Web.new
var.to_html("captcha_temp")
end
end

And code of Captcha file: ,you will get :

"D:\ruby\lib\ruby\gems\1.8\gems\captcha-0.1.2\lib\captcha.rb"
(If installed Captha gem)


Tell me what's going wrong.

Hello,

there is a dependency problem. The captcha gem wants to load
the GD library

http://www.boutell.com/gd/

(which is not written in Ruby).
You'll have to install that and probably one of the Ruby bindings
to GD.
From a search on Rubyforge, I gather that the Ruby gem GD is now
called ruby-gd.
As the captcha gem you're trying to install has its last release
on March 28, 2004 and the now-name-changed GD/ruby-gd gem releases only
one file, from January, 30th, 2007, there might have happened some changes
in the meantime, I'm afraid :-(

Maybe it's good idea to contact the author of the ruby-gd gem
to ask for help ... or use some other turing test gem, like turing.

Best regards,

Axel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Vimeo API Error, `gem_original_require 0
method `tlsconnect' not defined in Net::SMTP 1
validates_presence_of generates syntax error 0
Plugin errors 0
treemaps 8
Newbie help 4
Help me out!!!!! 1
curious erros 0

Members online

No members online now.

Forum statistics

Threads
473,836
Messages
2,569,748
Members
45,545
Latest member
rapter____0

Latest Threads

Top