hi ,
I want to store image data in mySQL database using rails.
I have created a table called "Photo_info" which have field called
"photo_data" and the data type of that field is "varchar".
My code is:
path = "C:/test_sqs/public/images/rails.png"
File.open(path, 'rb'){ |file| @data= file.read }
When I am trying to store data in database, it gives error like:
"Could not log "sql.active_record" event. ArgumentError: invalid byte
sequence in UTF-8"
what should i do?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.