I figured it out. The apache server doesnt start ruby using bash, so
GEM_HOME and GEM_PATH were not set. These env vars are used by Ruby
to find the gems. I figured out by reading the boot.rb code that I
can create a file config/preinitializer.rb and set the env vars using
Ruby language constructs. This file is included (and executed) early
in the boot process. Now the system runs and finds the gems in the
local repository.