Skip to content

Instantly share code, notes, and snippets.

@jdunphy
Created May 29, 2009 04:44
Show Gist options
  • Save jdunphy/119787 to your computer and use it in GitHub Desktop.
Save jdunphy/119787 to your computer and use it in GitHub Desktop.
if ENV['DATABASE_URL']
::DB = Sequel.sqlite(ENV['DATABASE_URL'])
else
dbfile = File.dirname(__FILE__) + "/db/#{env}.sqlite3"
FileUtils.touch(dbfile)
::DB = Sequel.sqlite(dbfile)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment