Hi, had my local linux box setup and ferret was working like a champ via Webrick. However, when I moved to a different linux box using Apache web server, search no worky..giving the error listed below. The site itself comes up fine. I''ve tried deleting all the dirs under /index and restarted the webserver to see if re-indexing would help, but that made matters worse. Re-indexing didn''t work ie didn''t produce any of the normal subdirs under /index like it usually does. Is there some additional step that i need to do to Apache to get this working. Thanks Pat>>>>>>>>>>>> ERROR <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<uninitialized constant LockError RAILS_ROOT: /home/mysite/www/public/../config/.. Application Trace | Framework Trace | Full Trace /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in `const_missing'' /usr/lib/ruby/gems/1.8/gems/ferret-0.10.13/lib/ferret/index.rb:674:in `ensure_reader_open'' /usr/lib/ruby/gems/1.8/gems/ferret-0.10.13/lib/ferret/index.rb:383:in `[]'' /usr/lib/ruby/1.8/monitor.rb:229:in `synchronize'' /usr/lib/ruby/gems/1.8/gems/ferret-0.10.13/lib/ferret/index.rb:382:in `[]'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:386:in `find_id_by_contents'' /usr/lib/ruby/gems/1.8/gems/ferret-0.10.13/lib/ferret/index.rb:371:in `search_each'' /usr/lib/ruby/gems/1.8/gems/ferret-0.10.13/lib/ferret/index.rb:370:in `search_each'' /usr/lib/ruby/1.8/monitor.rb:229:in `synchronize'' /usr/lib/ruby/gems/1.8/gems/ferret-0.10.13/lib/ferret/index.rb:366:in `search_each'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:384:in `find_id_by_contents'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:248:in `find_by_contents'' #{RAILS_ROOT}/app/models/event.rb:6:in `full_text_search'' #{RAILS_ROOT}/app/controllers/page_controller.rb:140:in `search'' This error occured while loading the following files: ferret/index/lock_error.rb -- Posted via http://www.ruby-forum.com/.
Pat Fitzpatrick wrote:> had my local linux box setup and ferret was working like a champ via > Webrick. > However, when I moved to a different linux box using Apache web server, > search no worky..giving the error listed below. The site itself comes up > fine. > I''ve tried deleting all the dirs under /index and restarted the > webserver to see if re-indexing would help, but that made matters worse. > Re-indexing didn''t work ie didn''t produce any of the normal subdirs > under /index like it usually does.It looks like you have a rails app. Does the user running rails have write permissions on the index directory? Make sure the index directory and subdirectories is owned by that user, or at least that that user has write permission (as well as read and execute). Ferrent is attempting to write a lock file in your index directory before it searches, and the write fails. The write fails in the c code under ensure_reader_open at lib/ferret/index.rb:673 (latest=@reader.latest?). The c code raises a LOCK_ERROR exception, but the exception is not caught because it is undefined in this scope (lib/ferret/index.rb:674). ActiveSupport attempts to load a non-existent file lock_error.rb to resolve this missing constant, but it fails You will get similar errors if you attempt to save a record. -- Posted via http://www.ruby-forum.com/.
Ray wrote:> Pat Fitzpatrick wrote: > >> had my local linux box setup and ferret was working like a champ via >> Webrick. >> However, when I moved to a different linux box using Apache web server, >> search no worky..giving the error listed below. The site itself comes up >> fine. >> I''ve tried deleting all the dirs under /index and restarted the >> webserver to see if re-indexing would help, but that made matters worse. >> Re-indexing didn''t work ie didn''t produce any of the normal subdirs >> under /index like it usually does. > > > It looks like you have a rails app. Does the user running rails have > write permissions on the index directory? Make sure the index directory > and subdirectories is owned by that user, or at least that that user has > write permission (as well as read and execute). > > Ferrent is attempting to write a lock file in your index directory > before it searches, and the write fails. The write fails in the c code > under ensure_reader_open at lib/ferret/index.rb:673 > (latest=@reader.latest?). The c code raises a LOCK_ERROR exception, but > the exception is not caught because it is undefined in this scope > (lib/ferret/index.rb:674). ActiveSupport attempts to load a non-existent > file lock_error.rb to resolve this missing constant, but it fails > > You will get similar errors if you attempt to save a record.thx for the reply/interesting points Ray. Got it working by reinstalling mongrel and following documentation at: http://mongrel.rubyforge.org/docs/apache.html Also went through the deployment section in the 2nd edition Agile Web Development with Rails'' by D Thomas. Well worth the buy and read. thx again. Probably helped by stepping away from the issue for a while and taking off the blinkers. -- Posted via http://www.ruby-forum.com/.