Hi Everyone, I am trying to get xapian and acts_as_xapian installed in my app. I can get it just fine locally, but not on my dreamhost server. I have been following instructions here: http://blog.kevin.colyar.net/2008/08/installing-xapian-on-dreamhost-for-the-rails-acts_as_xapian-plugin/ Everything compiles fine and I think all the required files get installed as there are no errors during the make and make install. When I try to rebuild the index, is is squaking about not finding the _xapian.so file, but it is there! [ps6736]$ ls /home/mconeybeare/opt/my_ruby_modules/_xapian.so /home/mconeybeare/opt/my_ruby_modules/_xapian.so I have tried changing permission on that file: [ps6736]$ ls -la /home/mconeybeare/opt/my_ruby_modules/_xapian.so -rwxr-xr-x 1 mconeybeare pg1243896 1753384 Jan 17 01:37 /home/ mconeybeare/opt/my_ruby_modules/_xapian.so I made sure that the path (/home/mconeybeare/opt/my_ruby_modules/) is included in my [ps6736]$ echo $LD_LIBRARY_PATH /home/mconeybeare/.packages/lib:/home/mconeybeare/run/lib:/home/ mconeybeare/opt/lib:/home/mconeybeare/opt/my_ruby_modules: and have reran the tutorial many many times. I have looked around for other tutorials and they are all the same. Can somebody help me? Here is the exact error message: -------------------------------- [ps6736]$ rake xapian:rebuild_index models="Sound" RAILS_ENV=production --trace (in /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227) acts_as_xapian: No Ruby bindings for Xapian installed ** Invoke xapian:rebuild_index (first_time) ** Invoke environment (first_time) ** Execute environment acts_as_xapian: No Ruby bindings for Xapian installed ** Execute xapian:rebuild_index rake aborted! /home/mconeybeare/opt/my_ruby_modules/_xapian.so: cannot open shared object file: No such file or directory - /home/mconeybeare/opt/ my_ruby_modules/_xapian.so /home/mconeybeare/opt/my_ruby_modules/_xapian.so /home/mconeybeare/.packages/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/rails/activesupport/lib/active_support/ dependencies.rb:148:in `require' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/rails/activesupport/lib/active_support/ dependencies.rb:507:in `new_constants_in' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/rails/activesupport/lib/active_support/ dependencies.rb:148:in `require' /home/mconeybeare/opt/my_ruby_modules/xapian.rb:40 /home/mconeybeare/.packages/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `gem_original_require' /home/mconeybeare/.packages/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/rails/activesupport/lib/active_support/ dependencies.rb:148:in `require' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/rails/activesupport/lib/active_support/ dependencies.rb:507:in `new_constants_in' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/rails/activesupport/lib/active_support/ dependencies.rb:148:in `require' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/rails/activesupport/lib/active_support/ dependencies.rb:254:in `require_or_load' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/rails/activesupport/lib/active_support/ dependencies.rb:413:in `load_missing_constant' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/rails/activesupport/lib/active_support/ dependencies.rb:77:in `const_missing' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/rails/activesupport/lib/active_support/ dependencies.rb:89:in `const_missing' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/rails/activesupport/lib/active_support/ dependencies.rb:425:in `load_missing_constant' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/rails/activesupport/lib/active_support/ dependencies.rb:77:in `const_missing' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb: 105:in `prepare_environment' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb: 535:in `rebuild_index' /home/mconeybeare/ambiance.coneybeare.net/apps/ambiance/releases/ 20090117082227/vendor/plugins/acts_as_xapian/tasks/xapian.rake:25 /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:617:in `call' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:617:in `execute' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:612:in `each' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:612:in `execute' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain' /home/mconeybeare/.packages/lib/ruby/1.8/monitor.rb:242:in `synchronize' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:564:in `invoke' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:1997:in `each' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:1970:in `run' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling' /home/mconeybeare/.gems/gems/rake-0.8.3/lib/rake.rb:1967:in `run' /home/mconeybeare/.gems/gems/rake-0.8.3/bin/rake:31 /home/mconeybeare/.gems/bin/rake:19:in `load' /home/mconeybeare/.gems/bin/rake:19 Thanks, Matt
I should probably warn that I'm no Ruby expert, and know nothing about Rails at all. On Sat, Jan 17, 2009 at 01:51:13AM -0800, Matt Coneybeare wrote:> I am trying to get xapian and acts_as_xapian installed in my app. I > can get it just fine locally, but not on my dreamhost server. I have > been following instructions here: http://blog.kevin.colyar.net/2008/08/installing-xapian-on-dreamhost-for-the-rails-acts_as_xapian-plugin/ > Everything compiles fine and I think all the required files get > installed as there are no errors during the make and make install.Did you do step 5? That looks like how Ruby gets told where to find the xapian bindings (I don't see LD_LIBRARY PATH mentioned at all).> I made sure that the path (/home/mconeybeare/opt/my_ruby_modules/) is > included in my > [ps6736]$ echo $LD_LIBRARY_PATH > /home/mconeybeare/.packages/lib:/home/mconeybeare/run/lib:/home/ > mconeybeare/opt/lib:/home/mconeybeare/opt/my_ruby_modules:The installation instructions for xapian-bindings say: And then you'll need to tell Ruby to look for modules in this directory: ruby -I$HOME/my_ruby_modules myscript.rb http://trac.xapian.org/browser/trunk/xapian-bindings/INSTALL If that works, I guess LD_LIBRARY_PATH isn't set correctly, or isn't being used (is your ruby binary setuid perhaps?) You could use strace (or similar, depending on OS) to find out what files dlopen() tries to open. If that doesn't find the issue, perhaps try asking the blog's author, or if that doesn't help the acts_as_xapian mailing list might be a better place to ask - I'd guess there's more Ruby expertise there: http://groups.google.com/group/acts_as_xapian Cheers, Olly