Skip to content

Captchas not being generated in versions > 0.3.2. #50

@wpp

Description

@wpp

Hi there,

After a recent upgrade I noticed that captchas were not showing up:

screen shot 2016-02-02 at 11 04 22

I didn't see any errors in my server log, but my guess is that the tempfile changes generate_simple_captcha_image might be the problem?

Versions:

  • simple_captcha2 0.3.4
  • rails 4.2.1.5
  • ruby 2.2.4p230
  • ImageMagick 6.8.9-9 Q16 x86_64
  • Debian GNU/Linux 8.2 (jessie)

Version 0.4.0 had the same problem. Changing the simple_captcha2 version to 0.3.2 "fixed" the issue.

irb(main):001:0> include SimpleCaptcha::ImageHelpers
=> Object
irb(main):002:0> generate_simple_captcha_image('asdf')
  SimpleCaptcha::SimpleCaptchaData Load (1.4ms)  SELECT  `simple_captcha_data`.* FROM `simple_captcha_data` WHERE `simple_captcha_data`.`key` = 'asdf'  ORDER BY `simple_captcha_data`.`id` ASC LIMIT 1
-background '#fff' -fill '#000' -size 100x28 -wave 1x86 -gravity Center -pointsize 22 -implode 0.2 label: -evaluate Uniform-noise 0 jpeg:-
StandardError: Error while running convert: convert: no images defined `jpeg:-' @ error/convert.c/ConvertImageCommand/3210.

    from /usr/local/lib/ruby/gems/2.2.0/gems/simple_captcha2-0.3.4/lib/simple_captcha/utils.rb:17:in `run'
    from /usr/local/lib/ruby/gems/2.2.0/gems/simple_captcha2-0.3.4/lib/simple_captcha/image.rb:83:in `generate_simple_captcha_image'
    from (irb):2
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/console.rb:110:in `start'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/console.rb:9:in `start'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:68:in `console'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions