Hello all, You can easily reproduce with Rails 2.0.2 gems: $ irb >> require ''rubygems'' >> require ''active_support'' >> require ''action_pack'' >> require ''action_view'' *BOOM* You should get an error: MissingSourceFile: no such file to load -- html/document This is because html/document.rb is in lib/action_controller/vendor/html-scanner, and that directory is added to load paths only when action_controller is loaded. Without action_controller being loaded first, action_view doesn''t know how to find "html/document". On a related note: both ActionController and ActionView depend on ActiveSupport, but only action_controller requires active_support, and action_view doesn''t. I would gladly patch all this, but first I wanted to hear others'' opinions. Maybe it''s time to rethink ActionPack loading? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
I wonder why html-scanner is not in ActiveSupport along with builder memcached xml-simple. That *should* take care of these loading issues, right ? On Tue, Mar 4, 2008 at 12:56 AM, Mislav Marohnić <mislav.marohnic@gmail.com> wrote:> Hello all, > > You can easily reproduce with Rails 2.0.2 gems: > > $ irb > >> require 'rubygems' > >> require 'active_support' > >> require 'action_pack' > >> require 'action_view' > *BOOM* > > You should get an error: > > MissingSourceFile: no such file to load -- html/document > > This is because html/document.rb is in > lib/action_controller/vendor/html-scanner, and that directory is added to > load paths only when action_controller is loaded. Without action_controller > being loaded first, action_view doesn't know how to find "html/document". > > On a related note: both ActionController and ActionView depend on > ActiveSupport, but only action_controller requires active_support, and > action_view doesn't. > > I would gladly patch all this, but first I wanted to hear others' opinions. > Maybe it's time to rethink ActionPack loading? > > > >-- Cheers! - Pratik http://m.onkey.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Mislav Marohnić
2008-Mar-04 02:25 UTC
Re: ActionView 2.0.2 broken without ActionController
2008/3/4 Pratik <pratiknaik@gmail.com>:> I wonder why html-scanner is not in ActiveSupport along with builder > memcached xml-simple. That *should* take care of these loading issues, > right ?ActionPack vendor stuff (presently only html-scanner) could be moved to ActiveSupport, yeah. Then active_support.rb could add that directory to load paths. Then, add require ''active_support'' in action_view.rb and problem solved. What do others think? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2008-Mar-04 03:08 UTC
Re: ActionView 2.0.2 broken without ActionController
> I wonder why html-scanner is not in ActiveSupport along with builder > memcached xml-simple. That *should* take care of these loading issues, > right ?Seems ok to me, what are the downsides? -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
> > I wonder why html-scanner is not in ActiveSupport along with builder > > memcached xml-simple. That *should* take care of these loading issues, > > right ? > > Seems ok to me, what are the downsides?That Active Support should be a place for things used widely by multiple consumers. Not saying that html-scanner couldn''t be that, but it would seem that we''d need stronger reasons than loading errors. We can just ensure in both Action Controller and Action View both attempt to load the html-scanner if they need it. That would seem a more prudent way to solve this particular issue. -- David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---