Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Updated to 0.30.0, get undefined method `enforce_available_locales=' for I18n:Module (NoMethodError) #1950

gereons opened this Issue · 12 comments

9 participants


I just updated from 0.29.0 to 0.30.0 using "sudo gem update cocoapods" and now get this error on every invocation of pod:

$ pod help
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.30.0/lib/cocoapods.rb:12:in '<top (required)>': undefined method `enforce_available_locales=' for I18n:Module (NoMethodError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.30.0/bin/pod:32:in '<top (required)>'
    from /usr/bin/pod:23:in `load'
    from /usr/bin/pod:23:in `<main>'

Running on Mac OS X 10.9.2


Same error after sudo gem uninstall cocoapods followed by sudo gem install cocoapods


I'm seeing this too, also running on 10.9.2.


The problem seems to be with the version of the i18n gem, the method enforce_available_locales was introduced in v0.6.6 (commit) but the minimum requirement in the cocoapods dependencies seems to be (~> 0.6, >= 0.6.4) from activesupport.
Not sure what would be the best way to fix it, maybe adding an explicit requirement?


Steps to reproduce:

gem uninstall i18n
gem install i18n -v 0.6.4

Should throw the error.


Issue has been confirmed by @apalancat

@CocoaPodsBot CocoaPodsBot was unassigned by gereons

To workaround it, for now, you can do: gem install i18n -v 0.6.6.


Or just gem install i18n to get the latest.


i confirmed this by doing sudo gem update i18n. This installed 0.6.9.

pod install and pod update work now.


I confirm this fixes the problem too.Thanks for your suggestion!

@alloy alloy closed this in a5b0357
@alloy alloy referenced this issue from a commit
@alloy alloy [CHANGELOG] Update for #1950. d582d77

@apalancat I fixed it by only trying to silence it when it actually has that enforce_available_locales= attribute writer method.


seen this as well, and i18n is 0.6.9 not en_US locale , os x 10.9.2 ruby 2.00(p247,p353) with rbenv ,
and cocoapods only worked in i18n 0.6.8 for me (after trying 0.6.5 0.6.8 0.6.9)


pod search get this error:
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.30.0/lib/cocoapods.rb:12:in '': undefined method enforce_available_locales=' for I18n:Module (NoMethodError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.30.0/bin/pod:32:in '<top (required)>'
from /usr/bin/pod:23:in
from /usr/bin/pod:23:in `


sudo gem update i18n
then use sudo gem update i18n resolved this error!

@jarrold jarrold referenced this issue in viki-org/VKVideoPlayer

Invalid ’VKFoundation.podspec’ #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.