In my (non-Rails) app, I'm trying to define a Sequel model:
class Foo < Sequel::Model
end
When I run my app, I'm getting the error:
No database associated with Sequel::Model:
have you called Sequel.connect or Sequel::Model.db= ? (Sequel::Error)
In fact, I have not called connect, because the 'require Foo' is happening before my database code runs.
Of course, I could switch things around so that the require is done after the DB connects, but is there another option? Currently I have all my app's 'require' statements in one file and it would be nice not to have to break that for these model class files.