raw1z / amistad

Adds friendships management into a rails application
http://github.com/raw1z/amistad
MIT License
185 stars 71 forks source link

wrong number of arguments (3 for 2) #48

Closed gabrieltong closed 10 years ago

gabrieltong commented 10 years ago

after install amistad , restart server , I see a error

wrong number of arguments (3 for 2)

the full trace is

activerecord (3.2.13) lib/active_record/associations.rb:1197:in `has_many'
amistad (0.10.0) lib/amistad/active_record_friend_model.rb:16:in `block in <module:ActiveRecordFriendModel>'
activesupport (3.2.13) lib/active_support/concern.rb:121:in `class_eval'
activesupport (3.2.13) lib/active_support/concern.rb:121:in `append_features'
amistad (0.10.0) lib/amistad/friend_model.rb:6:in `include'
amistad (0.10.0) lib/amistad/friend_model.rb:6:in `block in included'
amistad (0.10.0) lib/amistad/friend_model.rb:5:in `class_exec'
amistad (0.10.0) lib/amistad/friend_model.rb:5:in `included'
app/models/user.rb:5:in `include'
app/models/user.rb:5:in `<class:User>'
app/models/user.rb:1:in `<top (required)>'
activesupport (3.2.13) lib/active_support/dependencies.rb:469:in `load'
activesupport (3.2.13) lib/active_support/dependencies.rb:469:in `block in load_file'
activesupport (3.2.13) lib/active_support/dependencies.rb:639:in `new_constants_in'
activesupport (3.2.13) lib/active_support/dependencies.rb:468:in `load_file'
activesupport (3.2.13) lib/active_support/dependencies.rb:353:in `require_or_load'
activesupport (3.2.13) lib/active_support/dependencies.rb:502:in `load_missing_constant'
activesupport (3.2.13) lib/active_support/dependencies.rb:192:in `block in const_missing'
activesupport (3.2.13) lib/active_support/dependencies.rb:190:in `each'
activesupport (3.2.13) lib/active_support/dependencies.rb:190:in `const_missing'
clearance (1.4.0) lib/clearance/configuration.rb:29:in `user_model'
clearance (1.4.0) lib/clearance/session.rb:82:in `user_from_remember_token'
clearance (1.4.0) lib/clearance/session.rb:17:in `current_user'
clearance (1.4.0) lib/clearance/session.rb:48:in `signed_in?'
clearance (1.4.0) lib/clearance/authentication.rb:42:in `signed_in?'
actionpack (3.2.13) lib/abstract_controller/helpers.rb:53:in `signed_in?'
app/views/layouts/application.html.erb:48:in `block (2 levels) in _app_views_layouts_application_html_erb___2299720539167234240_70245686545360'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:40:in `capture'
actionpack (3.2.13) lib/action_view/helpers/tag_helper.rb:95:in `content_tag'
/Users/shangliang/.rvm/gems/ruby-1.9.3-p547@rails3/bundler/gems/twitter-bootstrap-rails-1d93c5a77049/app/helpers/navbar_helper.rb:13:in `menu_group'
app/views/layouts/application.html.erb:47:in `block in _app_views_layouts_application_html_erb___2299720539167234240_70245686545360'
/Users/shangliang/.rvm/gems/ruby-1.9.3-p547@rails3/bundler/gems/twitter-bootstrap-rails-1d93c5a77049/app/helpers/navbar_helper.rb:6:in `block (2 levels) in nav_bar'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:40:in `capture'
/Users/shangliang/.rvm/gems/ruby-1.9.3-p547@rails3/bundler/gems/twitter-bootstrap-rails-1d93c5a77049/app/helpers/navbar_helper.rb:125:in `block in container_div_with_block'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:40:in `capture'
actionpack (3.2.13) lib/action_view/helpers/tag_helper.rb:95:in `content_tag'
/Users/shangliang/.rvm/gems/ruby-1.9.3-p547@rails3/bundler/gems/twitter-bootstrap-rails-1d93c5a77049/app/helpers/navbar_helper.rb:170:in `responsive_div'
/Users/shangliang/.rvm/gems/ruby-1.9.3-p547@rails3/bundler/gems/twitter-bootstrap-rails-1d93c5a77049/app/helpers/navbar_helper.rb:125:in `container_div_with_block'
/Users/shangliang/.rvm/gems/ruby-1.9.3-p547@rails3/bundler/gems/twitter-bootstrap-rails-1d93c5a77049/app/helpers/navbar_helper.rb:117:in `block in container_div'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:40:in `capture'
actionpack (3.2.13) lib/action_view/helpers/tag_helper.rb:95:in `content_tag'
/Users/shangliang/.rvm/gems/ruby-1.9.3-p547@rails3/bundler/gems/twitter-bootstrap-rails-1d93c5a77049/app/helpers/navbar_helper.rb:116:in `container_div'
/Users/shangliang/.rvm/gems/ruby-1.9.3-p547@rails3/bundler/gems/twitter-bootstrap-rails-1d93c5a77049/app/helpers/navbar_helper.rb:5:in `block in nav_bar'
/Users/shangliang/.rvm/gems/ruby-1.9.3-p547@rails3/bundler/gems/twitter-bootstrap-rails-1d93c5a77049/app/helpers/navbar_helper.rb:108:in `block in nav_bar_nav'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
actionpack (3.2.13) lib/action_view/helpers/capture_helper.rb:40:in `capture'
actionpack (3.2.13) lib/action_view/helpers/tag_helper.rb:95:in `content_tag'
/Users/shangliang/.rvm/gems/ruby-1.9.3-p547@rails3/bundler/gems/twitter-bootstrap-rails-1d93c5a77049/app/helpers/navbar_helper.rb:107:in `nav_bar_nav'
/Users/shangliang/.rvm/gems/ruby-1.9.3-p547@rails3/bundler/gems/twitter-bootstrap-rails-1d93c5a77049/app/helpers/navbar_helper.rb:4:in `nav_bar'
app/views/layouts/application.html.erb:46:in `_app_views_layouts_application_html_erb___2299720539167234240_70245686545360'
actionpack (3.2.13) lib/action_view/template.rb:145:in `block in render'
activesupport (3.2.13) lib/active_support/notifications.rb:125:in `instrument'
actionpack (3.2.13) lib/action_view/template.rb:143:in `render'
actionpack (3.2.13) lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
actionpack (3.2.13) lib/action_view/renderer/template_renderer.rb:45:in `render_template'
actionpack (3.2.13) lib/action_view/renderer/template_renderer.rb:18:in `render'
actionpack (3.2.13) lib/action_view/renderer/renderer.rb:36:in `render_template'
actionpack (3.2.13) lib/action_view/renderer/renderer.rb:17:in `render'
actionpack (3.2.13) lib/abstract_controller/rendering.rb:110:in `_render_template'
actionpack (3.2.13) lib/action_controller/metal/streaming.rb:225:in `_render_template'
actionpack (3.2.13) lib/abstract_controller/rendering.rb:103:in `render_to_body'
actionpack (3.2.13) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
actionpack (3.2.13) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
actionpack (3.2.13) lib/abstract_controller/rendering.rb:88:in `render'
actionpack (3.2.13) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
activesupport (3.2.13) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/Users/shangliang/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
activesupport (3.2.13) lib/active_support/core_ext/benchmark.rb:5:in `ms'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
activerecord (3.2.13) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:39:in `render'
actionpack (3.2.13) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
actionpack (3.2.13) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
actionpack (3.2.13) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.13) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.2.13) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.2.13) lib/active_support/callbacks.rb:436:in `_run__3140304189990479911__process_action__4306410903363589170__callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.13) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.13) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.2.13) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.2.13) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.13) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.13) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.2.13) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
activerecord (3.2.13) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (3.2.13) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.2.13) lib/abstract_controller/rendering.rb:45:in `process'
actionpack (3.2.13) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.13) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.13) lib/action_controller/metal.rb:246:in `block in action'
actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:in `call'
actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:36:in `call'
journey (1.0.4) lib/journey/router.rb:68:in `block in call'
journey (1.0.4) lib/journey/router.rb:56:in `each'
journey (1.0.4) lib/journey/router.rb:56:in `call'
actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:612:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.5) lib/rack/etag.rb:23:in `call'
rack (1.4.5) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/head.rb:14:in `call'
clearance (1.4.0) lib/clearance/rack_session.rb:10:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.13) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.13) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `_run__1223353627886605144__call__1698402511737311081__callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.13) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
request_store (1.1.0) lib/request_store/middleware.rb:8:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in `call'
railties (3.2.13) lib/rails/engine.rb:479:in `call'
railties (3.2.13) lib/rails/application.rb:223:in `call'
rack (1.4.5) lib/rack/content_length.rb:14:in `call'
railties (3.2.13) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
/Users/shangliang/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/Users/shangliang/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/Users/shangliang/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'

my gemfile is

source 'http://ruby.taobao.org'

gem 'rails', '3.2.13'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'mysql2'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'
gem 'clearance'
gem 'gon'
gem 'ckeditor'
gem 'paperclip'
gem "twitter-bootstrap-rails",:github=>'seyhunak/twitter-bootstrap-rails',:branch=>'bootstrap3'
gem 'simple_form'
gem 'cancan'
gem 'rolify'
gem "bower-rails", "~> 0.8.3"
gem 'mobile_rails'
gem 'ancestry'
gem 'awesome_nested_set'
gem 'amistad'
nguyen-brian commented 10 years ago

Try using version 0.9.2. The most recent version (0.10.0) uses the activerecord 4x syntax which throws this error.

gabrieltong commented 10 years ago

@brianatwhistle thank you