Installing Lovd By Less on Windows (XP & Vista)
July 22, 2008
UPDATE: Lovd By Less is now using Sphinx instead of ferret, so we can no longer provide help on the instructions found here. We’ll leave this post up for use as a guide, but make sure you ingore the part on installing Ferret in this post and refer to the Lovd readme for the proper instructions on installing Sphinx.
On doing a recent test-run of the wonderful Lovd By Less I ran into a few system dependent problems. Yes, I’m running this on Windows. (Boo, hiss). I know, I know, let’s move on.
I downloaded a fresh batch of Lovd, and slapped it into a brand-spanking new rails app. The most important thing here is to follow the readme provided by Lovd… which works great if you’re on a Mac. I found they leave a few things out for us poor saps on Windows.
First. Update Ruby Gems.
Surprisingly harder than it sounds. You need to be running RubyGems1.2.0. To upgrade from RubyGems1.1.1 open a command prompt to your root directory and type the following:
> gem install rubygems-update -v 1.1.1
> gem update --system
Second. Install ImageMagick & RMagick.
Go here and get the rmagick-win32 bundle (near the bottom). This .zip file contains the proper version of ImageMagick; it has to be ImageMagick version 6.4.1, no other version will work.
Now extract the .zip and install ImageMagic from the pre-compiled install file (.exe). Next, you’ll notice the .zip came packed with a file called ‘rmagick-2.5.2.gem’. Put this file in c:\ruby\rubygems, and cd to that directory with your command prompt and type:
> gem install RMagick --local
Third. Update a million gems.
To be completely thorough, go through and do a ‘gem install’ for each of the following gems:
will_paginate
colored
youtube-g
uuidtools
acts_as_ferret
ferret
hpricot
mocha
redgreen
avatar
win32console
RedCloth
tzinfo
flickr
mime-types
You might notice that ‘gem install ferret’ doesn’t seem to work.
Fourth. Go Get Ferret. this step has been deprecated with the latest release of Lovd By Less
You’re going to have to go to the source and get the latest .gem for ferret. Download it and put it in c:\ruby\rubygems, go to that directory in your command prompt and type:
> gem install ferret-0.11.6-mswin32.gem
Now you might be tempted to take your new social network out for a spin, a couple more steps before you do.
Fifth. Edit environment.rb
Yeah, I’m not 100% why this is, but it appears there are some errors in this file. Open config/environment.rb in your favorite text editor. Near the bottom you will see many required gems, change them so they read:
config.gem 'will_paginate', :version => '~> 2.2.2'
config.gem 'colored', :version=> '1.1'
config.gem 'youtube-g', :version=> '0.4.1', :lib=>'youtube_g'
config.gem 'uuidtools', :version=> '1.0.3'
config.gem 'acts_as_ferret', :version=> '0.4.3'
config.gem 'ferret', :version=> '0.11.4'
config.gem 'hpricot', :version=> "0.6"
config.gem 'mocha', :version=> "0.5.6"
config.gem 'redgreen', :version=> "1.2.2"
config.gem 'avatar', :version=> "0.0.5", :lib => 'avatar'
Sixth. Windows Environment.
This was the hardest part to figure out, but apparently in Windows, Ruby will try to run some of the gems before running RubyGems itself, resulting in an error. To help Windows out, open ‘control panel’ > ‘system’ and click on ‘advanced system settings’. Next click on the ‘Evnvironment Variables’ button and add a new User and System variable; Variable name: RUBYOPT, Variable value: -rubygems.
Now reboot your system.
Seventh. Rake and Run.
Open your command prompt, rake your database and run your server, open your browser to localhost:3000 and you should have your own version of Lovd before your eyes. Now wasn’t that easy? (gulp).
Disclaimer: some of you may have noticed that it seems some parts to this guide are left out; this is not a complete guide, but it should cover what’s been left out of the Lovd By Less readme file. I’m not pointing fingers at the Lovd team, these are just a few problems that cropped up for me that I thought I’d share.
elgangofeo says:
Thanks for this tips.