Monday, November 19, 2007

Step by step subversion (svn), Ferret and acts_as_ferret installation on Windows

Subversion installation

  1. Go to Subversion project page. This page lists the subversion packages for various platforms. Scroll down to the Windows area.
  2. Select the Apache server version. I select 'Win32 packages built against Apache 2.2'. If you are not sure or do not find your version of Apache listed, selecting Apache 2.2 may still do.
  3. This will take you to the list of downloads. Scroll right to the end and save
    svn-win32-1.4.5.zip. This is Subversion 1.4.5 Win32 binaries for Apache 2.2.x. You can select whichever version suits your needs. This is the one I selected.
  4. On your PC, unzip this folder. This will create a folder structure like so (if you unzip it in C:\Softwares): C:\Softwares\svn-win32-1.4.5\svn-win32-1.4.5
  5. Append the path of the Subversion bin directory (where svn, subversion, svnlook etc. reside), C:\Softwares\svn-win32-1.4.5\svn-win32-1.4.5\bin to your Control Panel -> System -> Advanced System Settings -> Advanced -> Environement Variables -> System Variables -> PATH.
  6. Now open a brand new command prompt and type svn. If it does not throw an unknown program error, hurray! You've installed Subversion successfully.
Ferret installation
  1. For downloading the latest stable version of Ferret gem go to Ruby Forge Ferret page. From here, select ferret-0.11.5-mswin32.gem or whichever win32 version shows topmost.
  2. Suppose you downloaded the gem file to your C:\Softwares directory. You can install ferret by keying in gem install ferret.
    C:\Softwares>gem install ferret
    Successfully installed ferret, version 0.11.5
    Installing ri documentation for ferret-0.11.5-mswin32...
    Installing RDoc documentation for ferret-0.11.5-mswin32...
    C:\Softwares
  3. That's it. You're done
acts_as_ferret installation
  1. To install it in your Rails application say, test_app, change directory to your app. Then key in the following on the command prompt to install the latest stable version of acts_as_ferret.
    C:\InstantRails\rails_apps\test_app> ruby script/plugin install svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret
  2. If this command ends up throwing error or just returns without any status information, check the URL and check whether svn is indeed included in your PATH.
  3. If everything goes OK, this installation will spit out lots of information about the installation as it goes.
  4. RESTART the development web server (mongrel/webrick) to be able to use acts_as_ferret in your application.
  5. Congrats! You can now go ahead and use acts_as_ferret in your application. If the view code gives the error 'Unknown class acts_as_ferret in class ...', you probably forgot to restart the development web server.
acts_as_ferret resources
  1. Acts_as_ferret Wiki
  2. Using the acts_as_ferret DRb server (Here is the answer to: what the $@#* is a DRb server?)
  3. A splendid acts_as_ferret tutorial

0 comments: