Hi, I''m new to using ferret (and fairly new to ruby/rails) and I''m having a problem I can''t fathom. Sorry for the long post ... I have a test which passes require ''rubygems'' require ''ferret'' include Ferret require ''test/unit'' class CompanyTest < Test::Unit::TestCase def test_index puts ''running test'' @index = Index::Index.new(:path => ''../tmp/search-index'') @index << {:title => "prospecting", :content => "blah blah blah"} @index << {:title => "prospecting", :content => "yada yada yada"} @index.search_each(''content:"blah"'') do |id, score| #just assert true if we didn''t get an error .. ferret #seems to be working assert true end end end which I think means that ferret is properly installed When I search in my app I get this error undefined method `exists?'' for {:term_vector=>:no, :store=>:no, :boost=>1.0, :index=>:yes}:Hash RAILS_ROOT: /Users/chrisc/Documents/checkouts/PROS/config/.. Application Trace | Framework Trace | Full Trace /opt/local/lib/ruby/site_ruby/1.8/ferret/index/field_infos.rb:20:in `initialize'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:166:in `rebuild_index'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:230:in `create_index_instance'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:223:in `ferret_index'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:389:in `find_id_by_contents'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:253:in `find_by_contents'' #{RAILS_ROOT}/app/controllers/companies_controller.rb:517:in `createConditionsFromParameters'' #{RAILS_ROOT}/app/controllers/companies_controller.rb:694:in `generate_list_from_filter'' #{RAILS_ROOT}/app/controllers/companies_controller.rb:290:in `list_profile_information'' /opt/local/bin/mongrel_rails:18 which looks to me as if acts_as_ferret is not finding the ferret index In my model I have require ''rubygems'' require ''ferret'' include Ferret acts_as_ferret :fields => [ ''name'', ''comments''] and in the controller companies=Company.find_by_contents(params[:company_search_term]) I don''t see that aaf is building the index, which I think is where the app is blowing up. My reading of the docs is that it should do. Did I do something dumb, or is there a known issue with these versions that I missed? Many thanks for any help ... this is driving me crazy ... Rails 1.1.6 Ruby 1.8.4 acts_as_ferret from svn Ferret 0.10.9 on mac OS X -- Posted via http://www.ruby-forum.com/.
On Tue, Oct 03, 2006 at 09:22:36AM +0200, Chris Catton wrote:> Hi, > I''m new to using ferret (and fairly new to ruby/rails) and I''m having a > problem I can''t fathom. Sorry for the long post ...[..]> When I search in my app I get this error > > undefined method `exists?'' for {:term_vector=>:no, :store=>:no, > :boost=>1.0, :index=>:yes}:Hash > RAILS_ROOT: /Users/chrisc/Documents/checkouts/PROS/config/.. > > Application Trace | Framework Trace | Full Trace > /opt/local/lib/ruby/site_ruby/1.8/ferret/index/field_infos.rb:20:in > `initialize'' > #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:166:in > `rebuild_index''[..]> Many thanks for any help ... this is driving me crazy ... > Rails 1.1.6 > Ruby 1.8.4 > acts_as_ferret from svn > Ferret 0.10.9 > on mac OS X >strange, on my system line 20 in field_infos.rb is inside a comment, and no use of exists? is made inside the file. Are you sure that field_infos.rb belongs to Ferrewt 0.10.9 ? Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66
Jens Thanks very much - this helped me find the problem which was an old version of ferret in the path and a failure on my part to check that the same version of ruby was being callled in the console and by mongrel. chris Jens Kraemer wrote:> On Tue, Oct 03, 2006 at 09:22:36AM +0200, Chris Catton wrote: >> Hi, >> I''m new to using ferret (and fairly new to ruby/rails) and I''m having a >> problem I can''t fathom. Sorry for the long post ... > [..] >> `rebuild_index'' > [..] >> Many thanks for any help ... this is driving me crazy ... >> Rails 1.1.6 >> Ruby 1.8.4 >> acts_as_ferret from svn >> Ferret 0.10.9 >> on mac OS X >> > > strange, on my system line 20 in field_infos.rb is inside a comment, and > no use of exists? is made inside the file. Are you sure that > field_infos.rb belongs to Ferrewt 0.10.9 ? > > Jens > > -- > webit! Gesellschaft f?r neue Medien mbH www.webit.de > Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de > Schnorrstra?e 76 Tel +49 351 46766 0 > D-01069 Dresden Fax +49 351 46766 66-- Posted via http://www.ruby-forum.com/.
Hi. I'm trying to set up RAC with OCFS across two machines. I couldn't readily find the answer to a simple question, either in the official OCFS documentation or online cookbooks: I've set up a partition, formatted it and mounted it as OCFS on the first machine and it seems to work fine (i.e. I can touch files within that mount). I've activated the OCFS module on the second machine. I haven't installed the Oracle DB yet. What am I supposed to do to let the two machines start seeing each other and sharing the OCFS partition? I can't mount OCFS on the second machine since I don't have a device (partition) yet. My understanding is that I'm not supposed to create yet another OCFS partition on the second machine and the second machine will be using the OCFS partition that I've created on my first machine. Is that correct? Thanks! Ates -------------- next part -------------- An HTML attachment was scrubbed... URL: http://oss.oracle.com/pipermail/ocfs-users/attachments/20061020/a4262d83/attachment.html
Sorry - this must be obvious, but i haven't been able to find the answer in the guides i've searched. The examples seem to assume you always want to look at all the data. I want to be able to filter data in a dataframe before analyzing it. For example, I'd like to plot(a,b) but only include values where b > 1000. I'd also like to be able to do similar filtering before doing other statistical functions. Thanks for your help.