4

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.

Community
  • 1
  • 1
Stephen Petschulat
  • 1,159
  • 2
  • 14
  • 23

2 Answers2

2

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'.

Stephen Petschulat
  • 1,159
  • 2
  • 14
  • 23
  • Update: This combination is also working. Macruby (0.11) sequel (3.21.0) sqlite3-ruby (1.3.2) – Stephen Petschulat May 22 '11 at 16:12
  • This trick doesn't seem to work any more: installing 'sqlite3-ruby' now reports that sqlite3-ruby has been replaced by sqlite3, and it proceeds to install sqlite3. Any workaround? – Jean-Denis Muys Nov 17 '11 at 08:39
  • Adding this in case someone running Macruby 0.12 sees this. Downgrading sqlite3-ruby and sequel seems to fix the segmentation faults. it's not optimal, but hopefully this will get fixed. – kwbock Nov 01 '12 at 19:37
1

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"

Suhas Sharma
  • 71
  • 1
  • 3