Heads Up: i18n gem v0.4.1 breaks things

9 views
Skip to first unread message

Dlineate

unread,
Sep 2, 2010, 10:59:46 PM9/2/10
to adva-cms
I accidentally installed Rails 3.0 today then uninstalled, but I think
it left behind the i18n gem v0.4.1.

That in turn caused problems when some of my validation errors were
being generated. (See end w/ paths stripped for brevity). I know
svenfuchs is developing the gem itself, so he'll probably get around
to syncing the two or replacing globalize w/ a gem dependency
sometime, but till then don't let this bite you.

adva_cms == 0.3.2 master
rails == 2.3.5


ArgumentError: odd number of arguments for Hash
from vendor/plugins/adva_cms/vendor/plugins/globalize2/lib/globalize/
backend/static.rb:48:in `[]'
from vendor/plugins/adva_cms/vendor/plugins/globalize2/lib/globalize/
backend/static.rb:48:in `translation'
from vendor/plugins/adva_cms/vendor/plugins/globalize2/lib/globalize/
backend/static.rb:23:in `translate'
from gems/i18n-0.4.1/lib/i18n.rb:152:in `translate'
from gems/activerecord-2.3.5/lib/active_record/base.rb:1381:in
`human_name'
from gems/activerecord-2.3.5/lib/active_record/validations.rb:123:in
`default_options'
from gems/activerecord-2.3.5/lib/active_record/validations.rb:36:in
`full_message'
from gems/activerecord-2.3.5/lib/active_record/validations.rb:275:in
`full_messages'
from gems/activerecord-2.3.5/lib/active_record/validations.rb:275:in
`map'
from gems/activerecord-2.3.5/lib/active_record/validations.rb:275:in
`full_messages'
from gems/activerecord-2.3.5/lib/active_record/base.rb:2197:in
`inject'
from gems/activerecord-2.3.5/lib/active_record/validations.rb:274:in
`each'
from gems/activerecord-2.3.5/lib/active_record/validations.rb:274:in
`inject'
from gems/activerecord-2.3.5/lib/active_record/validations.rb:274:in
`full_messages'
from gems/activerecord-2.3.5/lib/active_record/validations.rb:13:in
`initialize'
from gems/activerecord-2.3.5/lib/active_record/validations.rb:1090:in
`new'
from gems/activerecord-2.3.5/lib/active_record/validations.rb:1090:in
`save!'

Nicola Piccinini

unread,
Oct 21, 2010, 5:44:16 PM10/21/10
to adva-cms
if you have to live with this situation (i.e. having i18n ~> 0.4.1 gem
installed for rails 3.0 and still run adva_cms 0.3.2) the best way
I've found is:

1. use bundle in your Rails 2.3.* application, as described here:
http://gembundler.com/rails23.html
2. configure bundle to use i18n 0.1.3
3. keep Rails 2.3.5

best,
Nicola

dan

unread,
Oct 23, 2010, 2:28:59 AM10/23/10
to adva-cms
i was looking for a wiki project, found adva-cms, installed it and am
now facing this issue
thanks for posting a fix, ill be trying it out now
Reply all
Reply to author
Forward
0 new messages