0
我已經從Rails 3.2.11降級到Rails 2.3.11,並且當我的csv文件被上傳到服務器時,我無法訪問tempfile
。NoMethodError(undefined method`tempfile'... in Rails 2.3.1
它打破了,當我打電話
tmppath = csv.tempfile.to_path.to_s
這裏是我的服務器日誌的跟蹤代碼..
Processing YoloController#createByCSV (for 10.1.109.132 at 2013-03-08 10:57:11) [POST]
Parameters: {"csv"=>#<File:/var/folders/5g/xxxxxxxxx/T/RackMultipartxxxxxxx-xxxxxx-81xb7d-0>}
NoMethodError (undefined method `tempfile' for #<Tempfile:0x10c0f8ce8>):
app/controllers/yolos_controller.rb:67:in `createByCSV'
vendor/bundle/ruby/1.8/gems/actionpack-2.3.11/lib/action_controller/base.rb:1333:in `send'
任何想法,將不勝感激。
謝謝! ! ! :) – freedom 2013-03-08 19:28:56