Skip to content

Instantly share code, notes, and snippets.

@tilo
Created May 12, 2014 14:24
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 tilo/85ce8bd382027d830ed1 to your computer and use it in GitHub Desktop.
Save tilo/85ce8bd382027d830ed1 to your computer and use it in GitHub Desktop.
Argument Error when using acts-as-taggable-on with Rails 4.1ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin13.0.2]
Rails 4.1.0
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin13.0.2]
acts-as-taggable-on versions 3.1.1 and
DB: PostgreSQL / PostGIS
```
t = MyModel.first
> t.tag_list.add("something")
(0.9ms) SELECT f_geometry_column,coord_dimension,srid,type FROM geometry_columns WHERE f_table_name='taggings'
ArgumentError: wrong number of arguments (3 for 2)
from ./.rvm/gems/ruby-1.9.3-p448@something/bundler/gems/polyamorous-0fa15a3fb2d1/lib/polyamorous/join_dependency.rb:18:in `build_with_polymorphi\
sm'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/squeel-1.1.1/lib/squeel/adapters/active_record/join_dependency_extensions.rb:29:in `build_with_s\
queel'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/activerecord-4.1.0/lib/active_record/associations/join_dependency.rb:99:in `initialize'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/activerecord-4.1.0/lib/active_record/relation/query_methods.rb:979:in `new'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/activerecord-4.1.0/lib/active_record/relation/query_methods.rb:979:in `build_joins'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/activerecord-4.1.0/lib/active_record/relation/query_methods.rb:838:in `build_arel'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/activerecord-4.1.0/lib/active_record/relation/query_methods.rb:830:in `arel'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/activerecord-4.1.0/lib/active_record/relation.rb:603:in `exec_queries'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/activerecord-4.1.0/lib/active_record/association_relation.rb:15:in `exec_queries'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/activerecord-4.1.0/lib/active_record/relation.rb:487:in `load'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/activerecord-4.1.0/lib/active_record/relation.rb:231:in `to_a'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/activerecord-4.1.0/lib/active_record/relation/delegation.rb:46:in `map'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/acts-as-taggable-on-3.1.1/lib/acts_as_taggable_on/acts_as_taggable_on/core.rb:265:in `tag_list_c\
ache_on'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/acts-as-taggable-on-3.1.1/lib/acts_as_taggable_on/acts_as_taggable_on/core.rb:271:in `tag_list_o\
n'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/acts-as-taggable-on-3.1.1/lib/acts_as_taggable_on/acts_as_taggable_on/core.rb:43:in `tag_list'
from (irb):5
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/railties-4.1.0/lib/rails/commands/console.rb:90:in `start'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/railties-4.1.0/lib/rails/commands/console.rb:9:in `start'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:69:in `console'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from ./.rvm/gems/ruby-1.9.3-p448@something/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:8:in `require'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment