Installation:
back to the FAQ Index
How do I install ferret?
If you have RubyGems installed (and you should!), installing Ferret is simple and safe. You can easily remove it if you don't like it.
$ gem install ferret
If you do not have RubyGems installed or if you want to use the bleeding edge version of ferret, you can checkout the project via Subversion. See DownloadCurrent for more information on how to retrieve the most current version.
How do I uninstall ferret?
If you installed Ferret via RubyGems simply run
$ gem uninstall ferret
How can I use a different version of Ferret?
When you run "gem install" you will be given a list of versions and you can choose which you would like to install.
RubyGems did not compile the c-extension on my OS, but I want to use cFerret
Try your luck and compile the extension by yourself. To get cFerret, you'll need subversion;
svn co svn://www.davebalmain.com/cferret/trunk cferret
Then change directory into cferret and run make. Running make will just compile all of the object files and run the unit tests. If the tests don't all pass, please let me know at dbalmain@…. Then look at bench.c to see how to use it.
How can I use the "ruby only" version of ferret?
You must install the latest 0.9.* version of Ferret. Then require 'rferret' instead of 'ferret'. If you do not have the c-extension installed, requiring ferret will fallback to 'rferret' automatically.
# use the ruby only version of ferret require 'rferret'
If anyone is interested in continuing development of the pure Ruby version of Ferret then please contact me at dbalmain@…. I'd love to help.
How can I install the bleeding edge version of Ferret as a gem?
A lot of people need some of the fixes I make to Ferret ASAP and don't like having to wait to long for the gem. On the other hand, it is a bit of a pain to download and install from subversion because then you need to uninstall when the next gem comes out. So I thought I may as well put some instructions out as to how you can build your own Ferret gem that will get overridden by the next official version to come out. Here goes:
$ svn co svn://www.davebalmain.com/exp/ ferret
$ cd ferret/ruby/
Now optionally run the tests to make sure I haven't checked any dodgy changes in:
$ rake
build the gem. REL should be the current release and then append 0.1. If you do this a second time between release append 0.2 and so on. The current version is 0.10.5 so we'll build 0.10.5.1:
$ rake package REL=0.10.5.1
$ cd pkg
$ ls -l
drwxr-xr-x 5 dbalmain dbalmain 4096 2006-09-21 02:28 ferret-0.10.5.1
-rw-r--r-- 1 dbalmain dbalmain 415744 2006-09-21 02:28 ferret-0.10.5.1.gem
-rw-r--r-- 1 dbalmain dbalmain 233614 2006-09-21 02:28 ferret-0.10.5.1.tgz
-rw-r--r-- 1 dbalmain dbalmain 281737 2006-09-21 02:28 ferret-0.10.5.1.zip
$ sudo gem install ferret-0.10.5.1.gem
After running 'gem install ferret' successfully, I get the error message "uninitialized constant Ferret (NameError)". What am I doing wrong?
You need to include the Ferret libraries. Make sure you re requiring the rubygems and the ferret libraries.
require 'rubygems' require 'ferret'
If you are using rails, we suggest, you add the 'require ferret' line in config/environment.rb.
After running 'gem install ferret' successfully, I get the error message "require': no such file to load -- ferret". What am I doing wrong?
see above.
It is still not working, what else can I do?
If you installed via svn, did you run the setup.rb script after the installation? A 'ruby setup.rb all' should do it. If you've installed the RubyGem, this will be done automatically for you. If you are still experiencing problems, please open a ticket.
It is still not working, what else can I do?
Ask on the mailing list. Make sure you write down exactly what you tried to do and what error messages you get. Also include the version of Ferret, the version of Ruby and your operating system.
