Skip to content

Instantly share code, notes, and snippets.

@beatinaniwa
Created January 26, 2012 10:59
Show Gist options
  • Save beatinaniwa/1682235 to your computer and use it in GitHub Desktop.
Save beatinaniwa/1682235 to your computer and use it in GitHub Desktop.
simple sample code of sqlite3 with ActiveRecord
require 'rubygems'
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:database => 'hoge.db'
)
ActiveRecord::Base.connection.create_table("logs") do |t|
t.string :hage
t.timestamps
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment