0

I've just tried to add translation_center to my app but have come across numerous errors.

There is a line in the translation_center gem which uses a symbol as a value for an attribute when creating a new active record object. The line reads:

translation = self.translations.build(value: self.name.to_s.split('.').last.titleize, lang: :en, status: 'accepted')

notice the

lang: :en

part

this raises an error

PG::UndefinedColumn: ERROR: column translation_center_translations.en does not exist

if I replace this part with

lang: 'en'

then it works fine

This is just one issue, there are a few others that raise this kind of error all related to symbols in the queries. e.g now whenever I call i18n.t(:a_symbol) I get an error

I'm using Rails 3.2.19 and translation_center 1.7.0

I found this "When using Postgres along with the Geocoder gem, your queries cannot use symbolized keys" in this issue Receiving the error PG::UndefinedColumn: ERROR: column mymodels.distance does not exist when using Geocoder's near method

I am not using geocoder, but I wonder if any of my other gems could be causing this conflict.

Here is my list of gems

bundle show
Gems included by the bundle:
RedCloth (4.2.9)
ZenTest (4.5.0)
actionmailer (3.2.19)
actionpack (3.2.19)
activemodel (3.2.19)
activerecord (3.2.19)
activeresource (3.2.19)
activesupport (3.2.19)
acts_as_votable (0.10.0)
amq-protocol (1.9.2)
ancestry (2.1.0)
arel (3.0.3)
audited (3.0.0)
audited-activerecord (3.0.0)
bcrypt (3.1.7)
bcrypt-ruby (3.1.5)
better_errors (1.1.0)
binding_of_caller (0.7.2)
bootstrap-sass (3.0.3.0)
bootstrap-wysihtml5-rails (0.3.1.24)
builder (3.0.4)
bullet (4.11.3)
bundler (1.6.0)
bunny (1.0.7)
capistrano (2.15.5)
capistrano-ext (1.2.1)
celluloid (0.15.2)
chronic (0.10.2)
cocoon (1.1.2)
coderay (1.1.0)
coercible (1.0.0)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.7.0)
country-select (1.1.1)
date_validator (0.7.0)
debug_inspector (0.0.2)
declarative_authorization (0.5.7)
descendants_tracker (0.0.4)
devise (3.0.4)
devise_invitable (1.2.1)
diff-lcs (1.2.5)
erubis (2.7.0)
ethon (0.7.1)
exception_notification_rails3 (1.2.0)
excon (0.38.0)
execjs (2.2.1)
factory_girl (4.4.0)
factory_girl_rails (4.4.1)
ffi (1.9.3)
fog (1.22.1)
fog-brightbox (0.1.1)
fog-core (1.22.0)
fog-json (1.0.0)
font-awesome-rails (4.1.0.0)
formatador (0.2.5)
formtastic (2.2.1)
gon (5.1.0)
guard (2.6.1)
guard-rspec (4.2.10)
haml (4.0.5)
haml-rails (0.4)
haml_scaffold (1.1.0)
highline (1.6.21)
hike (1.2.3)
hodel_3000_compliant_logger (0.1.1)
i18n (0.6.11)
inflecto (0.0.2)
ipaddress (0.8.0)
journey (1.0.4)
jqtree-rails (0.1.8.1)
jquery-datatables-rails (1.12.2)
jquery-rails (3.1.1)
jquery-ui-rails (4.2.1)
json (1.8.1)
libv8 (3.16.14.3)
listen (2.7.9)
lodash-rails (2.4.0)
lumberjack (1.0.9)
mail (2.5.4)
metaclass (0.0.4)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.6.0)
mocha (1.1.0)
multi_json (1.10.1)
net-scp (1.2.1)
net-sftp (2.1.2)
net-ssh (2.9.1)
net-ssh-gateway (1.2.0)
newrelic_rpm (3.9.0.229)
nifty-generators (0.4.6)
nokogiri (1.6.3.rc3)
oink (0.10.1)
oj (2.9.9)
orm_adapter (0.5.0)
pg (0.17.1)
polyamorous (0.6.4)
polyglot (0.3.5)
pry (0.9.12.6)
pry-doc (0.6.0)
pry-nav (0.2.3)
pry-rails (0.3.2)
puma (2.8.2)
rabl (0.10.1)
rack (1.4.5)
rack-cache (1.2)
rack-ssl (1.3.4)
rack-test (0.6.2)
rails (3.2.19)
railties (3.2.19)
rake (10.3.2)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
rdoc (3.12.2)
ref (1.0.5)
request_store (1.0.6)
routing-filter (0.3.1)
rspec (3.0.0)
rspec-core (3.0.2)
rspec-expectations (3.0.2)
rspec-mocks (3.0.2)
rspec-rails (3.0.1)
rspec-support (3.0.2)
rvm-capistrano (1.5.3)
sass (3.3.9)
sass-rails (3.2.6)
slop (3.5.0)
spork (0.9.2)
spring (1.1.3)
spring-commands-rspec (1.0.2)
sprockets (2.2.2)
squeel (1.1.1)
state_machine (1.2.0)
symmetric-encryption (3.6.0)
syntax (1.2.0)
syslog-logger (1.6.8)
therubyracer (0.12.1)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
timers (1.1.0)
translation_center (1.7.0)
treetop (1.4.15)
typhoeus (0.6.9)
tzinfo (0.3.39)
uglifier (2.5.1)
uniform_notifier (1.6.2)
warden (1.2.3)
webrat (0.7.3)
whenever (0.9.2)
will_paginate (3.0.7)
ya2yaml (0.31)
yard (0.8.7.4)
Community
  • 1
  • 1
ryan2johnson9
  • 724
  • 6
  • 21

1 Answers1

0

This issue is because of the sqeel gem. It does not allow using symbols for values in queries. Therefore, it cannot be used with the translation_center gem. remove from gemfile and bundle install

ryan2johnson9
  • 724
  • 6
  • 21