I'm getting this error every time I run 'heroku run rake ptourist:reset_all --remote staging' command. Please let me know if more information is needed in order to adequately answer the question. Full trace:
rake aborted!
NoMethodError: undefined method `each' for nil:NilClass
/app/vendor/bundle/ruby/2.2.0/gems/mongo-2.4.1/lib/mongo/cluster.rb:167:in `initialize'
/app/vendor/bundle/ruby/2.2.0/gems/mongo-2.4.1/lib/mongo/client.rb:370:in `new'
/app/vendor/bundle/ruby/2.2.0/gems/mongo-2.4.1/lib/mongo/client.rb:370:in `create_from_addresses'
/app/vendor/bundle/ruby/2.2.0/gems/mongo-2.4.1/lib/mongo/client.rb:235:in `initialize'
/app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.2.0/lib/mongoid/clients/factory.rb:64:in `new'
/app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.2.0/lib/mongoid/clients/factory.rb:64:in `create_client'
/app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.2.0/lib/mongoid/clients/factory.rb:42:in `default'
/app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.2.0/lib/mongoid/clients.rb:38:in `default'
/app/vendor/bundle/ruby/2.2.0/gems/database_cleaner-1.5.3/lib/database_cleaner/mongo2/truncation_mixin.rb:18:in `database'
/app/vendor/bundle/ruby/2.2.0/gems/database_cleaner-1.5.3/lib/database_cleaner/mongo2/truncation_mixin.rb:29:in `collections'
/app/vendor/bundle/ruby/2.2.0/gems/database_cleaner-1.5.3/lib/database_cleaner/mongo2/truncation_mixin.rb:9:in `clean'
/app/vendor/bundle/ruby/2.2.0/gems/database_cleaner-1.5.3/lib/database_cleaner/base.rb:46:in `clean_with'
/app/lib/tasks/ptourist.rake:101:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
/app/vendor/ruby-2.2.6/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:216:in `block in invoke_prerequisites'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:214:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:214:in `invoke_prerequisites'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:193:in `block in invoke_with_call_chain'
/app/vendor/ruby-2.2.6/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:216:in `block in invoke_prerequisites'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:214:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:214:in `invoke_prerequisites'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:193:in `block in invoke_with_call_chain'
/app/vendor/ruby-2.2.6/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:216:in `block in invoke_prerequisites'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:214:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:214:in `invoke_prerequisites'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:193:in `block in invoke_with_call_chain'
/app/vendor/ruby-2.2.6/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/app/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.2.0/bin/rake:23:in `load'
/app/vendor/bundle/ruby/2.2.0/bin/rake:23:in `<top (required)>'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:27:in `run'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli.rb:332:in `exec'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in `dispatch'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in `start'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/exe/bundle:34:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/exe/bundle:26:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
Tasks: TOP => ptourist:reset_all => ptourist:users => ptourist:delete_all => ptourist:delete_subjects
Aucun commentaire:
Enregistrer un commentaire