Student
2007-Oct-17 16:03 UTC
Development environment bug? (config.load_paths doesn''t take)
This works for me in production but not development. Problem: I have a need to group models into subdirectories which in no way map to models. Suggested solution (as per article): Add the following code to the Rails::Initializer.run block in environment.rb: config.frameworks -= [ :action_web_service ] config.load_paths += %W[ #{RAILS_ROOT}/app/models/helpers #{RAILS_ROOT}/app/models/autogenerated #{RAILS_ROOT}/app/models/database ] New Problem: In development mode, these new directories are not picked up. I''ve tried to trace the flow, but no love. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
comopasta Gr
2010-Jan-04 11:04 UTC
Re: Development environment bug? (config.load_paths doesn''t take)
> In development mode, these new directories are not picked up.Hi, anyone has an answer for this one? I just tried to add some new path same way and it doesn''t seem to pick it. Running in development mode yet. Thanks. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Matt Jones
2010-Jan-06 04:37 UTC
Re: Development environment bug? (config.load_paths doesn''t take)
On Jan 4, 6:04 am, comopasta Gr <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> > In development mode, these new directories are not picked up. > > Hi, anyone has an answer for this one? > I just tried to add some new path same way and it doesn''t seem to pick > it. Running in development mode yet. >You''ve posted a quote from *someplace*, likely this list, but without any way to reference the original post. Can you give more details? --Matt Jones -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Conrad Taylor
2010-Jan-06 08:38 UTC
Re: Re: Development environment bug? (config.load_paths doesn''t take)
On Tue, Jan 5, 2010 at 8:37 PM, Matt Jones <al2o3cr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Jan 4, 6:04 am, comopasta Gr <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > > In development mode, these new directories are not picked up. > > > > Hi, anyone has an answer for this one? > > I just tried to add some new path same way and it doesn''t seem to pick > > it. Running in development mode yet. > > > > You''ve posted a quote from *someplace*, likely this list, but without > any way to reference the original post. Can you give more details? > > --Matt Jones >Yes, I agree with Matt that''s it''s hard to following the discussion without knowing the original issue. -Conrad> > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
comopasta Gr
2010-Jan-06 10:30 UTC
Re: Development environment bug? (config.load_paths doesn''t take)
:-D :-D I can''t deny you are right guys. The quote is taken about 100 pixels above my text. It is part of the original question of the post (almost the last line in it). I don''t really like quoting whole texts because it duplicates all the stuff... If for some reason you can''t see the original question I paste it here again. --------------------------------------- Posted by Student (Guest) on 17.10.2007 18:04 This works for me in production but not development. Problem: I have a need to group models into subdirectories which in no way map to models. Suggested solution (as per article): Add the following code to the Rails::Initializer.run block in environment.rb: config.frameworks -= [ :action_web_service ] config.load_paths += %W[ #{RAILS_ROOT}/app/models/helpers #{RAILS_ROOT}/app/models/autogenerated #{RAILS_ROOT}/app/models/database ] New Problem: In development mode, these new directories are not picked up. I''ve tried to trace the flow, but no love. --------------------------------------- Cheers. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
daphonz
2010-Jan-06 15:09 UTC
Re: Development environment bug? (config.load_paths doesn''t take)
I''m not sure about your specific problem, but you could try replacing your code with the following: config.load_paths += Dir["#{RAILS_ROOT}/app/models/**/**"] That loads all files in all subdirs in your models directory. It works for me in all environments (in Rails 2.3, at least, haven''t tried it on earlier versions). Casey On Jan 6, 5:30 am, comopasta Gr <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> :-D :-D > > I can''t deny you are right guys. > The quote is taken about 100 pixels above my text. It is part of the > original question of the post (almost the last line in it). I don''t > really like quoting whole texts because it duplicates all the stuff... > > If for some reason you can''t see the original question I paste it here > again. > > --------------------------------------- > > Posted by Student (Guest) on 17.10.2007 18:04 > This works for me in production but not development. > > Problem: > I have a need to group models into subdirectories which in no way map > to models. > > Suggested solution (as per article): > Add the following code to the Rails::Initializer.run block in > environment.rb: > > config.frameworks -= [ :action_web_service ] > > config.load_paths += %W[ > #{RAILS_ROOT}/app/models/helpers > #{RAILS_ROOT}/app/models/autogenerated > #{RAILS_ROOT}/app/models/database > ] > > New Problem: > In development mode, these new directories are not picked up. > > I''ve tried to trace the flow, but no love. > > --------------------------------------- > > Cheers. > > -- > Posted viahttp://www.ruby-forum.com/.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2010-Jan-06 15:23 UTC
Re: Development environment bug? (config.load_paths doesn''t take)
On Jan 6, 10:30 am, comopasta Gr <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> :-D :-D > > I can''t deny you are right guys. > The quote is taken about 100 pixels above my text. It is part of the > original question of the post (almost the last line in it). I don''t > really like quoting whole texts because it duplicates all the stuff... > > If for some reason you can''t see the original question I paste it here > again.Just to be sure, have you restarted your app after changing environment.rb ? Fred -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.