17 Feb 2013, 20:14
Generic-user-small

Michael Allan (2 posts)

I’ve followed the instructions up to page 177 to refactor to use a database, but running cucumber gives me the following error:

➜ atm git:(master) bundle exec cucumber undefined method alias_method_chain' for ActiveRecord::Base:Class (NoMethodError) /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/activerecord-2.3.17/lib/active_record/base.rb:2002:in method_missing’ /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/activerecord-2.3.17/lib/active_record/validations.rb:387:in block in included' /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/activerecord-2.3.17/lib/active_record/validations.rb:386:in class_eval’ /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/activerecord-2.3.17/lib/active_record/validations.rb:386:in included' /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/activerecord-2.3.17/lib/active_record/base.rb:3210:in include’ /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/activerecord-2.3.17/lib/active_record/base.rb:3210:in block in <module:ActiveRecord>' /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/activerecord-2.3.17/lib/active_record/base.rb:3208:in class_eval’ /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/activerecord-2.3.17/lib/active_record/base.rb:3208:in <module:ActiveRecord>' /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/activerecord-2.3.17/lib/active_record/base.rb:5:in <top (required)>’ /Users/michaelallan/scratch/cucumber-book/atm/lib/account.rb:3:in <top (required)>' /Users/michaelallan/scratch/cucumber-book/atm/lib/nice_bank.rb:2:in require_relative’ /Users/michaelallan/scratch/cucumber-book/atm/lib/nice_bank.rb:2:in <top (required)>' /Users/michaelallan/scratch/cucumber-book/atm/features/support/env.rb:1:in require’ /Users/michaelallan/scratch/cucumber-book/atm/features/support/env.rb:1:in <top (required)>' /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/cucumber-1.2.1/lib/cucumber/rb_support/rb_language.rb:129:in load’ /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/cucumber-1.2.1/lib/cucumber/rb_support/rb_language.rb:129:in load_code_file' /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/cucumber-1.2.1/lib/cucumber/runtime/support_code.rb:171:in load_file’ /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/cucumber-1.2.1/lib/cucumber/runtime/support_code.rb:83:in block in load_files!' /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/cucumber-1.2.1/lib/cucumber/runtime/support_code.rb:82:in each’ /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/cucumber-1.2.1/lib/cucumber/runtime/support_code.rb:82:in load_files!' /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/cucumber-1.2.1/lib/cucumber/runtime.rb:175:in load_step_definitions’ /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/cucumber-1.2.1/lib/cucumber/runtime.rb:40:in run!' /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:43:in execute!’ /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:20:in execute' /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/gems/cucumber-1.2.1/bin/cucumber:14:in <top (required)>’ /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/bin/cucumber:23:in load' /Users/michaelallan/.rvm/gems/ruby-1.9.3-p194@atm/bin/cucumber:23:in '

I’ve tried a few different things and googled, but can’t find a fix. This commit shows the changes I made on the repo, which was previously working as expected:

https://github.com/growlybear/atm/commit/52a1e61889cee755250223fefd97bfaf88395e05

Any thoughts?

Cheers, Mike

  You must be logged in to comment