我在以前的所有项目中都使用了回形针,但这是我第一次收到错误
Permission denied @ dir_s_mkdir
path = remove_tailing_slash(path)
if mode
Dir.mkdir path, mode
File.chmod mode, path
else
Dir.mkdir path
end
我完全不知道为什么会突然发生这种情况。我更改了文件夹权限,仍然是相同的。
日志
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
(0.1ms) begin transaction
Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/5y/y3_ztj_n1f1bd0rb5hz8v13h0000gn/T/ae5b47338477b229e55830edfaf08bce20140602-37437-ab9fw5.jpg[0]' 2>/dev/null
Command :: identify -format %m '/var/folders/5y/y3_ztj_n1f1bd0rb5hz8v13h0000gn/T/ae5b47338477b229e55830edfaf08bce20140602-37437-ab9fw5.jpg[0]'
Command :: identify -format %m '/var/folders/5y/y3_ztj_n1f1bd0rb5hz8v13h0000gn/T/ae5b47338477b229e55830edfaf08bce20140602-37437-ab9fw5.jpg[0]'
Command :: identify -format %m '/var/folders/5y/y3_ztj_n1f1bd0rb5hz8v13h0000gn/T/ae5b47338477b229e55830edfaf08bce20140602-37437-ab9fw5.jpg[0]'
Command :: convert '/var/folders/5y/y3_ztj_n1f1bd0rb5hz8v13h0000gn/T/ae5b47338477b229e55830edfaf08bce20140602-37437-ab9fw5.jpg[0]' -auto-orient -resize "50x50>" '/var/folders/5y/y3_ztj_n1f1bd0rb5hz8v13h0000gn/T/ae5b47338477b229e55830edfaf08bce20140602-37437-ab9fw520140602-37437-152szmh'
Command :: file -b --mime '/var/folders/5y/y3_ztj_n1f1bd0rb5hz8v13h0000gn/T/ae5b47338477b229e55830edfaf08bce20140602-37437-ab9fw520140602-37437-152szmh'
Binary data inserted for `string` type on column `avatar_content_type`
SQL (0.2ms) UPDATE "users" SET "avatar_content_type" = ?, "avatar_file_name" = ?, "avatar_file_size" = ?, "avatar_updated_at" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["avatar_content_type", "image/jpeg"], ["avatar_file_name", "10157398_10202612742173645_1388012856_n.jpg"], ["avatar_file_size", 66603], ["avatar_updated_at", "2014-06-02 12:35:15.545966"], ["updated_at", "2014-06-02 12:35:15.726139"]]
(0.5ms) rollback transaction
Completed 500 Internal Server Error in 247ms
答案 0 :(得分:0)
我不确切知道发生了什么,但我又回到了
'paperclip', '~> 3.0'
一切都恢复了......