1

在 ruby​​ 中使用回形针时出现此错误“nil:NilClass 的未定义方法 `exitstatus'”。请告诉我适当的答案 4 这个...

4

2 回答 2

2

检查您的 /config/enviroments/production.rb(或开发)文件并为 ImageMagick 设置转换命令路径。

Paperclip.options[:command_path] = "/usr/bin"
于 2012-12-05T14:32:23.207 回答
0

I got the same error message when I tried to assign attachment this way:

file = new Tempfile("image.png")    
user.image = file

It worked after I changed it to this:

user.image = File.open("image.png")

If this wasn't your case, you should give a little more information about your problem.

于 2012-08-17T09:05:21.720 回答