Is there any means for having an external library loaded before ActiveSupport is loaded when starting up a Rails app? -- 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.
What does you mean? You can create class in lib folder. For example: my_class.rb -> class MyClass ; end Rails will load your library. On 1 апр, 06:57, trans <transf...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is there any means for having an external library loaded before > ActiveSupport is loaded when starting up a Rails app?-- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Apr 1, 3:55 am, oivoodoo <alex.kor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What does you mean? > > You can create class in lib folder. For example: my_class.rb -> class > MyClass ; end > > Rails will load your library.You have to load those manually. So that doesn''t help. We can put scripts in config/initializers, however these are loaded into the system AFTER ActiveSupport has been loaded. I need a way to load a library BEFORE ActiveSupport. The reason is to load other libraries that may also have core extensions, but to let ActiveSupport''s take precedence in case of conflicts. -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Apr 1, 8:38 am, trans <transf...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> We can put scripts in config/initializers, however these are loaded > into the system AFTER ActiveSupport has been loaded. I need a way to > load a library BEFORE ActiveSupport. > > The reason is to load other libraries that may also have core > extensions, but to let ActiveSupport''s take precedence in case of > conflicts.Hey, I think I figured it out. Snooping around config/boot.rb I discovered a (little known?) feature. You can create a config/ preinitializer.rb file and that will be loaded first off. Nice. -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.