Simple persistence framework compatible with macruby?

蓝咒 提交于 2019-12-13 13:23:14

问题


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"



来源:https://stackoverflow.com/questions/4363454/simple-persistence-framework-compatible-with-macruby

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!