Missing gems in LightTPD
Gem issues after upgrading to Ruby on Rails 2.
After upgrading Ruby to 1.8.6 and Rails to 2.0.2 I ran into problems with my installed gems. The application no longer detected any of the installed gems. The gem list command and the ./script/console environment found the gems without issues, but ‘requiring’ a gem in one a controller failed.
It took me too long to debug the problem. My GEM_PATH variable—this is where RubyGems looks—was set. I could find the gem from everywhere, except from the controllers in my application. All worked fine when I ran the WEBrick server, but my LightTPD production environment was fubar.
Turned out I forgot to tell LightTPD to use the new GEM_PATH, other than the default one. This is set in the LightTPD configuration file. Maybe I changed the gem installation directory as I built RubyGems from source? Add the following to your LightTPD configuration file (change the paths where needed) and reload the server.
Finally, my blog is now happily running the latest Ruby on Rails.