This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Languages and the fly likes Rails MySQL BLOB support Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "Rails MySQL BLOB support" Watch "Rails MySQL BLOB support" New topic
Author

Rails MySQL BLOB support

Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Took this MySQL amateur more than an hour of Googling to find out that the reason file upload to a MySQL BLOB in Rails (see p. 362 in "Agile Web Development with Rails) wasn't working was that Rails only works with MySQL BLOBs in MySQL 4 and later. Nothing ever checks for the MySQL version, the book never mentions this, the Rails site doesn't mention this, that I can see... Just an ugly "Bad SQL syntax" failure.

This wouldn't be a big problem except that some very common Linux distros come with MySQL 3.x by default -- Fedora Core 3 being one of them most relevant to me. Grrrrrr. I hate wasted time.


[Jess in Action][AskingGoodQuestions]
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I feel your pain, Ernest.

Are you on #rubyonrails, by the way? The #rubyonrails IRC channel (at irc.freenode.net, port 6667) is a pretty good forum for getting quick answers to small questions...


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Rails MySQL BLOB support
 
Similar Threads
Which is the hottest Java Technolgy?
Database support
Display image in JSP
Are Ruby on Rails programmers better paid than Java ones?
retrieve blob data from mysql using jsp