不显示上传的图片 - 蜻蜓 [英] Dragonfly - Uploaded images not displayed

查看:187
本文介绍了不显示上传的图片 - 蜻蜓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的蜻蜓使用JRuby和Apache Tomcat上传图片。我想,以显示我动态uplaoding使用profile_picture.thumb('#30×30)的图像。网址

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

当我运行使用Ruby on Rails的应用程序,图像正常显示。但是,当我使用Apache Tomcat运行它时,不显示图像。

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.

我觉得作为我们部署的JRuby war文件,该公约profile_picture.thumb('#30×30'),网址是不是在这里工作。我还试图用匹配/媒体(/:蜻蜓)',:为=>蜻蜓[:图像] 在我的路线,但没有用

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.

我不明白的错误,但在网页一些code显示像

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

\"BAhbB1sHOgZmSSIpMjAxMy8wMS8wOS8xMl8xNl80NF83MDNfUGVuZ3VpbnMuanBnBjoGRVRbCDoGcDoKdGh1bWJJIgszMHgzMCMGOwZU\"

"BAhbB1sHOgZmSSIpMjAxMy8wMS8wOS8xMl8xNl80NF83MDNfUGVuZ3VpbnMuanBnBjoGRVRbCDoGcDoKdGh1bWJJIgszMHgzMCMGOwZU"

在页面的源代码code我得到了路径,

in page source code i got the path as,

/media/BAhbB1sHOgZmSSIpMjAxMy8wMS8wOS8xMl8xNl80NF83MDNfUGVuZ3VpbnMuanBnBjoGRVRbCDoGcDoKdGh1bWJJIgszMHgzMCMGOwZU

/media/BAhbB1sHOgZmSSIpMjAxMy8wMS8wOS8xMl8xNl80NF83MDNfUGVuZ3VpbnMuanBnBjoGRVRbCDoGcDoKdGh1bWJJIgszMHgzMCMGOwZU

请帮我知道显示的JRuby 使用蜻蜓使用Apache Tomcat的图像上传的正确方法。

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

推荐答案

我面临着类似的问题。就我而言,我试着在这给了我一个堆栈跟踪说convert命令由机器上安装的ImageMagick修正了问题状态127失败的地址栏键入URL。我忘了在生产安装ImageMagick的。

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.

这篇关于不显示上传的图片 - 蜻蜓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆