strapyourself.in and flouri.sh

RubyGems 0.91 and the "refresh" error

February 24th, 2007

All of us over at ELCTech recently upgraded to RubyGems 0.91, only to find the following error during "gem" operations:

$ sudo gem install acts_as_ferret
ERROR:  While executing gem ... (NoMethodError)
    undefined method `refresh' for #<Hash:0x127c854>

Apparently the format of the gem cache files have changed, the new version cannot read some older versions of the cache. To fix this problem, delete your source_cache files in the following locations:

sudo rm /usr/local/lib/ruby/gems/1.8/source_cache
rm ~/.gem/source_cache

Looks like someone forgot to think about us old folks with ancient versions of RubyGems. In the future, I'll plan on running "gem update --system" more often!

Originally posted on ELC

Installing RMagick properly in OSX

February 24th, 2007

I've seen the craziest problems with people installing the RMagick gem before. In this article, I will show you the procedure I use to fix any and all rmagick problems. First, I start by cleaning out any of the following packages:

sudo port uninstall imagemagick
sudo port uninstall graphicsmagick
sudo port uninstall ghostscript
sudo port uninstall freetype
sudo gem uninstall rmagick

Then, I reinstall them:

sudo port install freetype
sudo port install ghostscript
sudo port install imagemagick
sudo port install graphicsmagick
sudo gem install rmagick

This software cocktail has solved the following problems:

  • RMagick gem won't compile native extensions
  • RMagick can't find fonts - This is a really common problem, and we have seen a case where this approach will not solve this problem.
  • RMagick renders text incorrectly and/or unreadable in the validates_captcha plugin

ImageScience is an alternative to RMagick which requires fewer native libraries, but not zero unfortunately. It may or may not be easier for you to use, depending on what you need RMagick for (it won't do text rendering, for example).

Originally posted on ELC

Funskits

February 1st, 2007
Funskits is a video delivery site where my college friends and I posted our short videos. It was written in ASP.NET. Read the rest of this entry
original design by gorotron ported by railsgrunt powered by mephisto