我有一个RefineryCMS 3应用程序,在后端,上传图像的缩略图没有显示。
如果我在开发机器上以生产模式运行应用程序,则会显示缩略图。在生产机器上,rails app通过乘客& apache,它失败了。
我已将开发副本复制到生产服务器进行测试,并在开发模式下运行炼油厂项目,我仍然遇到同样的问题
rails s -b 192.168.200.215
当我尝试在精炼厂管理中加载图像区域时,这是标准输出;
Started GET "/refinery/images" for 192.168.200.4 at 2016-03-01 15:32:25 +1100
Processing by Refinery::Admin::ImagesController#index as HTML
Parameters: {"locale"=>:en}
Refinery::Authentication::Devise::User Load (0.2ms) SELECT "refinery_authentication_devise_users".* FROM "refinery_authentication_devise_users" WHERE "refinery_authentication_devise_users"."id" = ? ORDER BY "refinery_authentication_devise_users"."id" ASC LIMIT 1 [["id", 1]]
Refinery::Authentication::Devise::Role Load (0.1ms) SELECT "refinery_authentication_devise_roles".* FROM "refinery_authentication_devise_roles" INNER JOIN "refinery_authentication_devise_roles_users" ON "refinery_authentication_devise_roles"."id" = "refinery_authentication_devise_roles_users"."role_id" WHERE "refinery_authentication_devise_roles_users"."user_id" = ? [["user_id", 1]]
Rendered /var/lib/gems/2.1.0/gems/refinerycms-acts-as-indexed-2.0.1/app/views/refinery/acts_as_indexed/admin/_search_header.html.erb (0.2ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-core-3.0.1/app/views/refinery/admin/_search_header.html.erb (4.4ms)
(0.2ms) SELECT COUNT(*) FROM "refinery_images"
CACHE (0.0ms) SELECT COUNT(*) FROM "refinery_images"
Refinery::Image Load (0.3ms) SELECT "refinery_images".* FROM "refinery_images" ORDER BY updated_at DESC LIMIT 20 OFFSET 0
Refinery::Image::Translation Load (0.3ms) SELECT "refinery_image_translations".* FROM "refinery_image_translations" WHERE "refinery_image_translations"."refinery_image_id" IN (2)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-images-3.0.1/app/views/refinery/admin/images/_grid_view.html.erb (10.3ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-images-3.0.1/app/views/refinery/admin/images/_images.html.erb (14.5ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-images-3.0.1/app/views/refinery/admin/images/_records.html.erb (33.7ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-acts-as-indexed-2.0.1/app/views/refinery/acts_as_indexed/admin/_search.html.erb (2.2ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-core-3.0.1/app/views/refinery/admin/_search.html.erb (4.8ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-images-3.0.1/app/views/refinery/admin/images/_actions.html.erb (17.0ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-images-3.0.1/app/views/refinery/admin/images/index.html.erb within layouts/refinery/admin (61.1ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-core-3.0.1/app/views/refinery/_html_tag.html.erb (0.2ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-core-3.0.1/app/views/refinery/admin/_javascripts.html.erb (159.9ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-core-3.0.1/app/views/refinery/admin/_head.html.erb (232.9ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-core-3.0.1/app/views/refinery/_site_bar.html.erb (3.4ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-core-3.0.1/app/views/refinery/admin/_menu_item.html.erb (28.4ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-core-3.0.1/app/views/refinery/admin/_menu.html.erb (31.9ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-core-3.0.1/app/views/refinery/_no_script.html.erb (0.3ms)
Rendered /var/lib/gems/2.1.0/gems/refinerycms-core-3.0.1/app/views/refinery/_message.html.erb (0.1ms)
Completed 200 OK in 375ms (Views: 362.0ms | ActiveRecord: 1.1ms)
Started GET "/system/images/W1siZiIsIjIwMTYvMDMvMDEvN3lmN3ZpNDRtZV9hYWEuanBnIl0sWyJwIiwidGh1bWIiLCIxMzV4MTM1I2MiXV0/aaa.jpg?sha=7a0325c4ef12ef3d" for 192.168.200.4 at 2016-03-01 15:32:27 +1100
当它试图获取/ system / images / ....它在Web浏览器控制台中失败。如果我尝试使用以下
直接访问它http://192.168.200.215:3000/system/images/W1siZiIsIjIwMTYvMDMvMDEvN3lmN3ZpNDRtZV9hYWEuanBnIl0sWyJwIiwidGh1bWIiLCIxMzV4MTM1I2MiXV0/aaa.jpg
我在浏览器中收到以下错误
Internal Server Error
答案 0 :(得分:0)
生产服务器没有安装imagemagick。
sudo apt-get install imagemagick
这解决了它。