Okay, BlankSlate is now no longer used in TS 1.x (and the branch is now v1, not master). This will be a part of the next gem release (1.4.11).
-- Pat On 18/11/2011, at 10:26 AM, Pat Allan wrote: > Couldn't get it working on TS master/rails3. Though it sounds like it's the > vendored version of blank slate that's the issue. I'm thinking I might have > to remove the use of blank slate in TS master/rails3. I'll try to get to that > in the next day or so. > > -- > Pat > > On 18/11/2011, at 8:25 AM, Ngan wrote: > >> Interesting. That's a pretty cool. Never seen it done like that >> before. Looking forward to the change. >> >> On Nov 17, 7:14 am, Pat Allan <[email protected]> wrote: >>> Hmm… curiouser and curiouser. >>> >>> In my rewrite of TS, I've not used FauxColumn, but instead am creating a >>> Module on the fly (the given block is the module's definition) and >>> extending the current instance with that. I've read that the performance is >>> a little better, and it feels a little more elegant (never a fan of >>> *_eval), albeit on the far side of metaprogramming. >>> >>> https://github.com/freelancing-god/thinking-sphinx/blob/edge/lib/thin... >>> >>> If you want to try something like that instead? I could try changing the >>> internals of the master/rails3 branches, but given it's night time here it >>> won't be until tomorrow at the earliest. >>> >>> -- >>> Pat >>> >>> On 17/11/2011, at 9:50 PM, Ngan wrote: >>> >>> >>> >>> >>> >>> >>> >>>> It prints FauxColumn. >>> >>>> Doesn't that mean that instance_eval has fallen through to method >>>> missing? >>>> Im going to try to isolate the blankslate issue today. Will let you >>>> know. >>> >>>> On Nov 17, 2:25 am, Pat Allan <[email protected]> wrote: >>>>> It's actually Builder 2.1.2 or better that TS expects… so there shouldn't >>>>> be a version conflict happening. >>> >>>>> So if instance_eval can't be revealed, then I guess it's not being >>>>> removed by BlankSlate. Which then doesn't explain why things aren't >>>>> working. >>> >>>>> Just to double-check - does this raise the expected error, or does it >>>>> print out a FauxColumn: >>>>> puts self.instance_eval >>> >>>>> -- >>>>> Pat >>> >>>>> On 17/11/2011, at 1:06 AM, Ngan wrote: >>> >>>>>> Not sure if this helps, but I have confirmed that the BlankSlate being >>>>>> used in TS is the one from Rails (which is builder-2.1.2 for my >>>>>> version of Rails), instead of the builder-3.0 that is specified ini >>>>>> the gemspec. >>> >>>>>> On Nov 16, 9:33 am, Ngan <[email protected]> wrote: >>>>>>> Also, I'm on Rails 2.3.2, which I found includes its own version of >>>>>>> builder and therefore BlankSlate. After doing some puts, I found that >>>>>>> the blankslate builded with rails is the one that gets evaluated, and >>>>>>> the one from thinking sphinx gem spec (builder 3.x) is not getting run >>>>>>> at all. >>> >>>>>>> I'm using bundler. >>> >>>>>>> On Nov 16, 9:08 am, Ngan <[email protected]> wrote: >>> >>>>>>>> I've added that but then I just get this error: >>>>>>>> Don't know how to reveal method 'instance_eval' >>> >>>>>>>> Just to confirm: >>> >>>>>>>> class Builder < BlankSlate >>>>>>>> reveal :instance_eval >>>>>>>> reveal :repond_to? >>> >>>>>>>> def self.generate(...) >>>>>>>> ... >>>>>>>> end >>> >>>>>>>> On Nov 16, 2:32 am, Pat Allan <[email protected]> wrote: >>> >>>>>>>>> Hmm, REE must behave differently with BlankSlate. I've certainly >>>>>>>>> noticed different behaviours for Ruby 1.9 and Rubinius. >>> >>>>>>>>> Although keep in mind respond_to? is returning the FauxColumn in your >>>>>>>>> example, it's not instance_eval itself. In your local copy of TS, can >>>>>>>>> you add the following to the top of the Builder class: >>>>>>>>> reveal :instance_eval >>>>>>>>> reveal :respond_to? >>> >>>>>>>>> That'll unhide those methods. >>> >>>>>>>>> -- >>>>>>>>> Pat >>> >>>>>>>>> On 16/11/2011, at 2:14 PM, Ngan wrote: >>> >>>>>>>>>> I've narrowed down the issue... >>>>>>>>>> lib/thinking_sphinx/index/builder.rb >>> >>>>>>>>>> def initialzie >>>>>>>>>> ... >>>>>>>>>> self.instance_eval &block >>>>>>>>>> ... >>>>>>>>>> end >>> >>>>>>>>>> That call seems to not be working and/or doing nothing. >>>>>>>>>> When I do: >>> >>>>>>>>>> puts "self.respond_to?(:instance_eval)", I get: >>>>>>>>>> #<ThinkingSphinx::Index::FauxColumn:0x10f575778> >>> >>>>>>>>>> I'm on Ruby Enterprise1.8.7-2010.02 >>> >>>>>>>>>> This must be because of the BlankSlate/Builder changes? >>> >>>>>>>>>> On Nov 5, 1:25 am, Pat Allan <[email protected]> wrote: >>>>>>>>>>> I don't suppose the stack trace holds any clues? >>> >>>>>>>>>>> -- >>>>>>>>>>> Pat >>> >>>>>>>>>>> On 05/11/2011, at 12:10 AM, Ngan wrote: >>> >>>>>>>>>>>> I've removed all indexes from all models and left just one: >>> >>>>>>>>>>>> class Label < ActiveRecord::Base >>>>>>>>>>>> define_index do >>>>>>>>>>>> indexes :name >>>>>>>>>>>> end >>>>>>>>>>>> end >>> >>>>>>>>>>>> And it still errors. >>> >>>>>>>>>>>> On Nov 4, 2:36 pm, Ngan <[email protected]> wrote: >>>>>>>>>>>>> Yea, i downgrade Riddle as well when going to 1.4.9 (it errors >>>>>>>>>>>>> when >>>>>>>>>>>>> you don't). >>> >>>>>>>>>>>>> Will check further >>> >>>>>>>>>>>>> On Nov 4, 2:07 pm, Pat Allan <[email protected]> wrote: >>> >>>>>>>>>>>>>> Can't think why that error would appear changing from 1.4.7 to >>>>>>>>>>>>>> 1.4.10… >>> >>>>>>>>>>>>>> When you downgrade to 1.4.9, keep in mind you'll need to >>>>>>>>>>>>>> downgrade Riddle as well (1.5.0 only works with1.4.10/2.0.10- >>>>>>>>>>>>>> all were released earlier today). >>> >>>>>>>>>>>>>> Do any of your index definitions not have any fields? Are you >>>>>>>>>>>>>> doing anything out of the ordinary with index definitions? >>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Pat >>> >>>>>>>>>>>>>> On 04/11/2011, at 10:50 PM, Ngan wrote: >>> >>>>>>>>>>>>>>> I'm on Rails 2.3. Been running TS 1.4.7. Tried to upgrade to >>>>>>>>>>>>>>> to TS >>>>>>>>>>>>>>> 1.4.10, but got this error: >>> >>>>>>>>>>>>>>> $ rake ts:index --trace >>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>> At least one field is necessary for an index >>>>>>>>>>>>>>> ... >>> >>>>>>>>>>>>>>> I tried to upgrade to 1.4.9, and got the same error... >>>>>>>>>>>>>>> What changed? >>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> You received this message because you are subscribed to the >>>>>>>>>>>>>>> Google Groups "Thinking Sphinx" group. >>>>>>>>>>>>>>> To post to this group, send email to >>>>>>>>>>>>>>> [email protected]. >>>>>>>>>>>>>>> To unsubscribe from this group, send email to >>>>>>>>>>>>>>> [email protected]. >>>>>>>>>>>>>>> For more options, visit this group >>>>>>>>>>>>>>> athttp://groups.google.com/group/thinking-sphinx?hl=en. >>> >>>>>>>>>>>> -- >>>>>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>>>>> Groups "Thinking Sphinx" group. >>>>>>>>>>>> To post to this group, send email to >>>>>>>>>>>> [email protected]. >>>>>>>>>>>> To unsubscribe from this group, send email to >>>>>>>>>>>> [email protected]. >>>>>>>>>>>> For more options, visit this group >>>>>>>>>>>> athttp://groups.google.com/group/thinking-sphinx?hl=en. >>> >>>>>>>>>> -- >>>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>>> Groups "Thinking Sphinx" group. >>>>>>>>>> To post to this group, send email to >>>>>>>>>> [email protected]. >>>>>>>>>> To unsubscribe from this group, send email to >>>>>>>>>> [email protected]. >>>>>>>>>> For more options, visit this group >>>>>>>>>> athttp://groups.google.com/group/thinking-sphinx?hl=en. >>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Thinking Sphinx" group. >>>>>> To post to this group, send email to [email protected]. >>>>>> To unsubscribe from this group, send email to >>>>>> [email protected]. >>>>>> For more options, visit this group >>>>>> athttp://groups.google.com/group/thinking-sphinx?hl=en. >>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "Thinking Sphinx" group. >>>> To post to this group, send email to [email protected]. >>>> To unsubscribe from this group, send email to >>>> [email protected]. >>>> For more options, visit this group >>>> athttp://groups.google.com/group/thinking-sphinx?hl=en. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Thinking Sphinx" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/thinking-sphinx?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
