Ss Kk | 15 May 10:53

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'
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
(Continue reading)

Axel Etzold | 15 May 11:54

Re: CAPTCHA gem


-------- Original-Nachricht --------
> Datum: Thu, 15 May 2008 17:55:06 +0900
> Von: Ss Kk <1shweta2 <at> gmail.com>
> An: ruby-talk <at> ruby-lang.org
> 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"
(Continue reading)

Ss Kk | 15 May 12:16

Re: CAPTCHA gem

Axel Etzold wrote:
> -------- Original-Nachricht --------
>> Datum: Thu, 15 May 2008 17:55:06 +0900
>> Von: Ss Kk <1shweta2 <at> gmail.com>
>> An: ruby-talk <at> ruby-lang.org
>> Betreff: CAPTCHA gem
> 
>> 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,
> 
(Continue reading)

Axel Etzold | 15 May 12:51

Re: CAPTCHA gem


-------- Original-Nachricht --------
> Datum: Thu, 15 May 2008 19:16:41 +0900
> Von: Ss Kk <1shweta2 <at> gmail.com>
> An: ruby-talk <at> ruby-lang.org
> Betreff: Re: CAPTCHA gem

> Axel Etzold wrote:
> > -------- Original-Nachricht --------
> >> Datum: Thu, 15 May 2008 17:55:06 +0900
> >> Von: Ss Kk <1shweta2 <at> gmail.com>
> >> An: ruby-talk <at> ruby-lang.org
> >> Betreff: CAPTCHA gem
> > 
> >> 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
> > 
(Continue reading)

Vassilis Rizopoulos | 15 May 12:42

Re: CAPTCHA gem

Ss Kk wrote:
>  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")

(Continue reading)

Ss Kk | 16 May 07:02

Re: CAPTCHA gem


Hi ,
     thanks for this.Now its working for me.
--

-- 
Posted via http://www.ruby-forum.com/.


Gmane