[MacRuby-devel] Sqlite3 without core data

Matt Aimonetti mattaimonetti at gmail.com
Thu Apr 28 08:49:27 PDT 2011


For the record, I couldn't trivially reduce the problem:

$ macruby -e "class Foo; alias_method :model, :class; end; p Foo.new.model;
class Bar < Foo; end; p Bar.new.model"
Foo
Bar

- Matt


On Thu, Apr 28, 2011 at 8:43 AM, Matt Aimonetti <mattaimonetti at gmail.com>wrote:

> Petr, could you write a bug reduction and open a MacRuby ticket please?
>
> Thanks,
>
> - Matt
>
>
> On Thu, Apr 28, 2011 at 7:51 AM, Petr Kaleta <petr.kaleta at me.com> wrote:
>
>> Daniel,
>> I think I've found it, looks like alias_method is not working properly in
>> Macruby, check this line
>> https://github.com/jeremyevans/sequel/blob/master/lib/sequel/model/base.rb#L808sothats why "model" is not initialized and sequel is crashing on this line
>> https://github.com/jeremyevans/sequel/blob/master/lib/sequel/model/base.rb#L1378
>>
>> - Petr
>>
>> On Apr 28, 2011, at 4:39 PM, Petr Kaleta wrote:
>>
>> Hi Daniel,
>> so you are not using Sequel Models at all?
>>
>> I've reported that bug in Sequel's tracking system
>> http://code.google.com/p/ruby-sequel/issues/detail?id=334 so we will see.
>> I'll look at the source maybe I'll find something...
>>
>> - Petr
>>
>> On Apr 28, 2011, at 4:10 PM, Daniel Westendorf wrote:
>>
>> Petr,
>>
>> I can confirm that Model's don't work as expected with Sequel and Macruby.
>> Instead I use a workaround like this:
>>
>> DB[:items].all()
>> DB[:items].insert(:name => "My Item")
>> etc.
>>
>> Daniel
>>
>> On Thu, Apr 28, 2011 at 7:32 AM, Petr Kaleta <petr.kaleta at me.com> wrote:
>>
>>> So I've made some tests. This sample is working without any problems with
>>> ruby 1.8.7 and 1.9.2 but is not working with Macruby.
>>>
>>> Anybody here using Sequel with Macruby 0.10?
>>>
>>> - Petr
>>>
>>> On Apr 28, 2011, at 12:33 PM, Petr Kaleta wrote:
>>>
>>> > One Sequel related question: check this simple code
>>> http://pastie.org/1842796
>>> >
>>> > I'm getting this very strange exception:
>>> >
>>> >
>>> /Library/Frameworks/MacRuby.framework/Versions/0.10/usr/lib/ruby/Gems/1.9.2/gems/sequel-3.22.0/lib/sequel/model/base.rb:1378:in
>>> `set_restricted:': undefined local variable or method `model' for
>>> #<Item:0x2010af5e0> (NameError)
>>> >
>>> > Am I doing something wrong?
>>> >
>>> > - Petr
>>> >
>>> > On Apr 18, 2011, at 1:47 PM, Rolando Abarca wrote:
>>> >
>>> >> try sequel: http://sequel.rubyforge.org/
>>> >>
>>> >> On Mon, Apr 18, 2011 at 6:11 AM, Petr Kaleta <petr.kaleta at me.com>
>>> wrote:
>>> >>> Can you suggest me some gem/framework to work with Sqlite3 without
>>> core data? Something which has nice DSL and good performance.
>>> >>>
>>> >>> Thanks
>>> >>>
>>> >>> - Petr
>>> >>
>>> >> hth,
>>> >> --
>>> >> Rolando Abarca M.
>>> >> Games For Food S.p.A.
>>> >> http://www.gamesforfood.com
>>> >> Phones: +1 (408) 345-5433
>>> >> +56 (2) 581-4591
>>> >> _______________________________________________
>>> >> MacRuby-devel mailing list
>>> >> MacRuby-devel at lists.macosforge.org
>>> >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>> >
>>> > _______________________________________________
>>> > MacRuby-devel mailing list
>>> > MacRuby-devel at lists.macosforge.org
>>> > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>>
>>> _______________________________________________
>>> MacRuby-devel mailing list
>>> MacRuby-devel at lists.macosforge.org
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>>
>>
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>>
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>>
>>
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110428/7c33c859/attachment.html>


More information about the MacRuby-devel mailing list