I''m developing a library called Hark. The structure is: lib/ hark/ session.rb mixins.rb hark.rb hark.rb: === module Hark include Hark::Mixins ... end application.rb: === class ApplicationController < ActionController::Base include Hark end my_controller.rb: === def login hs = session[:hark_session] = Hark::Session.new ... end So application.rb brings in Hark, which in turn brings in Hark::Mixins. Separately, the controller brings in Hark::Session. I''ve turned on dependency logging, and hark/session.rb does get loaded through the dependency mechanism. hark/mixins.rb, however, does not - whatever''s magically bringing it in, it ain''t Dependencies. I''ve tried explicitly doing a require_dependency on both Hark and Hark::Mixins, and neither one is helping. How can I get these to be brought in via Dependencies so they can be auto-reloaded when they change? I''m using rspec with its rails_spec_runner, so it''s much faster to test when I don''t have to reload the rails environment with each change. Jay Levitt --~--~---------~--~----~------------~-------~--~----~ 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/6/06, Jay Levitt <jay-WxwZQdyI2t0@public.gmane.org> wrote:> > I''m developing a library called Hark. The structure is: > > lib/ > hark/ > session.rb > mixins.rb > hark.rb > > hark.rb: > ===> > module Hark > include Hark::Mixins > ... > end > > application.rb: > ===> > class ApplicationController < ActionController::Base > include Hark > end > > my_controller.rb: > ===> def login > hs = session[:hark_session] = Hark::Session.new > ... > end > > So application.rb brings in Hark, which in turn brings in Hark::Mixins. > Separately, the controller brings in Hark::Session. > > I''ve turned on dependency logging, and hark/session.rb does get loaded > through the dependency mechanism. hark/mixins.rb, however, does not - > whatever''s magically bringing it in, it ain''t Dependencies. > > I''ve tried explicitly doing a require_dependency on both Hark and > Hark::Mixins, and neither one is helping. How can I get these to be > brought in via Dependencies so they can be auto-reloaded when they change? > I''m using rspec with its rails_spec_runner, so it''s much faster to test > when I don''t have to reload the rails environment with each change. > > Jay LevittWhat version of Rails are you on? The app works as shown above, the issue is that it just doesn''t reload, correct? - rob -- http://www.robsanheim.com http://www.seekingalpha.com http://www.ajaxian.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On Wed, 6 Sep 2006 22:01:17 -0500, Rob Sanheim wrote:> What version of Rails are you on? The app works as shown above, the > issue is that it just doesn''t reload, correct?Right. This is on Edge rails, which has a new dependencies library that (I thought) is supposed to reload anything that''s magically included. The problem, I suspect, is that my includes aren''t being magically included... but I don''t know why that is. Jay --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---