Globalize and Rails 4.2

Recently I've been working on preparing our Rails app at Ztory to Rails.4.2. As of today 9/12, here are the changes to our current gemset we needed to support this Rails version:
gem "rails", "~> 4.2.0.rc2"
gem "devise", git: "https://github.com/plataformatec/devise.git", branch: "lm-rails-4-2"
gem "globalize", github: "ncri/globalize" # for Rails 4.2
I've facing an issue with the globalize gem, so I'm documenting my progress here. Using the latest stable release of the gem gives me the following error:
RuntimeError: can't modify frozen ActiveSupport::HashWithIndifferentAccess

  /Users/mparramon/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0.rc2/lib/active_support/hash_with_indifferent_access.rb:97:in `[]=`
  /Users/mparramon/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0.rc2/lib/active_support/hash_with_indifferent_access.rb:97:in `[]=`
  ...
As documented here. After some looking around, I found a solution in the form of a PR which tries to prepare globalize to Rails 4.2. Using this fork on our Gemfile:
gem "globalize", github: "ncri/globalize" # for Rails 4.2
Just works!:


We've tried this on our staging environment, and our whole app works perfectly. However, database creation is broken, which makes our Travis builds fail. I've documented the error here.

I'll keep this post updated as we get closer to the solution. If you have any trouble updating your app to Rails 4.2, I can try to help in the comments section :)

2 comments:

  1. Your way to enlighten everything on this blog is actually pleasant, everyone manage to efficiently be familiar with it, Thanks a great deal.
    Pay Per Click

    ReplyDelete
  2. This isn’t always easy when you’re posting eLetter content on your website on a daily basis. Over time, keyword cannibalization issues will occur.
    xenforo auto poster

    ReplyDelete