Domanda

I am using dragonfly with jruby and apache tomcat to upload images. I am trying to display images that i am uplaoding dynamically using profile_picture.thumb('30x30#').url

When I run the app using ruby on rails, the images are shown properly. But when I run it using apache tomcat, the images are not displayed.

I think as we deploy war file in jruby, the convention profile_picture.thumb('30x30#').url is not working here. I also tried to use match '/media(/:dragonfly)', :to => Dragonfly[:images] in my routes, but was of no use.

I do not get error, but in web page some code is displayed like

"BAhbB1sHOgZmSSIpMjAxMy8wMS8wOS8xMl8xNl80NF83MDNfUGVuZ3VpbnMuanBnBjoGRVRbCDoGcDoKdGh1bWJJIgszMHgzMCMGOwZU"

in page source code i got the path as,

/media/BAhbB1sHOgZmSSIpMjAxMy8wMS8wOS8xMl8xNl80NF83MDNfUGVuZ3VpbnMuanBnBjoGRVRbCDoGcDoKdGh1bWJJIgszMHgzMCMGOwZU

Please help me to know the proper way to display images uploaded using dragonfly in jruby using apache tomcat.

È stato utile?

Soluzione

I faced a similar issue. In my case, I tried typing the url in the address bar which gave me a stack trace saying the convert command failed with status 127. Fixed the issue by installing ImageMagick on the machine. I had forgotten to install ImageMagick on the production.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top