Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In my rails 3 app, simple_captcha doesn't display image on production mode

The simple_captcha works find on my dev machine but it doesn't on my shared hosting server(Dreamhost).

ImageMagick is installed and RMagick is ok there. What could be wrong?

I checked the log and it doesn't show any error message.

Started GET "/simple_captcha/0245065ca02e2f4fadc22b3f08e1357ea74221f8?time=1304535698" for 99.122.173.225 at Wed May 04 12:01:38 -0700 2011

When I type the address(/simple_captcha/0245065ca02e2f4fadc22b3f08e1357ea74221f8?time=1304535698), it says that "the image cannot be displayed because it contains errors".

Any idea what's wrong?

Thanks.

Sam

like image 549
Sam Kong Avatar asked May 04 '11 19:05

Sam Kong


1 Answers

Have you tried commenting out the

config.action_dispatch.x_sendfile_header = "X-Sendfile" 

line?

Found here: Rails sends 0 byte files using send_file

like image 53
Dustin Avatar answered Oct 06 '22 00:10

Dustin