Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

carrierwave.rb:45:in block in <class:Railtie>': undefined method include?' #2234

Closed
MateoLa opened this issue Oct 2, 2017 · 2 comments
Closed

Comments

@MateoLa
Copy link

MateoLa commented Oct 2, 2017

Hello.
Everything was ok until today when I exec bundle update.
Now I can't start rails.
I get this error:
/var/lib/gems/2.4.0/gems/carrierwave-1.2.0/lib/carrierwave.rb:45:in block in <class:Railtie>': undefined method include?' for 馃嚜馃嚫Symbol (NoMethodError)

In app/config/environments/.rb I have: " config.i18n.available_locales = :es"
In app/config/initializers/locale.rb I have:
# config/initializers/locale.rb
I18n.load_path += Dir[Rails.root.join('lib', 'locales', '
.{rb,yml}')]
I18n.available_locales = [:en, :es]
I18n.default_locale = :es

In app/lib/locales I have 4 files: es.yml, en.yml, devise.en.yml, devise.es.yml
In the es.yml file I made the corrections for carrierwave error messages.

I read the line 45 in carrierwave.rb.
Is an if conditional so it can't figure out how it is throwing the undefined method error for an include? no matters the :es symbol.

I am in:
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux-gnu]
Rails 5.1.4

(I made a test moving locales under app/config/locales/... but the same happens)

I appreciate any help. Thanks, Mateo.

@mshibuya
Copy link
Member

mshibuya commented Oct 3, 2017

Sorry for the issue, please see if the fix 796ddb0 works. If it does, I'll push another release.

@MateoLa
Copy link
Author

MateoLa commented Oct 3, 2017

Yes. This fix works. Thank you M.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants