From rick.denatale at gmail.com Sun Nov 1 20:11:36 2009 From: rick.denatale at gmail.com (Rick DeNatale) Date: Sun, 1 Nov 2009 20:11:36 -0500 Subject: [raleigh.rb] Anyone using Selenium? Message-ID: I've been trying to get Selenium to work with webrat and cucumber, and it seems that Firefox 3 doesn' work on Snow leopard when being driven by Selenium. It seems there's an incompatibility with the sqlite3 library on SL. Is anyone using selenium with webrat on Snow Leopard with any browser? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale From jareds.lists at gmail.com Sun Nov 1 20:37:13 2009 From: jareds.lists at gmail.com (Jared) Date: Sun, 1 Nov 2009 20:37:13 -0500 Subject: [raleigh.rb] Anyone using Selenium? In-Reply-To: References: Message-ID: <2A58DA78-18ED-4AD9-A4A7-54CA3B05585A@gmail.com> FYI there's a known issue with the Sel. server jar on Macs. Grab the nightly build and see if that helps. Sent from my iPhone On Nov 1, 2009, at 8:11 PM, Rick DeNatale wrote: > I've been trying to get Selenium to work with webrat and cucumber, and > it seems that Firefox 3 doesn' work on Snow leopard when being driven > by Selenium. > > It seems there's an incompatibility with the sqlite3 library on SL. > > Is anyone using selenium with webrat on Snow Leopard with any browser? > > -- > Rick DeNatale > > Blog: http://talklikeaduck.denhaven2.com/ > Twitter: http://twitter.com/RickDeNatale > WWR: http://www.workingwithrails.com/person/9021-rick-denatale > LinkedIn: http://www.linkedin.com/in/rickdenatale > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members From rick.denatale at gmail.com Sun Nov 1 21:17:10 2009 From: rick.denatale at gmail.com (Rick DeNatale) Date: Sun, 1 Nov 2009 21:17:10 -0500 Subject: [raleigh.rb] Anyone using Selenium? In-Reply-To: <2A58DA78-18ED-4AD9-A4A7-54CA3B05585A@gmail.com> References: <2A58DA78-18ED-4AD9-A4A7-54CA3B05585A@gmail.com> Message-ID: I've tried that, actually the latest 'nightly' build seems to have been in July. The selenium jar problem was not even trying to use Firefox 3. It's a firefox problem, not a selenium problem. https://bugzilla.mozilla.org/show_bug.cgi?id=513747 On Sun, Nov 1, 2009 at 8:37 PM, Jared wrote: > FYI there's a known issue with the Sel. server jar on Macs. Grab the nightly > build and see if that helps. > > > > Sent from my iPhone > > On Nov 1, 2009, at 8:11 PM, Rick DeNatale wrote: > >> I've been trying to get Selenium to work with webrat and cucumber, and >> it seems that Firefox 3 doesn' work on Snow leopard when being driven >> by Selenium. >> >> It seems there's an incompatibility with the sqlite3 library on SL. >> >> Is anyone using selenium with webrat on Snow Leopard with any browser? >> >> -- >> Rick DeNatale >> >> Blog: http://talklikeaduck.denhaven2.com/ >> Twitter: http://twitter.com/RickDeNatale >> WWR: http://www.workingwithrails.com/person/9021-rick-denatale >> LinkedIn: http://www.linkedin.com/in/rickdenatale >> _______________________________________________ >> raleigh-rb-members mailing list >> raleigh-rb-members at rubyforge.org >> http://rubyforge.org/mailman/listinfo/raleigh-rb-members > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale From jimmy at jimmythrasher.com Wed Nov 4 09:52:11 2009 From: jimmy at jimmythrasher.com (Jimmy Thrasher) Date: Wed, 4 Nov 2009 09:52:11 -0500 Subject: [raleigh.rb] Dinner plans for West-End? Message-ID: <214f16690911040652h79dee955se10c5d1c185f4d2d@mail.gmail.com> Hey all, Are there standing dinner plans for before tonight's meeting? Jimmy From seancribbs at gmail.com Wed Nov 4 10:03:41 2009 From: seancribbs at gmail.com (Sean Cribbs) Date: Wed, 04 Nov 2009 10:03:41 -0500 Subject: [raleigh.rb] Dinner plans for West-End? In-Reply-To: <214f16690911040652h79dee955se10c5d1c185f4d2d@mail.gmail.com> References: <214f16690911040652h79dee955se10c5d1c185f4d2d@mail.gmail.com> Message-ID: <4AF197CD.60909@gmail.com> I'm up for Carrburritos, Jessee's or anything else in walking distance. 5:30 ok? Sean Jimmy Thrasher wrote: > Hey all, > > Are there standing dinner plans for before tonight's meeting? > > Jimmy > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > > From jimmy at jimmythrasher.com Wed Nov 4 10:15:39 2009 From: jimmy at jimmythrasher.com (Jimmy Thrasher) Date: Wed, 4 Nov 2009 10:15:39 -0500 Subject: [raleigh.rb] Dinner plans for West-End? In-Reply-To: <4AF197CD.60909@gmail.com> References: <214f16690911040652h79dee955se10c5d1c185f4d2d@mail.gmail.com> <4AF197CD.60909@gmail.com> Message-ID: <214f16690911040715o1796b5fcgd98a480f9242b7fe@mail.gmail.com> Works for me. Jimmy On Wed, Nov 4, 2009 at 10:03 AM, Sean Cribbs wrote: > I'm up for Carrburritos, Jessee's or anything else in walking distance. 5:30 > ok? > > Sean > > Jimmy Thrasher wrote: >> >> Hey all, >> >> Are there standing dinner plans for before tonight's meeting? >> >> Jimmy >> _______________________________________________ >> raleigh-rb-members mailing list >> raleigh-rb-members at rubyforge.org >> http://rubyforge.org/mailman/listinfo/raleigh-rb-members >> >> > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > From seancribbs at gmail.com Wed Nov 4 10:33:13 2009 From: seancribbs at gmail.com (Sean Cribbs) Date: Wed, 04 Nov 2009 10:33:13 -0500 Subject: [raleigh.rb] Dinner plans for West-End? In-Reply-To: <214f16690911040715o1796b5fcgd98a480f9242b7fe@mail.gmail.com> References: <214f16690911040652h79dee955se10c5d1c185f4d2d@mail.gmail.com> <4AF197CD.60909@gmail.com> <214f16690911040715o1796b5fcgd98a480f9242b7fe@mail.gmail.com> Message-ID: <4AF19EB9.6010502@gmail.com> Anyone else who wants to come to dinner, please meet at CCC at 5:30 and we'll walk someplace. Sean Jimmy Thrasher wrote: > Works for me. > > Jimmy > > On Wed, Nov 4, 2009 at 10:03 AM, Sean Cribbs wrote: > >> I'm up for Carrburritos, Jessee's or anything else in walking distance. 5:30 >> ok? >> >> Sean >> >> Jimmy Thrasher wrote: >> >>> Hey all, >>> >>> Are there standing dinner plans for before tonight's meeting? >>> >>> Jimmy >>> _______________________________________________ >>> raleigh-rb-members mailing list >>> raleigh-rb-members at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/raleigh-rb-members >>> >>> >>> >> _______________________________________________ >> raleigh-rb-members mailing list >> raleigh-rb-members at rubyforge.org >> http://rubyforge.org/mailman/listinfo/raleigh-rb-members >> >> > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmedlin at gmail.com Wed Nov 4 10:46:57 2009 From: fmedlin at gmail.com (Fred Medlin) Date: Wed, 4 Nov 2009 10:46:57 -0500 Subject: [raleigh.rb] Dinner plans for West-End? In-Reply-To: <4AF19EB9.6010502@gmail.com> References: <214f16690911040652h79dee955se10c5d1c185f4d2d@mail.gmail.com> <4AF197CD.60909@gmail.com> <214f16690911040715o1796b5fcgd98a480f9242b7fe@mail.gmail.com> <4AF19EB9.6010502@gmail.com> Message-ID: <5B22805C-6C59-43B9-B519-15C30251E23F@gmail.com> I'm in, but leave a whiteboard message or something in case I'm late. Thanks! Sent from my iPod On Nov 4, 2009, at 10:33 AM, Sean Cribbs wrote: > Anyone else who wants to come to dinner, please meet at CCC at 5:30 > and we'll walk someplace. > > Sean > > Jimmy Thrasher wrote: >> >> Works for me. >> >> Jimmy >> >> On Wed, Nov 4, 2009 at 10:03 AM, Sean Cribbs >> wrote: >> >>> I'm up for Carrburritos, Jessee's or anything else in walking >>> distance. 5:30 >>> ok? >>> >>> Sean >>> >>> Jimmy Thrasher wrote: >>> >>>> Hey all, >>>> >>>> Are there standing dinner plans for before tonight's meeting? >>>> >>>> Jimmy >>>> _______________________________________________ >>>> raleigh-rb-members mailing list >>>> raleigh-rb-members at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/raleigh-rb-members >>>> >>>> >>>> >>> _______________________________________________ >>> raleigh-rb-members mailing list >>> raleigh-rb-members at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/raleigh-rb-members >>> >>> >> _______________________________________________ >> raleigh-rb-members mailing list >> raleigh-rb-members at rubyforge.org >> http://rubyforge.org/mailman/listinfo/raleigh-rb-members >> >> > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members -------------- next part -------------- An HTML attachment was scrubbed... URL: From nospam at tonyspencer.com Thu Nov 5 13:00:49 2009 From: nospam at tonyspencer.com (Tony Spencer) Date: Thu, 5 Nov 2009 13:00:49 -0500 Subject: [raleigh.rb] Passing a request from one controller to another Message-ID: <77E79E55-1F3B-4422-90FF-7A274AA87EE8@tonyspencer.com> We are currently adding a permalink or slug feature to a CMS we've built and are trying to sort out how to manage the routes. For instance, we would like to be able to set topics.permalink to "peanut-butter" which would mean that instead of : http://www.somesite.com/topics/1234 we would have a URL like this: http://www.somesite.com/peanut-butter It wouldn't be such a difficult task if we weren't also adding permalinks to other models such as: http://www.somesite.com/categories/1234 which could become: http://www.somesite.com/food ------------ The idea is to add a special controller that is the last route in routes.rb: connect '*url', :controller => 'action_not_found', :action => 'index' but the question I have is: Do you know if its possible for ActionNotFound controller to pass the request to Topics controller or Categories controller after looking up the permalink in a table that has columns like: - permalink - controller - action - id Or perhaps there is a better approach? From nospam at tonyspencer.com Thu Nov 5 13:03:43 2009 From: nospam at tonyspencer.com (Tony Spencer) Date: Thu, 5 Nov 2009 13:03:43 -0500 Subject: [raleigh.rb] Passing a request from one controller to another In-Reply-To: <77E79E55-1F3B-4422-90FF-7A274AA87EE8@tonyspencer.com> References: <77E79E55-1F3B-4422-90FF-7A274AA87EE8@tonyspencer.com> Message-ID: <0264E0EA-0D57-4ADB-9F74-ADDDBD6CBDA2@tonyspencer.com> Sorry. Those sample urls should have been: http://www.somesite.com/topics/show/1234 and http://www.somesite.com/categories/show/1234 On Nov 5, 2009, at 1:00 PM, Tony Spencer wrote: > We are currently adding a permalink or slug feature to a CMS we've > built and are trying to sort out how to manage the routes. > > For instance, we would like to be able to set topics.permalink to > "peanut-butter" which would mean that instead of : > > http://www.somesite.com/topics/1234 > > we would have a URL like this: > > http://www.somesite.com/peanut-butter > > It wouldn't be such a difficult task if we weren't also adding > permalinks to other models such as: > > http://www.somesite.com/categories/1234 > > which could become: > > http://www.somesite.com/food > > ------------ > The idea is to add a special controller that is the last route in > routes.rb: > > connect '*url', :controller => 'action_not_found', :action => 'index' > > but the question I have is: Do you know if its possible for > ActionNotFound controller to pass the request to Topics controller > or Categories controller after looking up the permalink in a table > that has columns like: > > - permalink > - controller > - action > - id > > Or perhaps there is a better approach? > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at thewilliams.ws Thu Nov 5 13:35:05 2009 From: adam at thewilliams.ws (Adam Williams) Date: Thu, 5 Nov 2009 13:35:05 -0500 Subject: [raleigh.rb] Passing a request from one controller to another In-Reply-To: <0264E0EA-0D57-4ADB-9F74-ADDDBD6CBDA2@tonyspencer.com> References: <77E79E55-1F3B-4422-90FF-7A274AA87EE8@tonyspencer.com> <0264E0EA-0D57-4ADB-9F74-ADDDBD6CBDA2@tonyspencer.com> Message-ID: <4A644376-2092-4097-B380-59D7869DBC73@thewilliams.ws> Is there some way of storing the controller, action and other parameters in the db, with the permalink, and then extend routes somehow so that the last Route answers the parameters for the matching path? Adam Williams On Nov 5, 2009, at 1:03 PM, Tony Spencer wrote: > Sorry. Those sample urls should have been: > > http://www.somesite.com/topics/show/1234 > and > http://www.somesite.com/categories/show/1234 > > On Nov 5, 2009, at 1:00 PM, Tony Spencer wrote: > >> We are currently adding a permalink or slug feature to a CMS we've >> built and are trying to sort out how to manage the routes. >> >> For instance, we would like to be able to set topics.permalink to >> "peanut-butter" which would mean that instead of : >> >> http://www.somesite.com/topics/1234 >> >> we would have a URL like this: >> >> http://www.somesite.com/peanut-butter >> >> It wouldn't be such a difficult task if we weren't also adding >> permalinks to other models such as: >> >> http://www.somesite.com/categories/1234 >> >> which could become: >> >> http://www.somesite.com/food >> >> ------------ >> The idea is to add a special controller that is the last route in >> routes.rb: >> >> connect '*url', :controller => 'action_not_found', :action => 'index' >> >> but the question I have is: Do you know if its possible for >> ActionNotFound controller to pass the request to Topics controller >> or Categories controller after looking up the permalink in a table >> that has columns like: >> >> - permalink >> - controller >> - action >> - id >> >> Or perhaps there is a better approach? >> _______________________________________________ >> raleigh-rb-members mailing list >> raleigh-rb-members at rubyforge.org >> http://rubyforge.org/mailman/listinfo/raleigh-rb-members > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members -------------- next part -------------- An HTML attachment was scrubbed... URL: From tj at stank.us Thu Nov 5 13:45:16 2009 From: tj at stank.us (TJ Stankus) Date: Thu, 5 Nov 2009 13:45:16 -0500 Subject: [raleigh.rb] Passing a request from one controller to another In-Reply-To: <4A644376-2092-4097-B380-59D7869DBC73@thewilliams.ws> References: <77E79E55-1F3B-4422-90FF-7A274AA87EE8@tonyspencer.com> <0264E0EA-0D57-4ADB-9F74-ADDDBD6CBDA2@tonyspencer.com> <4A644376-2092-4097-B380-59D7869DBC73@thewilliams.ws> Message-ID: > For instance, we would like to be able to set topics.permalink to > "peanut-butter" which would mean that instead of : > > http://www.somesite.com/topics/1234 > > we would have a URL like this: > > http://www.somesite.com/peanut-butter Would it possible to have http://www.somesite.com/topics/peanut-butter be your url? That seems more descriptive and would simplify the implementation. -TJ From seancribbs at gmail.com Thu Nov 5 13:41:07 2009 From: seancribbs at gmail.com (Sean Cribbs) Date: Thu, 05 Nov 2009 13:41:07 -0500 Subject: [raleigh.rb] Passing a request from one controller to another In-Reply-To: <77E79E55-1F3B-4422-90FF-7A274AA87EE8@tonyspencer.com> References: <77E79E55-1F3B-4422-90FF-7A274AA87EE8@tonyspencer.com> Message-ID: <4AF31C43.6050905@gmail.com> If you've got Rails 2.3 or later, you could always put in some middleware that rewrites the parameters before it gets to the Dispatcher. However, for the sake of good Google juice, I would only accept one URL for each unique item, and 301 redirect from all the others. Sean Tony Spencer wrote: > We are currently adding a permalink or slug feature to a CMS we've > built and are trying to sort out how to manage the routes. > > For instance, we would like to be able to set topics.permalink to > "peanut-butter" which would mean that instead of : > > http://www.somesite.com/topics/1234 > > we would have a URL like this: > > http://www.somesite.com/peanut-butter > > It wouldn't be such a difficult task if we weren't also adding > permalinks to other models such as: > > http://www.somesite.com/categories/1234 > > which could become: > > http://www.somesite.com/food > > ------------ > The idea is to add a special controller that is the last route in > routes.rb: > > connect '*url', :controller => 'action_not_found', :action => 'index' > > but the question I have is: Do you know if its possible for > ActionNotFound controller to pass the request to Topics controller or > Categories controller after looking up the permalink in a table that > has columns like: > > - permalink > - controller > - action > - id > > Or perhaps there is a better approach? > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > From info at lojic.com Thu Nov 5 14:43:47 2009 From: info at lojic.com (Brian Adkins) Date: Thu, 05 Nov 2009 14:43:47 -0500 Subject: [raleigh.rb] Passing a request from one controller to another In-Reply-To: References: <77E79E55-1F3B-4422-90FF-7A274AA87EE8@tonyspencer.com> <0264E0EA-0D57-4ADB-9F74-ADDDBD6CBDA2@tonyspencer.com> <4A644376-2092-4097-B380-59D7869DBC73@thewilliams.ws> Message-ID: <4AF32AF3.5030905@lojic.com> TJ Stankus wrote, On 11/5/09 1:45 PM: >> For instance, we would like to be able to set topics.permalink to >> "peanut-butter" which would mean that instead of : >> >> http://www.somesite.com/topics/1234 >> >> we would have a URL like this: >> >> http://www.somesite.com/peanut-butter > > Would it possible to have http://www.somesite.com/topics/peanut-butter > be your url? That seems more descriptive and would simplify the > implementation. Also, you could pick one of (topics, category) to be "pretty" and the other would be reserved. For example: http://www.somesite.com/peanut-butter http://www.somesite.com/categories/food You would not be able to have a 'categories' topic. Nor would you be able to have a short list of other reserved words (such as 'admin', etc.) be topics depending on how you structure your routes. I *think* you'll be much happier by not allowing: http://www.somesite.com/xyz where 'xyz' could be any topic or category. Brian -- Brian Adkins Lojic Technologies, LLC http://lojic.com/ From jflores at ahayo.net Sat Nov 7 09:26:49 2009 From: jflores at ahayo.net (jose@ahayo.net) Date: Sat, 7 Nov 2009 09:26:49 -0500 Subject: [raleigh.rb] Nano Macheist Message-ID: Free: http://www.macheist.com/ From pelargir at gmail.com Tue Nov 17 10:11:34 2009 From: pelargir at gmail.com (Matthew Bass) Date: Tue, 17 Nov 2009 10:11:34 -0500 Subject: [raleigh.rb] Pre-meeting chow Message-ID: As usual, anyone who is interested is invited to join us at Ruckus Pizza (http://bloat.me/S8nw) tonight for some pre-meeting eats. I'll be there around 5:30. We usually head over to Red Hat around 6:30 or 6:45. Give a +1 if you're in! Matthew From rick.denatale at gmail.com Tue Nov 17 13:59:53 2009 From: rick.denatale at gmail.com (Rick DeNatale) Date: Tue, 17 Nov 2009 13:59:53 -0500 Subject: [raleigh.rb] Pre-Meeting Chow? Message-ID: I assume Ruckus at the usual time like last month? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale From pelargir at gmail.com Tue Nov 17 14:10:45 2009 From: pelargir at gmail.com (Matthew Bass) Date: Tue, 17 Nov 2009 14:10:45 -0500 Subject: [raleigh.rb] Pre-Meeting Chow? In-Reply-To: References: Message-ID: <82A046AC-49D6-469E-BB24-4DAF2FE05DAF@gmail.com> On Nov 17, 2009, at 1:59 PM, Rick DeNatale wrote: > I assume Ruckus at the usual time like last month? Yep, same time, same place. I sent out a message to the list this morning, but I guess it got hung up or something. See y'all there! Matthew From rick.denatale at gmail.com Tue Nov 17 14:46:55 2009 From: rick.denatale at gmail.com (Rick DeNatale) Date: Tue, 17 Nov 2009 14:46:55 -0500 Subject: [raleigh.rb] Pre-Meeting Chow? In-Reply-To: <82A046AC-49D6-469E-BB24-4DAF2FE05DAF@gmail.com> References: <82A046AC-49D6-469E-BB24-4DAF2FE05DAF@gmail.com> Message-ID: Matthew, Are you in WF today? Do you or anyone else in WF want to ride together? On Tue, Nov 17, 2009 at 2:10 PM, Matthew Bass wrote: > > On Nov 17, 2009, at 1:59 PM, Rick DeNatale wrote: > >> I assume Ruckus at the usual time like last month? > > > Yep, same time, same place. I sent out a message to the list this morning, but I guess it got hung up or something. > > See y'all there! > > Matthew > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale From thomas at ravinggenius.com Sun Nov 22 19:44:45 2009 From: thomas at ravinggenius.com (Thomas Ingram) Date: Sun, 22 Nov 2009 19:44:45 -0500 Subject: [raleigh.rb] help please! strange datamapper behavior Message-ID: <51ce9ce10911221644k3600b0f9md9987a7a8bf28dd4@mail.gmail.com> I am building a merb application for my mom. There is quite a bit of seed data, so I've created a seeds.rb file in ./config. This file, along with the relevant models, is at http://gist.github.com/240807. Everything is working fine, with one exception. I am running the seeds file manually from the command line. It seems that DataMapper is not saving certain values correctly, but only the first time the file is run. Some of the Book#position values are set to 0, even though I am puts-ing the values out as the file runs. My setup: - merb = "1.0.15" - datamapper = "~> 0.10" To replicate: - create a new blank merb application - add ./config/seeds.rb - add ./app/models/*.rb - run `ruby ./config/seeds.rb` - observe output (comparing struc#position values with datamapper#position values) I hope somebody can figure out what's going on; I am really stumped. Thank you. Let me know if I wasn't clear on something. -- Thomas ><> Raving Genius? - foaming at the brain? m: 919 449.6305 e: thomas at ravinggenius.com w: http://log.ravinggenius.com/ wii: 6751 1365 9898 2150 From martin.streicher at gmail.com Mon Nov 23 10:51:33 2009 From: martin.streicher at gmail.com (Martin Streicher) Date: Mon, 23 Nov 2009 10:51:33 -0500 Subject: [raleigh.rb] State of the art for lists? In-Reply-To: <51ce9ce10911221644k3600b0f9md9987a7a8bf28dd4@mail.gmail.com> References: <51ce9ce10911221644k3600b0f9md9987a7a8bf28dd4@mail.gmail.com> Message-ID: What are considered the state-of-the-art acts_as_list and acts_as_tree add-ons? Martin From nathaniel at talbott.ws Mon Nov 23 12:25:40 2009 From: nathaniel at talbott.ws (Nathaniel Talbott) Date: Mon, 23 Nov 2009 12:25:40 -0500 Subject: [raleigh.rb] December Meeting Message-ID: <4ce336a20911230925i4ab67e58ra1c9742e811a6bd9@mail.gmail.com> We're doing something a little different in December: a book exchange! Read all about it here: http://www.meetup.com/raleighrb/calendar/11377547/ Notices will go out as usual leading up to the event, but I wanted to put in an extra plug here and encourage you all to start noodling on what book you're going to bring. I think it' will be a lot of fun (thanks to Mark Mzyk for the idea!) and can't wait to get exposed to all kinds of great ideas. Any questions, feel free to reply on or off list. Everybody have a great Thanksgiving! -- Nathaniel Talbott <:((>< From nathaniel at talbott.ws Mon Nov 23 13:54:07 2009 From: nathaniel at talbott.ws (Nathaniel Talbott) Date: Mon, 23 Nov 2009 13:54:07 -0500 Subject: [raleigh.rb] iPhone Dev Message-ID: <4ce336a20911231054s9c5d804k79fa310c1b7b8546@mail.gmail.com> I'm looking to augment Terralien's current iPhone dev capacity with another iPhone developer. I'm searching for someone who has strong general programming credentials, has a non-trivial iPhone app or two under their belt, is already a freelancer and is interested in a consistent, approximately half-time stream (10-15 hours/week) of iPhone work from Terralien. Initial work will be on an extensive medical iPhone+Rails application we've been cranking on for over a year; iFart it ain't. Why ask on Raleigh.rb? Well, the iPhone work that we do is (almost) always tied to a Rails API on the back-end, and I also know that a lot of Rubyists have a strong interest in Objective-C development on both the Mac and the iPhone. Also, I value the recommendations of my fellow Rubyists very highly, since I find that ya'll are typically a cut above the average developer on the street. I'm particularly interested in referrals that you've personally worked with on a project, iPhone or not. If you tell me, "This person is smart and gets things done, and they currently do iPhone work," I'm going to be very interested in talking to them. If any of you know someone (or think you yourself might fit the bill), please send me a direct email and give me the details. Replies on-list are also OK - others may be interested in finding smart iPhone developers as well. Thanks! -- Nathaniel Talbott <:((>< From rick.denatale at gmail.com Mon Nov 23 21:39:36 2009 From: rick.denatale at gmail.com (Rick DeNatale) Date: Mon, 23 Nov 2009 21:39:36 -0500 Subject: [raleigh.rb] What's the recommended pluging these days for ordered trees in Rails Message-ID: So we use to have acts_as_list and acts_as_tree then things like acts_as_nested_set seemed to be the cat's meow. I need a plugin that allows trees where the children at each level can be re-ordered. Googling leads me to awesome_nested_set Is this the best alternative? Anyone know if it works with both Rails 2.3.4 AND Ruby 1.9? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale From thomas at ravinggenius.com Sat Nov 28 21:11:00 2009 From: thomas at ravinggenius.com (Thomas Ingram) Date: Sat, 28 Nov 2009 21:11:00 -0500 Subject: [raleigh.rb] quick question, did i find a bug? Message-ID: <51ce9ce10911281811k27ec679bs6fa98db929260545@mail.gmail.com> What is so different about these two lines? This is either a bug or I'm ignorant about the way this is supposed to work. Please enlighten me. DataMapper.setup(:default, YAML.load(File.new(MERB_ROOT + "/config/database.yml"))[MERB_ENV]) # works DataMapper.setup(:default, YAML.load(File.expand_path(MERB_ROOT / 'config' / 'database.yml'))[MERB_ENV]) #doesn't work (ArgumentError) -- Thomas ><> Raving Genius? - foaming at the brain? m: 919 449.6305 e: thomas at ravinggenius.com w: http://log.ravinggenius.com/ wii: 6751 1365 9898 2150 From rick.denatale at gmail.com Sat Nov 28 21:37:58 2009 From: rick.denatale at gmail.com (Rick DeNatale) Date: Sat, 28 Nov 2009 21:37:58 -0500 Subject: [raleigh.rb] quick question, did i find a bug? In-Reply-To: <51ce9ce10911281811k27ec679bs6fa98db929260545@mail.gmail.com> References: <51ce9ce10911281811k27ec679bs6fa98db929260545@mail.gmail.com> Message-ID: On Sat, Nov 28, 2009 at 9:11 PM, Thomas Ingram wrote: > What is so different about these two lines? This is either a bug or > I'm ignorant about the way this is supposed to work. Please enlighten > me. > > DataMapper.setup(:default, YAML.load(File.new(MERB_ROOT + > "/config/database.yml"))[MERB_ENV]) # works > DataMapper.setup(:default, YAML.load(File.expand_path(MERB_ROOT / > 'config' / 'database.yml'))[MERB_ENV]) #doesn't work (ArgumentError) Well File.new returns a File object File.expand_path returns a String containing the resulting file pathname. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale From ken.auer at rolemodelsoftware.com Sat Nov 28 21:35:37 2009 From: ken.auer at rolemodelsoftware.com (Ken Auer) Date: Sat, 28 Nov 2009 21:35:37 -0500 Subject: [raleigh.rb] quick question, did i find a bug? In-Reply-To: <51ce9ce10911281811k27ec679bs6fa98db929260545@mail.gmail.com> References: <51ce9ce10911281811k27ec679bs6fa98db929260545@mail.gmail.com> Message-ID: Unless you just typed wrong File.expand_path(MERB_ROOT / 'config' / 'database.yml') is the problem. expand_path takes only two arguments, both Strings. I'm not sure what you are attempting to do with the slashes here. Ken On Sat, Nov 28, 2009 at 9:11 PM, Thomas Ingram wrote: > What is so different about these two lines? This is either a bug or > I'm ignorant about the way this is supposed to work. Please enlighten > me. > > DataMapper.setup(:default, YAML.load(File.new(MERB_ROOT + > "/config/database.yml"))[MERB_ENV]) # works > DataMapper.setup(:default, YAML.load(File.expand_path(MERB_ROOT / > 'config' / 'database.yml'))[MERB_ENV]) #doesn't work (ArgumentError) > > -- > Thomas ><> > Raving Genius? - foaming at the brain? > m: 919 449.6305 > e: thomas at ravinggenius.com > w: http://log.ravinggenius.com/ > wii: 6751 1365 9898 2150 > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members -- Ken Auer The Extreme Programming Software Studio? RoleModel Software 919-557-6352 (v) 6720 RoleModel Way 919-342-5016 (f) Holly Springs, NC 27540 919-622-8315 (m) A Member of the RoleModel Community of Businesses ( http://rolemodelcommunity.com) "Christianity is not a plug-in, it's an operating system" (see Mark 12:28-31) -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve at iannopollo.com Sat Nov 28 21:46:14 2009 From: steve at iannopollo.com (Steve Iannopollo) Date: Sat, 28 Nov 2009 21:46:14 -0500 Subject: [raleigh.rb] quick question, did i find a bug? In-Reply-To: References: <51ce9ce10911281811k27ec679bs6fa98db929260545@mail.gmail.com> Message-ID: <81863598-1861-4F89-950B-ECC30F9F398F@iannopollo.com> It also looks like in your File.expand_path, you are passing in "MERB_ROOT / 'config' / 'database.yml'". I'm not quite sure what that does, but if those objects are all strings (which 2 out of the 3 I know are, and I would assume that MERB_ROOT is also a string), then that might be your problem. A quick check in irb shows that String has no method '/'. I've never used Merb, so I don't know if they have added that method to String or not. -Steve On Nov 28, 2009, at 9:37 PM, Rick DeNatale wrote: > On Sat, Nov 28, 2009 at 9:11 PM, Thomas Ingram wrote: >> What is so different about these two lines? This is either a bug or >> I'm ignorant about the way this is supposed to work. Please enlighten >> me. >> >> DataMapper.setup(:default, YAML.load(File.new(MERB_ROOT + >> "/config/database.yml"))[MERB_ENV]) # works >> DataMapper.setup(:default, YAML.load(File.expand_path(MERB_ROOT / >> 'config' / 'database.yml'))[MERB_ENV]) #doesn't work (ArgumentError) > > Well > > File.new returns a File object > File.expand_path returns a String containing the resulting file pathname. > > -- > Rick DeNatale > > Blog: http://talklikeaduck.denhaven2.com/ > Twitter: http://twitter.com/RickDeNatale > WWR: http://www.workingwithrails.com/person/9021-rick-denatale > LinkedIn: http://www.linkedin.com/in/rickdenatale > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members From matthew.todd at gmail.com Sun Nov 29 04:59:22 2009 From: matthew.todd at gmail.com (Matthew Todd) Date: Sun, 29 Nov 2009 12:59:22 +0300 Subject: [raleigh.rb] quick question, did i find a bug? In-Reply-To: References: <51ce9ce10911281811k27ec679bs6fa98db929260545@mail.gmail.com> Message-ID: On Nov 29, 2009, at 5:11 AM, Thomas Ingram wrote: >> DataMapper.setup(:default, YAML.load(File.expand_path(MERB_ROOT / >> 'config' / 'database.yml'))[MERB_ENV]) #doesn't work (ArgumentError) On Nov 29, 2009, at 5:35 AM, Ken Auer wrote: > I'm not sure what you are attempting to do with the slashes here. String#/ is syntactic sugar around File::join. (And might be considered a good example both of playfulness and of "going too far," depending on your predisposition.) Merb gets it from extlib: http://github.com/merb/merb/blob/master/merb-core/lib/merb-core/ core_ext.rb#L2 http://github.com/datamapper/extlib/blob/master/lib/extlib/ string.rb#L83-95 -- Matthew From rick.denatale at gmail.com Sun Nov 29 08:48:05 2009 From: rick.denatale at gmail.com (Rick DeNatale) Date: Sun, 29 Nov 2009 08:48:05 -0500 Subject: [raleigh.rb] quick question, did i find a bug? In-Reply-To: References: <51ce9ce10911281811k27ec679bs6fa98db929260545@mail.gmail.com> Message-ID: On Sat, Nov 28, 2009 at 9:35 PM, Ken Auer wrote: > Unless you just typed wrong > File.expand_path(MERB_ROOT /?'config' / 'database.yml') > is the problem. ?expand_path takes only two arguments, both Strings. Actually File.join takes any non-zero number of Strings irb(main):001:0> File.join("a") => "a" irb(main):002:0> File.join("a", "b") => "a/b" irb(main):003:0> File.join("a", "b", "c") => "a/b/c" -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale From thomas at ravinggenius.com Sun Nov 29 12:05:08 2009 From: thomas at ravinggenius.com (Thomas Ingram) Date: Sun, 29 Nov 2009 12:05:08 -0500 Subject: [raleigh.rb] quick question, did i find a bug? In-Reply-To: <51ce9ce10911281811k27ec679bs6fa98db929260545@mail.gmail.com> References: <51ce9ce10911281811k27ec679bs6fa98db929260545@mail.gmail.com> Message-ID: <51ce9ce10911290905j65366aees6261c965ff9804e1@mail.gmail.com> Just to follow up... MERB_ROOT = File.expand_path(File.dirname(__FILE__) / '..') puts MERB_ROOT puts File.new(MERB_ROOT + '/config/database.yml') puts File.expand_path(MERB_ROOT / 'config' / 'database.yml') produces... /home/thomas/Code/mom-jot_tittle_merb # /home/thomas/Code/mom-jot_tittle_merb/config/database.yml YAML.load takes a File object. YAML.load_file takes a string path to a file. I've been using C#'s overloading methods for too long. :) Sorry for my confusion; next time I'll read the docs more closely. On Sat, Nov 28, 2009 at 9:11 PM, Thomas Ingram wrote: > DataMapper.setup(:default, YAML.load(File.new(MERB_ROOT + > "/config/database.yml"))[MERB_ENV]) # works > DataMapper.setup(:default, YAML.load(File.expand_path(MERB_ROOT / > 'config' / 'database.yml'))[MERB_ENV]) #doesn't work (ArgumentError) -- Thomas ><> Raving Genius? - foaming at the brain? m: 919 449.6305 e: thomas at ravinggenius.com w: http://log.ravinggenius.com/ wii: 6751 1365 9898 2150 From thomas at ravinggenius.com Sun Nov 29 15:19:33 2009 From: thomas at ravinggenius.com (Thomas Ingram) Date: Sun, 29 Nov 2009 15:19:33 -0500 Subject: [raleigh.rb] Range in database In-Reply-To: <51ce9ce10911291215u3ab6f304lf2a60d52e51e748a@mail.gmail.com> References: <51ce9ce10911291215u3ab6f304lf2a60d52e51e748a@mail.gmail.com> Message-ID: <51ce9ce10911291219m4277d5d0ne4d31c434d55a6f@mail.gmail.com> I am working on a Bible application with/for my mom. :) I have models for Book, Chapter, Verse and Passage. Since Passage is a range of Verse, how should I represent that? In the database I would like to just store a reference to the start/end Verse. These can't be proper foreign keys, BTW; just want to store start/stop Chapter/Verse. So my question is: What would be the best way to select a Passage and get a proper Ruby Range object? I don't mind having to call to_r on a Passage instance before I can loop over the Verses. Thanks for any tips you might have! -------------- next part -------------- An HTML attachment was scrubbed... URL: From rick.denatale at gmail.com Sun Nov 29 18:03:29 2009 From: rick.denatale at gmail.com (Rick DeNatale) Date: Sun, 29 Nov 2009 18:03:29 -0500 Subject: [raleigh.rb] Range in database In-Reply-To: <51ce9ce10911291219m4277d5d0ne4d31c434d55a6f@mail.gmail.com> References: <51ce9ce10911291215u3ab6f304lf2a60d52e51e748a@mail.gmail.com> <51ce9ce10911291219m4277d5d0ne4d31c434d55a6f@mail.gmail.com> Message-ID: On Sun, Nov 29, 2009 at 3:19 PM, Thomas Ingram wrote: > I am working on a Bible application with/for my mom. :) I have models for > Book, Chapter, Verse and Passage. Since Passage is a range of Verse, how > should I represent that? In the database I would like to just store a > reference to the start/end Verse. These can't be proper foreign keys, BTW; > just want to store start/stop Chapter/Verse. > > So my question is: What would be the best way to select a Passage and get a > proper Ruby Range object? I don't mind having to call to_r on a Passage > instance before I can loop over the Verses. Thanks for any tips you might > have! A range can be created from any two objects as long as 1) They are comparable using the <=> method, and 2) they have a succ method which when sent to an object returns the next one in the sequence. Now I'm going to assume that each verse object knows which chapter it belongs to, and each chapter knows which book it belongs to and a passage in general can start with any verse in any chapter in any book, and end with any verse in any chapter in any book as long as it comes later. Given that, I'd have a starting_verse_id and ending_verse_id in the passage model, and return a range built from those two verses. Then Book#<=> would return -1 if the argument book came after self, 0 if it was the same book and 1 otherwise. Chapter#<=> would see if it's book was the same as the other chapters book and if not return the result of sending self.book <=> other.book otherwise it would return -1 if other came later, 0 if the same chapter and 1 otherwise. Verse#<=> would work the same way as Chapter#<=> with chapter replacing book. Chapter#first_verse would return the first verse of the chapter. Book#first_chapter would return the first chapter of the book Verse.succ would return the next verse in the same chapter if there was one, otherwise it would return self.chapter.succ.first_verse Chapter#succ would return the next chapter of the book if there was one, otherwise it would return self.book.succ.first_chapter Book#succ would return the next book HTH. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale From steve at iannopollo.com Sun Nov 29 20:49:22 2009 From: steve at iannopollo.com (Steve Iannopollo) Date: Sun, 29 Nov 2009 20:49:22 -0500 Subject: [raleigh.rb] Range in database In-Reply-To: <51ce9ce10911291219m4277d5d0ne4d31c434d55a6f@mail.gmail.com> References: <51ce9ce10911291215u3ab6f304lf2a60d52e51e748a@mail.gmail.com> <51ce9ce10911291219m4277d5d0ne4d31c434d55a6f@mail.gmail.com> Message-ID: How come the verses can't be proper foreign keys? Are they not stored in the database? It would probably make your work a whole lot easier if everything you are modeling (Book, Chapter, Verse and Passage) were stored as objects in the database, then start and stop verse for a Passage could just be as simple as storing start_verse_id and end_verse_id. Then you can implement Rick's suggestions about making your Passage a Range like object. -Steve On Nov 29, 2009, at 3:19 PM, Thomas Ingram wrote: > I am working on a Bible application with/for my mom. :) I have models for Book, Chapter, Verse and Passage. Since Passage is a range of Verse, how should I represent that? In the database I would like to just store a reference to the start/end Verse. These can't be proper foreign keys, BTW; just want to store start/stop Chapter/Verse. > > So my question is: What would be the best way to select a Passage and get a proper Ruby Range object? I don't mind having to call to_r on a Passage instance before I can loop over the Verses. Thanks for any tips you might have! > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members -------------- next part -------------- An HTML attachment was scrubbed... URL: From rick.denatale at gmail.com Sun Nov 29 22:09:14 2009 From: rick.denatale at gmail.com (Rick DeNatale) Date: Sun, 29 Nov 2009 22:09:14 -0500 Subject: [raleigh.rb] Range in database In-Reply-To: References: <51ce9ce10911291215u3ab6f304lf2a60d52e51e748a@mail.gmail.com> <51ce9ce10911291219m4277d5d0ne4d31c434d55a6f@mail.gmail.com> Message-ID: On Sun, Nov 29, 2009 at 8:49 PM, Steve Iannopollo wrote: > How come the verses can't be proper foreign keys? Are they not stored in the > database? It would probably make your work a whole lot easier if everything > you are modeling (Book, Chapter, Verse and Passage) were stored as objects > in the database, then start and stop verse for a Passage could just be as > simple as storing start_verse_id and end_verse_id. Well that was the assumption I made as well. Of course the keys could only be used like that if the verses were loaded in strict order since the keys are autoincremented. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale From steve at iannopollo.com Sun Nov 29 22:18:15 2009 From: steve at iannopollo.com (Steve Iannopollo) Date: Sun, 29 Nov 2009 22:18:15 -0500 Subject: [raleigh.rb] Range in database In-Reply-To: References: <51ce9ce10911291215u3ab6f304lf2a60d52e51e748a@mail.gmail.com> <51ce9ce10911291219m4277d5d0ne4d31c434d55a6f@mail.gmail.com> Message-ID: <0BBC9BA8-7D77-4EA2-B10B-D521FFE45997@iannopollo.com> Not necessarily, since verses have a natural order in the chapter (their verse number), and chapters have a natural order in a book (they're chapter number). The only thing that would need to be loaded in order are the books of the Bible (and the Bible only has 66 books, not counting apocryphal ones :-). -Steve On Nov 29, 2009, at 10:09 PM, Rick DeNatale wrote: > On Sun, Nov 29, 2009 at 8:49 PM, Steve Iannopollo wrote: >> How come the verses can't be proper foreign keys? Are they not stored in the >> database? It would probably make your work a whole lot easier if everything >> you are modeling (Book, Chapter, Verse and Passage) were stored as objects >> in the database, then start and stop verse for a Passage could just be as >> simple as storing start_verse_id and end_verse_id. > > Well that was the assumption I made as well. > > Of course the keys could only be used like that if the verses were > loaded in strict order since the keys are autoincremented. > > > -- > Rick DeNatale > > Blog: http://talklikeaduck.denhaven2.com/ > Twitter: http://twitter.com/RickDeNatale > WWR: http://www.workingwithrails.com/person/9021-rick-denatale > LinkedIn: http://www.linkedin.com/in/rickdenatale > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members From adam at thewilliams.ws Sun Nov 29 22:56:51 2009 From: adam at thewilliams.ws (Adam Williams) Date: Sun, 29 Nov 2009 22:56:51 -0500 Subject: [raleigh.rb] Range in database In-Reply-To: <0BBC9BA8-7D77-4EA2-B10B-D521FFE45997@iannopollo.com> References: <51ce9ce10911291215u3ab6f304lf2a60d52e51e748a@mail.gmail.com> <51ce9ce10911291219m4277d5d0ne4d31c434d55a6f@mail.gmail.com> <0BBC9BA8-7D77-4EA2-B10B-D521FFE45997@iannopollo.com> Message-ID: <094CF355-F104-415B-9CE4-1870FAEB7CF8@thewilliams.ws> On Nov 29, 2009, at 10:18 PM, Steve Iannopollo wrote: > Not necessarily, since verses have a natural order in the chapter (their verse number), and chapters have a natural order in a book (they're chapter number). The only thing that would need to be loaded in order are the books of the Bible (and the Bible only has 66 books, not counting apocryphal ones :-). > > On Nov 29, 2009, at 10:09 PM, Rick DeNatale wrote: > >> On Sun, Nov 29, 2009 at 8:49 PM, Steve Iannopollo wrote: >>> How come the verses can't be proper foreign keys? Are they not stored in the >>> database? It would probably make your work a whole lot easier if everything >>> you are modeling (Book, Chapter, Verse and Passage) were stored as objects >>> in the database, then start and stop verse for a Passage could just be as >>> simple as storing start_verse_id and end_verse_id. >> >> Well that was the assumption I made as well. I've heard that the complete text of the Bible consumes only about 6MB of memory. Why put it in a database at all, I wonder?A reference could be simply 'John 3:16'. And a passage could be 'Romans 3:21-25'. The Passage class would be able to answer an array of Verse instances - as could a Chapter - each then able to answer their Book, Chapter and text. User Notes, and other entities, would be stored in the database with their Verse reference, 'Psalm 14:1'. Thinking out loud, Adam From thomas at ravinggenius.com Sun Nov 29 23:05:41 2009 From: thomas at ravinggenius.com (Thomas Ingram) Date: Sun, 29 Nov 2009 23:05:41 -0500 Subject: [raleigh.rb] Range in database In-Reply-To: <51ce9ce10911291219m4277d5d0ne4d31c434d55a6f@mail.gmail.com> References: <51ce9ce10911291215u3ab6f304lf2a60d52e51e748a@mail.gmail.com> <51ce9ce10911291219m4277d5d0ne4d31c434d55a6f@mail.gmail.com> Message-ID: <51ce9ce10911292005t1a670dd6h4d9c7d4764289798@mail.gmail.com> First of all, thank you for the quick responses. I'm asking all future questions on Sunday afternoon! Most of the assumptions here are correct. Book has many Chapters, Chapter belongs to Book and has many Verses. Verses belongs to Chapter, but also belongs to Translation. Therefore I was initially planning to store many version (KJV, NIV etc) of each Verse, all in the same table/model. After reading the replies, it seem like a better solution would be to have Verse (for reference, like a header record) and add VerseContent or VerseTranslation to hold the actual text for a particular translation. I think that would simplify dealing with the Ranges. Is there an established convention that would apply to the names I should choose? I like VerseContent, because this would be where the actual text would be. I like VerseTranslation (or TranslationVerse?) because this would really be a HABTM model, just with a primary key and content field. Thanks for any insight you may have here. -- Thomas ><> Raving Genius? - foaming at the brain? m: 919 449.6305 e: thomas at ravinggenius.com w: http://log.ravinggenius.com/ wii: 6751 1365 9898 2150 From thomas at ravinggenius.com Sun Nov 29 23:15:59 2009 From: thomas at ravinggenius.com (Thomas Ingram) Date: Sun, 29 Nov 2009 23:15:59 -0500 Subject: [raleigh.rb] Range in database In-Reply-To: <094CF355-F104-415B-9CE4-1870FAEB7CF8@thewilliams.ws> References: <51ce9ce10911291215u3ab6f304lf2a60d52e51e748a@mail.gmail.com> <51ce9ce10911291219m4277d5d0ne4d31c434d55a6f@mail.gmail.com> <0BBC9BA8-7D77-4EA2-B10B-D521FFE45997@iannopollo.com> <094CF355-F104-415B-9CE4-1870FAEB7CF8@thewilliams.ws> Message-ID: <51ce9ce10911292015j20d34a99i777375370a03d5a7@mail.gmail.com> The primary reason is that I plan to host this on Heroku and therefore won't have access to the file system. Also I just prefer to have the verses in the database. Passages and references will still be displayed the way that you wrote them, of course. One more reason is, provided this thing takes off, I want to leave room to easily add new languages or translations within a language. On Sun, Nov 29, 2009 at 10:56 PM, Adam Williams wrote: > I've heard that the complete text of the Bible consumes only about 6MB of memory. Why put it in a database at all, I wonder?A reference could be simply 'John 3:16'. And a passage could be 'Romans 3:21-25'. The Passage class would be able to answer an array of Verse instances - as could a Chapter - each then able to answer their Book, Chapter and text. User Notes, and other entities, would be stored in the database with their Verse reference, 'Psalm 14:1'. -- Thomas ><> Raving Genius? - foaming at the brain? m: 919 449.6305 e: thomas at ravinggenius.com w: http://log.ravinggenius.com/ wii: 6751 1365 9898 2150 From rick.denatale at gmail.com Mon Nov 30 08:15:35 2009 From: rick.denatale at gmail.com (Rick DeNatale) Date: Mon, 30 Nov 2009 08:15:35 -0500 Subject: [raleigh.rb] Range in database In-Reply-To: <0BBC9BA8-7D77-4EA2-B10B-D521FFE45997@iannopollo.com> References: <51ce9ce10911291215u3ab6f304lf2a60d52e51e748a@mail.gmail.com> <51ce9ce10911291219m4277d5d0ne4d31c434d55a6f@mail.gmail.com> <0BBC9BA8-7D77-4EA2-B10B-D521FFE45997@iannopollo.com> Message-ID: On Sun, Nov 29, 2009 at 10:18 PM, Steve Iannopollo wrote: > Not necessarily, since verses have a natural order in the chapter (their verse number), and chapters have a natural order in a book (they're chapter number). The only thing that would need to be loaded in order are the books of the Bible (and the Bible only has 66 books, not counting apocryphal ones :-). But you seemed to be suggesting that each verse be an activerecord record, and that the id's of the records be used to sequence them since you called them keys. What I was implying was that verse 2 of chapter 3 of the Book of X 'knows' that the next verse was either verse 3 or the first verse of the next chapter, and chapter 3 of Book of X 'knows' that the next chapter is either chapter 1 of the Book of X or the first chapter of whatever book follows the Book of X, call it the Book of Z. But I'm not sure that you're not, in effect, saying the same thing. Let's say the Book of X has 3 Chapters, and the last chapter has 2 verses, an alternative would be to have X 3:2 'know' directly that the next verse was Z 1:1, but that would require something like scanning the whole Bible in order, I think. Now assuming that you dont want the bible to be editted, adding and removing books, chapters, and verses that might still be the best thing to do. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale From harini.r.iyer at gmail.com Mon Nov 30 23:31:16 2009 From: harini.r.iyer at gmail.com (harini iyer) Date: Tue, 1 Dec 2009 10:01:16 +0530 Subject: [raleigh.rb] Problems with starting the backgroundrb server - How to make the UNIXSocket work on Windows Message-ID: <404e0d6d0911302031u4a6f1069hd3f3acd66a38ab96@mail.gmail.com> Hi, I am a newbie to backgroundrb. Win32-utils doesnt seem to have an interface for sockets. When I give the 'ruby script/backgroundrb start' , I got an error in master_packet.rb saying that UNIXSocket unimplemented. This was understood since I am working on Windows Vista. However, I tried Socket.socketpair which did not work either. Is there a workaround for this? Is there a patch available for starting the backgroundrb server on windows? I installed the win32-utils and I am still stuck on the UNIXSocket.pair() error in the packet module. Thank You, Harini