Re: [MacRuby-devel] Sequel and macruby
Hi, thanks your tweak still works for this basic example. you filed a bug report for this?
Message: 1 Date: Thu, 8 Sep 2011 11:00:05 -0700 From: Morgan Schweers <cyberfox@gmail.com> To: "MacRuby development discussions." <macruby-devel@lists.macosforge.org> Subject: Re: [MacRuby-devel] Sequel and macruby Message-ID: <CAOVYvw95A5xpd+bTMym8YciPvE8gSgg3X+dNbFPhTwBaokO4HQ@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
Greetings, You can check out an old thread on this subject: http://lists.macosforge.org/pipermail/macruby-devel/2011-April/007547.html
I lost the plot somewhere in there, and never got back to it. :(
-- Morgan
On Wed, Sep 7, 2011 at 9:15 AM, Wladjmir Godioz <wladjmir@gmail.com> wrote:
Hi,
in my first experience with sequel, i installer sqlite3 and sequel gems without problem, then i tried to run the simple example in readme.doc of sequel
require 'rubygems' require 'sequel' DB = Sequel.sqlite # memory database
DB.create_table :items do primary_key :id String :name Float :price end
items = DB[:items] # Create a dataset
# Populate the table
items.insert(:name => 'abc', :price => rand * 100) items.insert(:name => 'def', :price => rand * 100) items.insert(:name => 'ghi', :price => rand * 100)
# Print out the number of records puts "Item count: #{items.count}"
# Print out the average price puts "The average price is: #{items.avg(:price)}"
without any error the output is:
Item count: 0 The average price is:
someone has info to get it work. Thanks
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Greetings, Hmm...no, I didn't, and apparently according to http://lists.macosforge.org/pipermail/macruby-devel/2011-April/007542.html the original reporter found a workaround and so didn't either, unfortunately. Their example gist is at: https://gist.github.com/910989 I wish I could replicate it without the Sequel gem, but it's something to do with unwinding the stack from an odd location, or with certain frames in between, and all the test code I wrote managed to not have that problem... So it's hard to replicate AND it happens consistently in a popular library. :-/ -- Morgan On Tue, Sep 13, 2011 at 8:53 AM, Wladjmir Godioz <wladjmir@gmail.com> wrote:
Hi,
thanks your tweak still works for this basic example. you filed a bug report for this?
Message: 1 Date: Thu, 8 Sep 2011 11:00:05 -0700 From: Morgan Schweers <cyberfox@gmail.com> To: "MacRuby development discussions." <macruby-devel@lists.macosforge.org> Subject: Re: [MacRuby-devel] Sequel and macruby Message-ID: <CAOVYvw95A5xpd+bTMym8YciPvE8gSgg3X+dNbFPhTwBaokO4HQ@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
Greetings, You can check out an old thread on this subject: http://lists.macosforge.org/pipermail/macruby-devel/2011-April/007547.html
I lost the plot somewhere in there, and never got back to it. :(
-- Morgan
On Wed, Sep 7, 2011 at 9:15 AM, Wladjmir Godioz <wladjmir@gmail.com> wrote:
Hi,
in my first experience with sequel, i installer sqlite3 and sequel gems
without problem, then i tried to run the simple example in readme.doc of
sequel
require 'rubygems'
require 'sequel'
DB = Sequel.sqlite # memory database
DB.create_table :items do
primary_key :id
String :name
Float :price
end
items = DB[:items] # Create a dataset
# Populate the table
items.insert(:name => 'abc', :price => rand * 100)
items.insert(:name => 'def', :price => rand * 100)
items.insert(:name => 'ghi', :price => rand * 100)
# Print out the number of records
puts "Item count: #{items.count}"
# Print out the average price
puts "The average price is: #{items.avg(:price)}"
without any error the output is:
Item count: 0
The average price is:
someone has info to get it work.
Thanks
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
participants (2)
-
Morgan Schweers
-
Wladjmir Godioz