Forwarding to core.

Long story short: I think activesupport should depend explicitly on i18n

PS.  If agreed, I'd love to do the change.  I've not contributed to rails
before, and I'd love to get my feet we with something simple.


---------- Forwarded message ----------
From: John Hinnegan <[email protected]>
Date: Fri, Jul 22, 2011 at 12:09 PM
Subject: ActiveSupport not including i18n?
To: [email protected]


Went to use ActiveSupport in a gem today and got an error on account of not
having i18n installed.  Either bundler should be installing i18n along with
activesupport or docs need to be updated.


quick repro:  https://github.com/softwaregravy/repro_active_support_i18n
bundle exec irb
require 'active_support/all'


detailed steps and error:

1) add to Gemfile
require 'activesupport'

2) try it out
bundle exec irb
require 'active_support/core_ext'
You don't have i18n installed in your application. Please add it to your
Gemfile and run bundle install
LoadError: no such file to load -- i18n
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/i18n.rb:2:in
`require'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/i18n.rb:2:in
`<top (required)>'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/inflector/transliterate.rb:3:in
`require'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/inflector/transliterate.rb:3:in
`<top (required)>'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/core_ext/string/inflections.rb:3:in
`require'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/core_ext/string/inflections.rb:3:in
`<top (required)>'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/core_ext/array/conversions.rb:4:in
`require'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/core_ext/array/conversions.rb:4:in
`<top (required)>'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/core_ext/array.rb:4:in
`require'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/core_ext/array.rb:4:in
`<top (required)>'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/core_ext.rb:2:in
`require'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/core_ext.rb:2:in
`block in <top (required)>'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/core_ext.rb:1:in
`each'
        from 
/Users/MacbookPro/.rvm/gems/ruby-1.9.2-p0@thinknear-ruby/gems/activesupport-3.0.9/lib/active_support/core_ext.rb:1:in
`<top (required)>'
        from (irb):1:in `require'
        from (irb):1
        from /Users/MacbookPro/.rvm/rubies/ruby-1.9.2-p0/bin/irb:16:in
`<main>'ruby-1.9.2-p0 :002 > exit


Sure enough i18n is not installed by bundler when requiring activesupport.

Fix:  adding require i18n to my Gemfile and running the bundle install did
fix the problem.

When running bundle install, I see
Using activesupport (3.0.9)

I'm unblocked, but I'm of the opinion that I should not have needed to add
i18n as a dependency of my project.  If that's not the case, then we should
update the docs that say 'to use activesupport, just add "require
'activesupport'" to your Gemfile to mention the requirement for i18n

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to