Using SQLite Gem in OSX vs Windows

I was asked on SCF how to do this in pure Ruby. My recommendation:

(1) I believe, You or whomever runs the Server still need to install MySQL:
[url]http://dev.mysql.com/downloads/windows/installer/[/url]

From SketchUp Ruby Console (or a script running in SketchUp’s embedded Ruby):

(2) Gem::install "ruby-mysql"
(Pure-Ruby edition - replaces the C edition named “mysql” gem, that needs compiling.)
source: GitHub - tmtm/ruby-mysql: MySQL connector for Ruby. pure Ruby version.
gem: ruby-mysql | RubyGems.org | your community gem host
doc: File: README — Documentation for mysql (2.9.1)

(3) Gem::install "dbi"
gem: dbi | RubyGems.org | your community gem host
doc: File: README — Documentation for dbi (0.4.5)

(4) Gem::install "ruby-odbc"
gem: ruby-odbc | RubyGems.org | your community gem host
doc: File: README — Documentation for ruby-odbc (0.999991)

Also… have sent corrected URLs to the website hosting the DBI tutorial:

1 Like