-->

Simple persistence framework compatible with macru

2019-06-28 00:28发布

问题:

I'm running into problems using macruby with ActiveRecord (w/ sqlite3) or Sequel. Any other suggestions? I need a simple lightweight persistence mechanism to embed within my application that can handle less than 5 tables and at most low tens of thousands of rows.

回答1:

The following combination works:

MacRuby 0.8
sqlite3-ruby gem 1.3.2
sequel gem 3.18.0
OSX 10.6.5

The trick was uninstalling the 'sqlite3' gem and installing 'sqlite3-ruby'.



回答2:

This also works

MacRuby 0.12
sqlite3-ruby gem 1.3.2
sequel gem 3.26.0
OSX 10.7.3

this is how I found out (not the most efficient way), this can probably be used in the future.

(18..35).each do |i|
   print "sudo macgem install sequel --version \"3.#{i}.0\" ; "
   print "macruby -e \"require 'rubygems'; require 'sequel'; p 42\" ; "
   print  "sudo macgem uninstall sequel -I -x ; " 
end

Run this on the terminal and look for "42"