Skip to content

Instantly share code, notes, and snippets.

@tomash
Created November 19, 2010 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomash/706290 to your computer and use it in GitHub Desktop.
Save tomash/706290 to your computer and use it in GitHub Desktop.
globalize3 problems
class EmailTemplate < ActiveRecord::Base
translates :name, :content
end
ruby-1.8.7-p174 > EmailTemplate
=> EmailTemplate(id: integer, name: string, slug: string, content: text, created_at: datetime, updated_at: datetime)
ruby-1.8.7-p174 > EmailTemplate.first
=> nil
ruby-1.8.7-p174 > EmailTemplate.new
NoMethodError: undefined method `with_locales' for #<Class:0xb6820bc0>
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/activerecord-3.0.0/lib/active_record/base.rb:1016:in `method_missing'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/activerecord-3.0.0/lib/active_record/associations/association_collection.rb:443:in `send'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/activerecord-3.0.0/lib/active_record/associations/association_collection.rb:443:in `method_missing'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/activerecord-3.0.0/lib/active_record/base.rb:1128:in `with_scope'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/activerecord-3.0.0/lib/active_record/associations/association_proxy.rb:203:in `send'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/activerecord-3.0.0/lib/active_record/associations/association_proxy.rb:203:in `with_scope'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/activerecord-3.0.0/lib/active_record/associations/association_collection.rb:439:in `method_missing'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/bundler/gems/globalize3-5b8fc3cbcb9a/lib/globalize/active_record/adapter.rb:69:in `fetch_translations'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/bundler/gems/globalize3-5b8fc3cbcb9a/lib/globalize/active_record/adapter.rb:73:in `fetch_attribute'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/bundler/gems/globalize3-5b8fc3cbcb9a/lib/globalize/active_record/adapter.rb:19:in `fetch'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/bundler/gems/globalize3-5b8fc3cbcb9a/lib/globalize/active_record/instance_methods.rb:33:in `read_attribute'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/activerecord-3.0.0/lib/active_record/base.rb:1576:in `attribute_for_inspect'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/activerecord-3.0.0/lib/active_record/base.rb:1649:in `inspect'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/activerecord-3.0.0/lib/active_record/base.rb:1647:in `collect'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/activerecord-3.0.0/lib/active_record/base.rb:1647:in `inspect'
from /home/tomek/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/irb.rb:302:in `output_value'
from /home/tomek/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/irb.rb:151:in `eval_input'
from /home/tomek/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/irb.rb:263:in `signal_status'
from /home/tomek/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/irb.rb:147:in `eval_input'
from /home/tomek/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/irb.rb:146:in `eval_input'
from /home/tomek/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/irb.rb:70:in `start'
from /home/tomek/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/irb.rb:69:in `catch'
from /home/tomek/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/irb.rb:69:in `start'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/railties-3.0.0/lib/rails/commands/console.rb:44:in `start'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/railties-3.0.0/lib/rails/commands/console.rb:8:in `start'
from /home/tomek/.rvm/gems/ruby-1.8.7-p174@rails3/gems/railties-3.0.0/lib/rails/commands.rb:23
from script/rails:6:in `require'
from script/rails:6ruby-1.8.7-p174 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment