Problems with routes in production mode

I can't seem to solve this issue on anything but a temporary basis

I have the following line in one of my models...

  require "lib/pewholename"

and corresponding file in RAILS_ROOT/lib/pewholename.rb

This works perfectly in development mode.

In production environment, that will give me an error...

/usr/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- lib/pewholename.rb

In 'script/console production' the same ' require "lib/pewholename" '
works fine (answers true)

To work this week, I changed the require statement to

  require "../lib/pewholename"

which has gotten me through the week

Can anyone suggest what I need to look at to fix this issue?

Craig

I'd really love some help on this - even if speculative...

require ‘lib/pewholename’ relies on ‘.’ being in your $LOAD_PATH and having started the app (or script/console) from RAILS_ROOT.

require ‘…/lib/pewholename’ relies on ‘.’ being in your $LOAD_PATH and lighttpd having done a chdir to RAILS_ROOT/public

Simply require ‘pewholename’ since lib is already in your $LOAD_PATH

jeremy

        I can't seem to solve this issue on anything but a temporary
        basis
        
        I have the following line in one of my models...
        
          require "lib/pewholename"
        
        and corresponding file in RAILS_ROOT/lib/pewholename.rb
        
        This works perfectly in development mode.
        
        In production environment, that will give me an error...
        
        /usr/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
        `gem_original_require': no such file to load --
        lib/pewholename.rb
        
        In 'script/console production' the same ' require
        "lib/pewholename" '
        works fine (answers true)
        
        To work this week, I changed the require statement to
        
          require "../lib/pewholename"
        
        which has gotten me through the week
        
        Can anyone suggest what I need to look at to fix this issue?

require 'lib/pewholename' relies on '.' being in your $LOAD_PATH and
having started the app (or script/console) from RAILS_ROOT.

require '../lib/pewholename' relies on '.' being in your $LOAD_PATH
and lighttpd having done a chdir to RAILS_ROOT/public

Simply require 'pewholename' since lib is already in your $LOAD_PATH