0
我得到未定義的方法'分裂」的零:NilClass當我試圖保存上傳的文件回形針在Windows - 未定義的方法'分裂「的零:NilClass
@user.avatar=params[:user][:avatar]
下面是從服務器日誌中的錯誤:
[32mCommand[0m :: identify -format %wx%h "C:/progs/web/ror_site_1/tmp/Rus220120701-4976-1sky1nn.jpg[0]"
[32mCommand[0m :: identify -format %m "C:/progs/web/ror_site_1/tmp/Rus220120701-4976-1sky1nn.jpg[0]"
[32mCommand[0m :: identify -format %m "C:/progs/web/ror_site_1/tmp/Rus220120701-4976-1sky1nn.jpg[0]"
[32mCommand[0m :: convert "C:/progs/web/ror_site_1/tmp/Rus220120701-4976-1sky1nn.jpg[0]" -resize "300x300>" "C:/progs/web/ror_site_1/tmp/Rus220120701-4976-1sky1nn20120701-4976-a9j1sh"
[32mCommand[0m :: file -b --mime "C:/progs/web/ror_site_1/tmp/Rus220120701-4976-1sky1nn20120701-4976-a9j1sh20120701-4976-tm6qoj"
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
Completed 500 Internal Server Error in 406ms
NoMethodError (undefined method `split' for nil:NilClass):
app/controllers/users_controller.rb:94:in `block in update'
app/controllers/users_controller.rb:93:in `update'
我想在這個問題的文件名過長(C:/ progs的/ WEB/ror_site_1的/ tmp/Rus220120701-4976-1sky1nn20120701-4976-a9j1sh20120701-4976-tm6qoj),不能被讀取視窗。如果這是真的,如何更改文件名生成規則?
如果不是,那是問題的原因?