DevHeads.net

Active Record

I'm trying to develop a small database application using Ruby 2.3.1, the
gem activerecord-5.0.0.1 (part of the Ruby package), and the sql3 database
system that comes with the Mac (I don't want to use Rails, only active
record).

The beginning of the program goes like this:

require 'sqlite3'
require 'active_record'

db_config = {
'adapter' => 'sqlite3',
'database' => 'test.db'
}

ActiveRecord::Base.establish_connection(db_config)

In RubyMine, I get all kinds of warning that don't mean much to me, and I'm
not going anywhere.

Question: How do I put together a simple database project only using Ruby,
Active Record, and sql3? (I've read everything I could online already, so
please don't tell me to google it).

Comments

Re: Active Record

By Hassan Schroeder at 08/12/2017 - 21:27

On Sat, Aug 12, 2017 at 5:32 PM, Marc Chanliau <marc. ... at gmail dot com> wrote:
Well, yeah, absolutely agree -- you're not going anywhere by saying
"Help, I have a problem but I won't tell you what it is"