0
我在Windows 7 64位上的RoR 3.2上安裝了paperclip和imagemagick。Rails +回形針+ Imagemagick + Windows 7 =>出錯500
我的模型看起來像這樣:
has_attached_file :sample_file,
:styles => { :large => '0x200>' },
:default_style => :large,
:url => "/uploads/images/baget/:class/:attachment/:id/:style/:basename.:extension",
:path => ":rails_root/public/uploads/images/baget/:class/:attachment/:id/:style/:basename.:extension"
當我上傳的圖像,它加載一次,當我要加載另一個形象,我得到這樣的:
Errno::EINVAL in BagetsController#create
Invalid argument - ruby_setenv
而且比 - 這個:
Internal Server Error
Invalid argument - <STDOUT>
WEBrick/1.3.1 (Ruby/1.9.3/2013-02-22) at localhost:3000
接下來,只有恢復WEBRick的幫助,但再次 - 只有一次。
但是!如果改變我的模式只有這樣:
has_attached_file :sample_file
然後我得到所有的工作。所以,我認爲這可能是由ImageMagick造成的。或者也許Win7是滯後的?我不知道。該怎麼辦?