I am using Cucumber Factory and to make it easy to use Machinist with Cucumber and I am running into an ArgumentError. The line in my feature file that is causing the problem is:
Given there is a tag
In the blueprint file I define Tag as this (not the best, will be improved once I get past the ArgumentError):
Tag.blueprint do
name { "tag" }
slug { "slug" }
uuid { "uuid" }
end
Here's the backtrace:
cucumber_factory-1.8.4/lib/cucumber/factory.rb:24
wrong number of arguments (2 for 1) (ArgumentError)
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.6/lib/active_record/attribute_assignment.rb:33:in `attributes='
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber_factory-1.8.4/lib/cucumber/factory.rb:124:in `create_record'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber_factory-1.8.4/lib/cucumber/factory.rb:79:in `parse_creation'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber_factory-1.8.4/lib/cucumber/factory.rb:24:in `block in <class:Factory>'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/core_ext/instance_exec.rb:48:in `instance_exec'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/core_ext/instance_exec.rb:48:in `block in cucumber_instance_exec'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/core_ext/instance_exec.rb:69:in `cucumber_run_with_backtrace_filtering'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/core_ext/instance_exec.rb:36:in `cucumber_instance_exec'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/rb_support/rb_step_definition.rb:97:in `invoke'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/step_match.rb:25:in `invoke'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/step_invocation.rb:60:in `invoke'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/step_invocation.rb:38:in `accept'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:99:in `block in visit_step'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:98:in `visit_step'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/step_collection.rb:15:in `block in accept'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/step_collection.rb:14:in `each'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/step_collection.rb:14:in `accept'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:93:in `block in visit_steps'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:92:in `visit_steps'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/background.rb:41:in `block in accept'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/background.rb:52:in `block in with_visitor'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/scenario.rb:105:in `with_visitor'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/background.rb:51:in `with_visitor'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/background.rb:38:in `accept'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:57:in `block in visit_background'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:56:in `visit_background'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/feature.rb:41:in `accept'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:20:in `block in visit_feature'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:19:in `visit_feature'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/features.rb:29:in `block in accept'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/features.rb:17:in `each'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/features.rb:17:in `each'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/features.rb:28:in `accept'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:14:in `block in visit_features'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/ast/tree_walker.rb:13:in `visit_features'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/runtime.rb:47:in `run!'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/cli/main.rb:43:in `execute!'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/lib/cucumber/cli/main.rb:20:in `execute'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/gems/cucumber-1.2.5/bin/cucumber:14:in `<top (required)>'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/bin/cucumber:23:in `load'
/Users/andreas/.rvm/gems/ruby-1.9.3-p194/bin/cucumber:23:in `<main>'
features/api/v1/source/get_source.feature:7:in `And there is a tag'
I am using Ruby 1.9.3, Rails 3.2.6, Cucumber 1.2.5, Cucumber Rails 1.3.1, Cucumber Factory 1.8.4 and Machinist 2.0. The blueprint seems fine since Tag.make works in the rails console.
I would be very grateful for any ideas on how to get past the ArgumentErrors!
Related
When I run my rails 5.1 app in development, everything is fine but when I run it on Heroku and try to create a user I keep getting this error.
NoMethodError: undefined method `each' for nil:NilClass
/app/vendor/bundle/ruby/2.4.0/gems/mongo-2.5.3/lib/mongo/cluster.rb:192:in `initialize'
/app/vendor/bundle/ruby/2.4.0/gems/mongo-2.5.3/lib/mongo/client.rb:454:in `new'
/app/vendor/bundle/ruby/2.4.0/gems/mongo-2.5.3/lib/mongo/client.rb:454:in `create_from_addresses'
/app/vendor/bundle/ruby/2.4.0/gems/mongo-2.5.3/lib/mongo/client.rb:253:in `initialize'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients/factory.rb:64:in `new'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients/factory.rb:64:in `create_client'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients/factory.rb:27:in `create'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients.rb:69:in `block in with_name'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients.rb:68:in `synchronize'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients.rb:68:in `with_name'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/persistence_context.rb:110:in `client'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/persistence_context.rb:70:in `collection'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/clients/options.rb:73:in `collection'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/contextual/mongo.rb:342:in `initialize'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/contextual.rb:53:in `new'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/contextual.rb:53:in `create_context'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/contextual.rb:35:in `context'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/contextual.rb:20:in `exists?'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/validatable/uniqueness.rb:276:in `validate_root'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/validatable/uniqueness.rb:48:in `block in validate_each'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/validatable/queryable.rb:23:in `with_query'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/validatable/uniqueness.rb:42:in `validate_each'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validator.rb:150:in `block in validate'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validator.rb:147:in `each'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validator.rb:147:in `validate'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:413:in `block in make_lambda'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:178:in `block (2 levels) in halting_and_conditional'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:600:in `catch'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:600:in `block in default_terminator'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:179:in `block in halting_and_conditional'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:507:in `block in invoke_before'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:507:in `each'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:507:in `invoke_before'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:130:in `run_callbacks'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/interceptable.rb:132:in `run_callbacks'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:825:in `_run_validate_callbacks'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validations.rb:405:in `run_validations!'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validations/callbacks.rb:110:in `block in run_validations!'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:131:in `run_callbacks'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/interceptable.rb:132:in `run_callbacks'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/callbacks.rb:825:in `_run_validation_callbacks'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validations/callbacks.rb:110:in `run_validations!'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validations.rb:335:in `valid?'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/validatable.rb:97:in `valid?'
/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.0/lib/active_model/validations.rb:372:in `invalid?'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/persistable/creatable.rb:117:in `prepare_insert'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/persistable/creatable.rb:23:in `insert'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/persistable/savable.rb:23:in `save'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/persistable/savable.rb:44:in `save!'
/app/db/seeds.rb:15:in `block in <top (required)>'
/app/db/seeds.rb:4:in `times'
/app/db/seeds.rb:4:in `<top (required)>'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/dependencies.rb:286:in `load'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/dependencies.rb:286:in `block in load'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/dependencies.rb:258:in `load_dependency'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.0/lib/active_support/dependencies.rb:286:in `load'
/app/vendor/bundle/ruby/2.4.0/gems/mongoid-7.0.1/lib/mongoid/railties/database.rake:20:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/exe/bundle:30:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/exe/bundle:22:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
I can't place what could be causing the error. It is running a DB on mongoid in mlab. Not sure if that is the cause. I can't seed the db in heroku console without getting the same error.
It looks like the Mongo driver is expecting to iterate across a number of host URIs, but has somehow managed to reach that point in the code without detecting that there aren't any defined.
As you're using Mongoid to interact with the (slight lower level) Mongo Ruby client, this file on configuration might give you some clues. You'll probably want to also refer to the documentation for whichever MongoDB add-on you have installed on Heroku.
After following the fast track setup guide for calabash-ios without any issues I receive an error when trying to run cucumber in the project folder. I receive the following error with verbose and backtrack flags
Code:
* features/support/env.rb
* features/support/01_launch.rb
* features/support/02_pre_stop_hooks.rb
* features/step_definitions/calabash_steps.rb
* features/step_definitions/my_first_steps.rb
Features:
* features/my_first.feature
Parsing feature files took 0m0.003s
Feature: Running a test
As an iOS developer
I want to have a sample feature file
So I can begin testing quickly
Scenario: Example steps # features/my_first.feature:6
invalid byte sequence in UTF-8 (ArgumentError)
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/run_loop-1.4.1/lib/run_loop/instruments.rb:162:in `split'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/run_loop-1.4.1/lib/run_loop/instruments.rb:162:in `block in pids_from_ps_output'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/run_loop-1.4.1/lib/run_loop/instruments.rb:161:in `map'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/run_loop-1.4.1/lib/run_loop/instruments.rb:161:in `pids_from_ps_output'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/run_loop-1.4.1/lib/run_loop/instruments.rb:15:in `instruments_pids'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/run_loop-1.4.1/lib/run_loop/instruments.rb:39:in `kill_instruments'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/run_loop-1.4.1/lib/run_loop/core.rb:178:in `run_with_options'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/run_loop-1.4.1/lib/run_loop.rb:82:in `run'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:755:in `block in new_run_loop'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:753:in `times'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:753:in `new_run_loop'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:631:in `relaunch'
/Users/magnusm/Developer/Aubjorg-3.6_UITEST/Audbjorg/features/support/01_launch.rb:27:in `block in <top (required)>'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/core_ext/instance_exec.rb:48:in `instance_exec'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/core_ext/instance_exec.rb:48:in `block in cucumber_instance_exec'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/core_ext/instance_exec.rb:69:in `cucumber_run_with_backtrace_filtering'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/core_ext/instance_exec.rb:36:in `cucumber_instance_exec'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/rb_support/rb_hook.rb:14:in `invoke'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:114:in `invoke'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:102:in `block in execute_before'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:101:in `each'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:101:in `execute_before'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:15:in `before'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:112:in `block in fire_hook'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:111:in `each'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:111:in `fire_hook'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:107:in `before'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:98:in `before_and_after'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:82:in `block in with_hooks'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:120:in `call'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:120:in `block (3 levels) in around'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:9:in `block in around'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:97:in `call'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:97:in `execute_around'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:8:in `around'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:119:in `block (2 levels) in around'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:123:in `call'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:123:in `around'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:94:in `around'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:81:in `with_hooks'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:13:in `execute'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/scenario.rb:32:in `block in accept'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/scenario.rb:79:in `with_visitor'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/scenario.rb:31:in `accept'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:58:in `block in visit_feature_element'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:57:in `visit_feature_element'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/feature.rb:38:in `block in accept'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/feature.rb:37:in `each'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/feature.rb:37:in `accept'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:27:in `block in visit_feature'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:26:in `visit_feature'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/features.rb:28:in `block in accept'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/features.rb:17:in `each'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/features.rb:17:in `each'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/features.rb:27:in `accept'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:21:in `block in visit_features'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:20:in `visit_features'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:49:in `run!'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/lib/cucumber/cli/main.rb:47:in `execute!'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cucumber-1.3.20/bin/cucumber:13:in `<top (required)>'
/usr/local/var/rbenv/versions/2.2.3/bin/cucumber:23:in `load'
/usr/local/var/rbenv/versions/2.2.3/bin/cucumber:23:in `<main>'
Given I am on the Welcome Screen # features/step_definitions/my_first_steps.rb:1
Then I swipe left # calabash-cucumber-0.14.3/features/step_definitions/calabash_steps.rb:222
And I wait until I don't see "Please swipe left" # calabash-cucumber-0.14.3/features/step_definitions/calabash_steps.rb:158
And take picture # calabash-cucumber-0.14.3/features/step_definitions/calabash_steps.rb:217
Failing Scenarios:
cucumber features/my_first.feature:6 # Scenario: Example steps
1 scenario (1 failed)
4 steps (4 skipped)
0m0.226s
How can I solve this issue ?
UPDATE Fixed in run-loop develop.
There is a bug in run-loop.
"Dilbert’s MacBook Pro [<UDID>]"
$ perl -ane '{ if(m/[[:^ascii:]]/) { print } }' devices.txt
Dilbert’s MacBook Pro [<UDID>]
The apostrophe in that string is causing the problem. It is a UTF8 character and not ASCII.
Workaround Rename your machine in System Preferences > Sharing.
Tracking https://github.com/calabash/run_loop/issues/219
Related https://github.com/calabash/run_loop/issues/74
Thanks to Magnus Olafur for helping me track this down.
I am new to ruby on rails and I am trying to develop some demo application. I am trying to use postgres as database server. I am trying to setup database from rails using rake db:setup command. I am getting following exception. I researched using google but I could not figure out the problem with my little knowledge. Could you please help me out with fixing this issue.
Ruby version 2.2.2 and rails version 4.2.1
Following is the exception:
$ bin/rake db:setup
/home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:303:in `block in visit_Psych_Nodes_Alias': Cannot load `Rails.application.database_configuration`:
Unknown alias: default (Psych::BadAlias)
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:303:in `fetch'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:303:in `visit_Psych_Nodes_Alias'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/visitor.rb:15:in `visit'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/visitor.rb:5:in `accept'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:31:in `accept'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:321:in `block in revive_hash'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:319:in `each'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:319:in `each_slice'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:319:in `revive_hash'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:161:in `visit_Psych_Nodes_Mapping'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/visitor.rb:15:in `visit'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/visitor.rb:5:in `accept'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:31:in `accept'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:321:in `block in revive_hash'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:319:in `each'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:319:in `each_slice'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:319:in `revive_hash'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:161:in `visit_Psych_Nodes_Mapping'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/visitor.rb:15:in `visit'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/visitor.rb:5:in `accept'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:31:in `accept'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:295:in `visit_Psych_Nodes_Document'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/visitor.rb:15:in `visit'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/visitor.rb:5:in `accept'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:31:in `accept'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych/nodes/node.rb:37:in `to_ruby'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych.rb:246:in `load'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/application/configuration.rb:104:in `database_configuration'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/railtie.rb:117:in `block (2 levels) in <class:Railtie>'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/base.rb:316:in `<module:ActiveRecord>'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/base.rb:26:in `<top (required)>'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:319:in `active_record_configured?'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:251:in `disconnect_database'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:97:in `preload'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:143:in `serve'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/satish/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
I'm new to Cucumber test, and explore way to test POST to a REST API.
In referring to http://anthonyeden.com/2013/07/10/testing-rest-apis-with-cucumber-and-rack.html and How to test posts in Rails / Capybara / Cucumber or Rspec, I managed to progress on my Cucumber test to Post a URL, however I got stuck with the following error when I call "post"
undefined method `call' for nil:NilClass (NoMethodError)
My simplified steps are as below
require "rack/test"
require "Capybara"
module CapybaraApp
def app; Capybara.app; end
end
World(CapybaraApp)
World(Rack::Test::Methods)
When /^I send a POST request to "([^\"]*)" with:$/ do |url, body|
header 'Accept', 'application/json'
header 'Content-Type', 'application/json'
post url, body
end
Then /^the JSON response should have (\d+) "([^\"]*)" elements$/ do |number_of_children, name|
page = JSON.parse(last_response.body)
page.map { |d| d[name] }.length.should == number_of_children.to_i
end
And my feature
Feature: Users API
Background: Testing
Scenario: Post Testing
When I send a POST request to "/my_test_url/" with:
"""
{
"name":"Polly"
}
"""
Then the JSON response should have 3 "user" elements
My debugging shows that it's the "post" in the steps that causing the error. Can someone enlighten me here? Thanks!!
Update: Adding the stack trace as below
undefined method `call' for nil:NilClass (NoMethodError)
/.rvm/gems/ruby-2.1.1/gems/rack-test-0.6.3/lib/rack/mock_session.rb:30:in `request'
/.rvm/gems/ruby-2.1.1/gems/rack-test-0.6.3/lib/rack/test.rb:244:in `process_request'
/.rvm/gems/ruby-2.1.1/gems/rack-test-0.6.3/lib/rack/test.rb:67:in `post'
/Documents/cucumberTest/steps_definition/test_step.rb:13:in `block in <top (required)>'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/core_ext/instance_exec.rb:48:in `instance_exec'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/core_ext/instance_exec.rb:48:in `block in cucumber_instance_exec'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/core_ext/instance_exec.rb:69:in `cucumber_run_with_backtrace_filtering'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/core_ext/instance_exec.rb:36:in `cucumber_instance_exec'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/rb_support/rb_step_definition.rb:97:in `invoke'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/step_match.rb:25:in `invoke'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/step_invocation.rb:60:in `invoke'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/step_invocation.rb:38:in `accept'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:106:in `block in visit_step'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:105:in `visit_step'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/step_collection.rb:19:in `block in accept'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/step_collection.rb:18:in `each'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/step_collection.rb:18:in `accept'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:100:in `block in visit_steps'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:99:in `visit_steps'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:15:in `block in execute'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/runtime.rb:83:in `block (2 levels) in with_hooks'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/runtime.rb:99:in `before_and_after'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/runtime.rb:82:in `block in with_hooks'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:120:in `call'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:120:in `block (3 levels) in around'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/language_support/language_methods.rb:9:in `block in around'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/language_support/language_methods.rb:97:in `call'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/language_support/language_methods.rb:97:in `execute_around'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/language_support/language_methods.rb:8:in `around'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:119:in `block (2 levels) in around'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:123:in `call'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:123:in `around'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/runtime.rb:94:in `around'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/runtime.rb:81:in `with_hooks'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:13:in `execute'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/scenario.rb:32:in `block in accept'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/scenario.rb:79:in `with_visitor'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/scenario.rb:31:in `accept'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:58:in `block in visit_feature_element'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:57:in `visit_feature_element'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/feature.rb:38:in `block in accept'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/feature.rb:37:in `each'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/feature.rb:37:in `accept'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:27:in `block in visit_feature'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:26:in `visit_feature'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/features.rb:28:in `block in accept'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/features.rb:17:in `each'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/features.rb:17:in `each'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/features.rb:27:in `accept'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:21:in `block in visit_features'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/ast/tree_walker.rb:20:in `visit_features'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/runtime.rb:49:in `run!'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/lib/cucumber/cli/main.rb:47:in `execute!'
/.rvm/gems/ruby-2.1.1/gems/cucumber-1.3.19/bin/cucumber:13:in `<top (required)>'
/.rvm/gems/ruby-2.1.1/bin/cucumber:23:in `load'
/.rvm/gems/ruby-2.1.1/bin/cucumber:23:in `<main>'
/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
Sorry to copy in this entire log, but I'm hoping it might make more sense to someone familiar with this issue. When devise began setting up the user model I wasn't given the option (I never pressed enter) and the install proceeded and crashed, outputting the following. Thanks!
? What would you like the user model to be called? Press <enter> for [user] > - Now setting up devise with user model name 'user':
generate devise
invoke active_record
create db/migrate/20120825075751_add_devise_to_users.rb
insert app/models/user.rb
route devise_for :users
- Now you'll need an initializer...
create config/initializers/rails_admin.rb
/home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `block in source_reflection': undefined method `klass' for nil:NilClass (NoMethodError)
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `collect'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `source_reflection'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:375:in `rescue in foreign_key'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:373:in `foreign_key'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:259:in `association_foreign_key_lookup'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:71:in `block in associations'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:64:in `map'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:64:in `associations'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:29:in `block (2 levels) in polymorphic_parents'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:28:in `each'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:28:in `block in polymorphic_parents'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:27:in `tap'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:27:in `polymorphic_parents'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:222:in `association_model_lookup'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:69:in `block (2 levels) in associations'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:49:in `call'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:49:in `associated_model_config'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:19:in `block in <class:PolymorphicAssociation>'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:68:in `instance_eval'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:68:in `block in register_instance_option'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:42:in `block in register_instance_option'
from (erb):86:in `block (2 levels) in template'
from (erb):85:in `map'
from (erb):85:in `block in template'
from (erb):82:in `map'
from (erb):82:in `template'
from /home/funkdified/.rvm/rubies/ruby-1.9.3-p125-HEAD/lib/ruby/1.9.1/erb.rb:838:in `eval'
from /home/funkdified/.rvm/rubies/ruby-1.9.3-p125-HEAD/lib/ruby/1.9.1/erb.rb:838:in `result'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/file_manipulation.rb:111:in `block in template'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:54:in `call'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:54:in `render'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `block (2 levels) in invoke!'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `open'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `block in invoke!'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `call'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `invoke_with_conflict_check'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:61:in `invoke!'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions.rb:95:in `action'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:26:in `create_file'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/file_manipulation.rb:110:in `template'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/generators/rails_admin/install_generator.rb:59:in `install'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `each'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `map'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `invoke_all'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/group.rb:238:in `dispatch'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/railties-3.2.8/lib/rails/generators.rb:171:in `invoke'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/railties-3.2.8/lib/rails/commands/generate.rb:12:in `<top (required)>'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/railties-3.2.8/lib/rails/commands.rb:29:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I figured it out. I installed devise first to debug and found it was an issue with my existing User model. I needed to drop the User table and start over.