polyamorous icon indicating copy to clipboard operation
polyamorous copied to clipboard

Error running in Rails 5.1.2

Open mattlindsey opened this issue 8 years ago • 2 comments

'bundle install' works with latest polyamorous gem, but running gives following error:

mattlindsey@MATTs-MBP WebsiteOne (1737_rails_5) $ bundle exec cucumber features
[Coveralls] Using SimpleCov's 'rails' settings.
There was an error while trying to load the gem 'polyamorous'.
Gem Load Error is: undefined method `alias_method_chain' for ActiveRecord::Associations::JoinDependency:Class
Did you mean?  alias_method
Backtrace for gem load error is:
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/polyamorous-1.2.0/lib/polyamorous/activerecord_3_and_4.0_ruby_1.9/join_dependency.rb:6:in `block in included'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/polyamorous-1.2.0/lib/polyamorous/activerecord_3_and_4.0_ruby_1.9/join_dependency.rb:5:in `class_eval'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/polyamorous-1.2.0/lib/polyamorous/activerecord_3_and_4.0_ruby_1.9/join_dependency.rb:5:in `included'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/polyamorous-1.2.0/lib/polyamorous.rb:51:in `include'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/polyamorous-1.2.0/lib/polyamorous.rb:51:in `<top (required)>'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler/runtime.rb:82:in `require'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler/runtime.rb:77:in `each'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler/runtime.rb:77:in `block in require'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler/runtime.rb:66:in `each'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler/runtime.rb:66:in `require'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler.rb:108:in `require'
/Users/mattlindsey/Documents/github/WebsiteOne/config/application.rb:7:in `<top (required)>'
/Users/mattlindsey/Documents/github/WebsiteOne/config/environment.rb:2:in `require'
/Users/mattlindsey/Documents/github/WebsiteOne/config/environment.rb:2:in `<top (required)>'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-rails-1.5.0/lib/cucumber/rails.rb:7:in `require'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-rails-1.5.0/lib/cucumber/rails.rb:7:in `<top (required)>'
/Users/mattlindsey/Documents/github/WebsiteOne/features/support/env.rb:9:in `require'
/Users/mattlindsey/Documents/github/WebsiteOne/features/support/env.rb:9:in `<top (required)>'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load_code_file'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:142:in `load_file'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:84:in `block in load_files!'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `each'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `load_files!'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:253:in `load_step_definitions'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:61:in `run!'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/cli/main.rb:32:in `execute!'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/bin/cucumber:8:in `<top (required)>'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/bin/cucumber:22:in `load'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/bin/cucumber:22:in `<main>'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
Bundler Error Backtrace:
 (Bundler::GemRequireError)
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler/runtime.rb:85:in `rescue in block (2 levels) in require'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler/runtime.rb:77:in `each'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler/runtime.rb:77:in `block in require'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler/runtime.rb:66:in `each'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler/runtime.rb:66:in `require'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.2/lib/bundler.rb:108:in `require'
/Users/mattlindsey/Documents/github/WebsiteOne/config/application.rb:7:in `<top (required)>'
/Users/mattlindsey/Documents/github/WebsiteOne/config/environment.rb:2:in `require'
/Users/mattlindsey/Documents/github/WebsiteOne/config/environment.rb:2:in `<top (required)>'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-rails-1.5.0/lib/cucumber/rails.rb:7:in `require'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-rails-1.5.0/lib/cucumber/rails.rb:7:in `<top (required)>'
/Users/mattlindsey/Documents/github/WebsiteOne/features/support/env.rb:9:in `require'
/Users/mattlindsey/Documents/github/WebsiteOne/features/support/env.rb:9:in `<top (required)>'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load_code_file'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:142:in `load_file'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:84:in `block in load_files!'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `each'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `load_files!'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:253:in `load_step_definitions'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:61:in `run!'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/lib/cucumber/cli/main.rb:32:in `execute!'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/gems/cucumber-2.4.0/bin/cucumber:8:in `<top (required)>'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/bin/cucumber:22:in `load'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/bin/cucumber:22:in `<main>'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
/Users/mattlindsey/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'

mattlindsey avatar Jul 19 '17 10:07 mattlindsey

Perhaps this is issue? http://blog.bigbinary.com/2016/08/21/rails-5-deprecates-alias-method-chain.html

mattlindsey avatar Jul 19 '17 10:07 mattlindsey

Was having this same issue but realized this gem has been deprecated and merged into Ransack. If you are using Ransack an update to the latest release will fix this.

deodad avatar Aug 19 '18 19:08 deodad