How to load plugins which aren''t in the folder vendor/plugins (in my case in another rails project) regards --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
i did it in that way, adding this to environment.rb : plug_dir = Dir.new("#{RAILS_ROOT}/../other_rails_dir/vendor/plugins") plug_dir.entries.each do |plug| %w(. ..).include?(plug) && next path = File.join(plug_dir.path, plug) if(File.directory?(path)) $: << File.join(path, ''lib'') require File.join(path, ''init'') end end someone has a simplier solution? On Jun 20, 3:41 pm, jney <jeansebastien....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How to load plugins which aren''t in the folder vendor/plugins (in my > case in another rails project) > > regards--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
not sure about plugins.. but gems can be accessed using following: ENV[''GEM_HOME'']=''/usr/lib/ruby/gems/1.8'' ENV[''GEM_PATH'']=''/home/ckh/gems'' in dispatch.fcgi ENV[''GEM_HOME''] is default gem path and second option is for custom one.. you can try same for plugins.. but not 100% sure Ajit On Jun 20, 10:21 am, jney <jeansebastien....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> i did it in that way, adding this to environment.rb : > > plug_dir = Dir.new("#{RAILS_ROOT}/../other_rails_dir/vendor/plugins") > plug_dir.entries.each do |plug| > %w(. ..).include?(plug) && next > path = File.join(plug_dir.path, plug) > if(File.directory?(path)) > $: << File.join(path, ''lib'') > require File.join(path, ''init'') > end > end > > someone has a simplier solution? > > On Jun 20, 3:41 pm, jney <jeansebastien....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > How to load plugins which aren''t in the folder vendor/plugins (in my > > case in another rails project) > > > regards--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jean-sébastien Jney wrote:> How to load plugins which aren''t in the folder vendor/plugins (in my > case in another rails project) > > regardstry environment.rb Rails::Initializer.run do |config| config.plugin_paths += ["#{RAILS_ROOT}/other/path/to/plugins"] end see freddy cheung''s blog post about it http://www.texperts.com/2007/06/21/on-sharing-code-between-rails-apps/ -- 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-/JYPxA39Uh5TLH3MbocFFw@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 Jun 20, 9:51 pm, Matthew Rudy Jacobs <rails-mailing-l...@andreas- s.net> wrote:> > see freddy cheung''s blog post about it > > http://www.texperts.com/2007/06/21/on-sharing-code-between-rails-apps/damn you matthew, pimping my own blog posts before I get round to it ! :-) Fred> -- > 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---