Posts marked with "sqlite" in tags

Use ActiveRecord + SQLite without Rails

Recently been using ActiveRecord + SQLite a LOT, so making this post for the basic template. Gemfile source "https://rubygems.org" gem "activerecord", "~> 8.0" gem "pry" gem "sqlite3", "~> 2.4" playground.rb require 'active_record' require 'pry' require 'sqlite3' ActiveRecord::Base.establish_connection( adapter: 'sqlite3', database: 'db.sqlite3' ) class Place < ActiveRecord::Base end @first_run = !Place.table_exists? # Create the table (migration-like setup) if @first_run ActiveRecord::Schema.define do create_table :places do |t| t.string :name t.string :lat t.string :lon t.... [READ MORE]

Follow/Subscribe

Telegram 

Mastodon  Twitter

GitHub GitLab

Subdomains

Demos  Lab

Past

This blog was once on WordPress. Now a static site. See source code on

GitLab