TypeError (can't cast Enumerator to string): - Ruby on Rails


When I am trying to upload a file through the url - . I am getting an error as

Started POST “/upload/save” for at 2014-05-27 01:29:29 +0530
Processing by UploadController#save as HTML
Parameters: {“utf8”=>“✓”,
@original_filename=“sfnzf.png”, @content_type=“image/png”,
Disposition: form-data; name=“picture[uploaded_picture]”;
filename=“sfnzf.png”\r\nContent-Type: image/png\r\n”>},
(0.2ms) begin transaction
Binary data inserted for string type on column content_type
(0.1ms) rollback transaction
Completed 500 Internal Server Error in 5ms

TypeError (can’t cast Enumerator to string):
app/controllers/upload_controller.rb:8:in `save’


I am reading a book and trying out stuffs and got stuck here. My little
tutorial is uploaded here -
https://github.com/aruprakshit/chap_21_agile_rails .

Please help me to understand what wrong am I doing here.

Arup R.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs