Jonathan Rochkind
2012-Dec-05 20:47 UTC
ActiveSupport Dependencies load eats MultiJson.load?
I can''t quite figure out what''s going on here, it seems like if this were actually a problem someone else would have run into it and I''d have better luck googling for it, since MultiJson is so popular but.... Rails 3.2.9. Is ActiveSupport::Dependencies doing something weird with a #load method defined on all objects, such that it conflicts with other objects #load method? MultiJson wants you to use MultiJson.load to parse JSON. But when I try.... somehow some activesupport load is eating it instead. I get an error "Could not load file [big json string]", and this odd stacktrace: activesupport-3.2.9/lib/active_support/dependencies.rb:245:in `load'' activesupport-3.2.9/lib/active_support/dependencies.rb:245:in `block in load''", active_support/dependencies.rb:236:in `load_dependency''", activesupport-3.2.9/lib/active_support/dependencies.rb:245:in `load''", line to my app code that''s actually calling MultiJson.load, but then the next line up is an active_support load instead, what now? Anyone have any idea how I would debug this further, or what might be going on? Any known problems with ActiveSupport adding a ''load'' which kills other gems loads? -- 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 To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/l1vTMPFtOB4J. For more options, visit https://groups.google.com/groups/opt_out.
Jonathan Rochkind
2012-Dec-05 21:08 UTC
Re: ActiveSupport Dependencies load eats MultiJson.load?
Nevermind! Indeed, nobody else reported the problem because there is no problem. Due to weirdnesses of my Gemfile.lock, I was using a really old version of multi_json without realizing it, one that lacked the #lock method. (Had an old version of Capybara in my gemfile.lock, which locked multi_json dependency to an old version of multi_json, which kept multi_json from ever updating, bah). On Wednesday, December 5, 2012 3:47:19 PM UTC-5, Jonathan Rochkind wrote:> > I can''t quite figure out what''s going on here, it seems like if this were > actually a problem someone else would have run into it and I''d have better > luck googling for it, since MultiJson is so popular but.... > > Rails 3.2.9. Is ActiveSupport::Dependencies doing something weird with a > #load method defined on all objects, such that it conflicts with other > objects #load method? > > MultiJson wants you to use MultiJson.load to parse JSON. > > But when I try.... somehow some activesupport load is eating it instead. I > get an error "Could not load file [big json string]", and this odd > stacktrace: > > activesupport-3.2.9/lib/active_support/dependencies.rb:245:in `load'' > activesupport-3.2.9/lib/active_support/dependencies.rb:245:in `block in > load''", > active_support/dependencies.rb:236:in `load_dependency''", > activesupport-3.2.9/lib/active_support/dependencies.rb:245:in `load''", > > line to my app code that''s actually calling MultiJson.load, but then the > next line up is an active_support load instead, what now? > > Anyone have any idea how I would debug this further, or what might be > going on? Any known problems with ActiveSupport adding a ''load'' which > kills other gems loads? >-- 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 To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/SXvDyL73BW4J. For more options, visit https://groups.google.com/groups/opt_out.