'requires lib/customException.rb' seems to need full path????


My require ‘lib/commonException.rb’ line in application.rb works OK locally HOWEVER on my hosting provider I get a " no such file to load – lib/commonException.rb". I put the full path into the require statement and that seemed to fix it however I shouldn’t leave a hardwired path in there. So:

Question = When using a requires statement to require a custom *.rb file one has created and put in the application “/lib” area, should I only need to reference it like I have done via “lib/…”? If yes, any ideas why I get an error. If no, what would be the recommended approach to reference it?



I don’t ever put paths into requires (unless I want to get below the load path, or be very specific)

.lib is in your load path, so you shouldn’t need to require the path.



ok - so I must have a problem with my load path “/lib” not loading properly I guess…ummm