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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
I''d really love some help on this - even if speculative... On Sat, 2006-09-23 at 09:30 -0700, Craig White wrote:> 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On 9/23/06, Craig White <craigwhite-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote:> > 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 jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Craig White
2006-Sep-26 11:19 UTC
Re: ****[Rails] Re: Problems with routes in production mode
On Sun, 2006-09-24 at 12:27 -0700, Jeremy Kemper wrote:> > > On 9/23/06, Craig White <craigwhite-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote: > 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---- yup - thanks Craig --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---