Forum: Ruby on Rails file upload problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
170b5dc385cc9ddf78ed01bcf1e6990a?d=identicon&s=25 Nas (Guest)
on 2006-05-03 13:36
Hello,

I have an upload controller which uploads file into a mysql database and
it works fine on my local machine where I am using webrick but when I
use it on a live apache server then it gives me the following error:

 ActiveRecord::StatementInvalid in <controller not set>#<action not set>

Mysql::Error: You have an error in your SQL syntax near ''4749463' at
line 1: INSERT INTO pictures (`content_type`, `name`, `photo`,
`user_id`) VALUES('image/gif', 'arrow.gif',
x'4749463839610a3c68d0208080003', 1)

I would be really thankful if someone could help me how to resolve this.

Thanks
This topic is locked and can not be replied to.