This project is archived and is in readonly mode.
ActiveSupport gem should depend on builder (and i18n?)
-
Rishav Rastogi
- Assigned user changed from Pratik to Ryan Bigg
I think this is taken care of in rails 3. i18n is a separate gem as well now.
Builder and i18n are installed as dependencies for rails 3 now.
-
Ryan Bigg
Is this also taken care of on the 2.3.x branch? I think there's going to be one more 2.3.x release along with 3.0. But I am purely speculating here.
-
Rishav Rastogi
until rails 3, all these dependencies were vendored into the activesupport gem.
Found at /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.x/lib/active_support/vendor
I have also checked in 2.3.x.
-
Ryan Bigg
- Tag changed from active_support core_ext, activesupport, active_support, builder, dependencies, dependency, dependent, gem, gems, i18n to activesupport
- State changed from new to invalid
Right. Marking as invalid.
-
ravinggenius
- Importance changed from to
Please reopen this ticket. I have a Sinatra app that requires Pony (for sending mail). Pony depends on Mail. Mail depends on ActiveSupport. ActiveSupport depends on i18n, but does not declare that fact. Thus, unless I add i18n to my Gemfile, nothing works.
-
Ryan Bigg
- State changed from invalid to incomplete
Please submit a patch to this ticket to fix this problem.
-
David Haslem
Experiencing the same issue - mail depends on activesupport, which doesn't require i18n as it should. Here's a patch moving the i18n dependency from ActiveModel and ActionPack to ActiveSupport, so the dependency can be managed in one place.
-
Gabe da Silveira
- Tag changed from activesupport, patch to activesupport
This should be marked invalid. I had this same problem, but it was because the library was requiring active_support/core_ext. I changed it to just require 'active_support' and it works, at least as of this commit: http://github.com/rails/rails/commit/39d6f9e1#diff-21
Since Rails 3 makes active_support less monolithic, I believe this should be the approved approach going forward. If individual components have specific dependency issues those should be reviewed on a case-by-case basis, however the general claim that active_support does not declare it's dependency of I18n is false.
-
Gabe da Silveira
- Tag changed from activesupport to activesupport, patch
Uh sorry David, you posted while I was typing :(
+1 on the patch to fix the gemspec (I already had Rails installed, so didn't notice that aspect of it)
-
David Haslem
Previous patch neglected builder, because it looks like it's supposed to be optional for activesupport (builder isn't required until to_xml is called). Here's a patch with both i18n and builder dependency moved into activesupport if you prefer that option.
-
David Haslem
No problem Gabe, same happened to me - didn't see your comment until after my second patch :(.
Your comment makes my second patch unnecessary, since it'd just make active_support more monolithic - only the i18n gem is required to get an 'active_support/core_ext' require to work.
-
Y.C. Ling
Encountered the same issue.
I still think it's good to apply David's patch.
I'm working on a project depend on ActiveSupport (not other parts in rails),
and using meta-programming methods such as alias_method_chain, set_callback.
It's strange that I need to setting i18n gem manually in the Gemfile,
even if I didn't use any localization functionality of ActiveSupport.I think make an
unnecessary' dependency to i18n and builder is good.<br/> It makes the annoying things behind the scene.
