# Need Help with Globalize Plugin

**URL:** <https://www.ruby-forum.com/t/need-help-with-globalize-plugin/69589>\
**Category:** Rails\
**Created:** [February 17, 2006, 10:06am UTC](https://www.ruby-forum.com/t/need-help-with-globalize-plugin/69589 "2006-02-17T10:06:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![donsdgr81](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@donsdgr81](https://www.ruby-forum.com/u/donsdgr81)\
**Post date:** [February 17, 2006, 10:06am UTC](https://www.ruby-forum.com/t/need-help-with-globalize-plugin/69589/1 "2006-02-17T10:06:48Z")

</div>

Hi everyone,

I’ve been playing around with the Globalize plugin for some days now  
but I can’t seem to make it work properly with my models. I’m currently  
using Postgres 8.0 for the database and needed to make some  
modifications with my migration file that was posted by Jake Morrison in  
the Globalize wiki…

[http://www.globalize-rails.org/wiki/pages/Frequently+Asked+Questions](http://www.globalize-rails.org/wiki/pages/Frequently+Asked+Questions)

… so that I can successfully create the DB schema.

Now I tried to follow the examples in the wiki when using models but  
it seems that my data is not being stored in the globalize\_translations  
table. Anyway here is a sample of my code.

environment.rb:

include Globalize

controllers/application.rb:

class ApplicationController \< ActionController::Base  
Locale.set\_base\_language(‘en-US’)  
end

models/sample.rb

class Trial \< ActiveRecord::Base  
translates :name  
end

sample\_controller.rb

class TrialController \< ApplicationController  
def index  
Locale.set(‘en-US’)  
Trial.create(:name =\> ‘One’)  
Locale.set(‘es-ES’)  
trial = Trial.find(1)  
trial.name = ‘Uno’  
if trial.save  
render\_text(“#{trial.name”)  
end  
end  
end

When running the app I get this error:

RuntimeError: ERROR C42601 Msyntax error at or near “WHERE” P20  
Fscan.l L639 Ryyerror: UPDATE trials SET WHERE id = 1

Looking at it closely, it seems that on the intiall save on the  
database, no data is being saved on the globalize\_translation table so  
when I try to update the data from my trials table no value is being  
passed.

I know that I have configured the app properly because data is being  
passed to the globalized\_translation folder when I do “foo”.t but I  
really can’t make it work with my models.

Do you guys know how to fix this? I would really appreciate if you can  
help me fix this problem.

Thanks a lot,  
Dons

---

<div class="post-metadata">

**Author:** ![donsdgr81](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@donsdgr81](https://www.ruby-forum.com/u/donsdgr81)\
**Post date:** [February 17, 2006, 11:15am UTC](https://www.ruby-forum.com/t/need-help-with-globalize-plugin/69589/2 "2006-02-17T11:15:56Z")

</div>

BTW I’m using Mac OSX 10.4.4 with RoR 1.0 an Postgres 8.0 installed via  
Darwinports if incase you need that info.

---

<div class="post-metadata">

**Author:** ![donsdgr81](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@donsdgr81](https://www.ruby-forum.com/u/donsdgr81)\
**Post date:** [February 20, 2006, 12:32pm UTC](https://www.ruby-forum.com/t/need-help-with-globalize-plugin/69589/3 "2006-02-20T12:32:39Z")

</div>

can anyone help me with this one?

---

<div class="post-metadata">

**Author:** ![donsdgr81](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@donsdgr81](https://www.ruby-forum.com/u/donsdgr81)\
**Post date:** [February 20, 2006, 1:57pm UTC](https://www.ruby-forum.com/t/need-help-with-globalize-plugin/69589/4 "2006-02-20T13:57:13Z")

</div>

Donald,

Try posting your problem to the Globalize mailing list:  
[http://globalize-rails.org/wiki/pages/MailingList](http://globalize-rails.org/wiki/pages/MailingList)

Josh

Donald Nakar wrote:

> can anyone help me with this one?

---

<div class="post-metadata">

**Author:** ![donsdgr81](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@donsdgr81](https://www.ruby-forum.com/u/donsdgr81)\
**Post date:** [February 21, 2006, 1:04am UTC](https://www.ruby-forum.com/t/need-help-with-globalize-plugin/69589/5 "2006-02-21T01:04:52Z")

</div>

I’m also using ruby 1.8.2\_4 if that also post a problem
