I'm trying to use Sequel to access a MySQL database in Ruby. When I try accessing a table which involves a date column, I am presented with an error. When I access a table without, it functions fine. What is wrong?
Example Code:
require 'rubygems'
require 'sequel'
DB = Sequel.connect(:adapter=>'mysql', :host=>'localhost', :database=>'db', :user=>'user', :password=>'password')
event = DB[:table]
puts event.all
Error:
/usr/lib/ruby/1.8/date.rb:956:in `new_by_frags': ArgumentError: invalid date (Sequel::InvalidValue)
The error is not shown when a table which does not feature a date is accessed. This is running on Debian.