Skip to content

Instantly share code, notes, and snippets.

@KeithP
Created April 12, 2017 08:15
Show Gist options
  • Save KeithP/c3a98b32b198e979dfc54e361b8075fa to your computer and use it in GitHub Desktop.
Save KeithP/c3a98b32b198e979dfc54e361b8075fa to your computer and use it in GitHub Desktop.
32) Pages signed in should display the 'root_path'
Failure/Error: @user = create(:user)
ActiveRecord::StatementInvalid:
PG::UndefinedTable: ERROR: invalid reference to FROM-clause entry for table "i"
LINE 2: CROSS JOIN generate_subscripts(i.indkey, 1) k
^
HINT: There is an entry for table "i", but it cannot be referenced from this part of the query.
: SELECT a.attname FROM pg_index i
CROSS JOIN generate_subscripts(i.indkey, 1) k
JOIN pg_attribute a
ON a.attrelid = i.indrelid
AND a.attnum = i.indkey[k]
WHERE i.indrelid = '"users"'::regclass
AND i.indisprimary
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:626:in `async_exec'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:626:in `block (2 levels) in exec_no_cache'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activesupport/lib/active_support/dependencies/interlock.rb:46:in `block in permit_concurrent_loads'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activesupport/lib/active_support/concurrency/share_lock.rb:185:in `yield_shares'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activesupport/lib/active_support/dependencies/interlock.rb:45:in `permit_concurrent_loads'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:625:in `block in exec_no_cache'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:614:in `block (2 levels) in log'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:613:in `block in log'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:605:in `log'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:624:in `exec_no_cache'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `execute_and_clear'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:182:in `select_result'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:17:in `select_values'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb:365:in `primary_keys'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb:142:in `primary_key'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/schema_cache.rb:41:in `primary_keys'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/attribute_methods/primary_key.rb:103:in `get_primary_key'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/attribute_methods/primary_key.rb:90:in `reset_primary_key'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/attribute_methods/primary_key.rb:78:in `primary_key'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/attribute_methods/primary_key.rb:63:in `define_method_attribute'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activemodel/lib/active_model/attribute_methods.rb:292:in `block in define_attribute_method'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activemodel/lib/active_model/attribute_methods.rb:285:in `each'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activemodel/lib/active_model/attribute_methods.rb:285:in `define_attribute_method'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activemodel/lib/active_model/attribute_methods.rb:252:in `block in define_attribute_methods'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activemodel/lib/active_model/attribute_methods.rb:252:in `each'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activemodel/lib/active_model/attribute_methods.rb:252:in `define_attribute_methods'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/attribute_methods.rb:62:in `block in define_attribute_methods'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/attribute_methods.rb:59:in `define_attribute_methods'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/core.rb:331:in `initialize'
# /home/rof/cache/bundler/ruby/2.2.0/gems/devise-4.2.1/lib/devise/models/confirmable.rb:65:in `initialize'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/inheritance.rb:66:in `new'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/inheritance.rb:66:in `new'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/decorator/new_constructor.rb:9:in `new'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/decorator.rb:14:in `send'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/decorator.rb:10:in `method_missing'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/decorator/invocation_tracker.rb:11:in `method_missing'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/decorator.rb:14:in `send'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/decorator.rb:10:in `method_missing'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/configuration.rb:19:in `block in initialize'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/attribute_assigner.rb:48:in `instance_exec'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/attribute_assigner.rb:48:in `build_class_instance'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/attribute_assigner.rb:13:in `object'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/evaluation.rb:12:in `object'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/strategy/create.rb:9:in `result'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/factory.rb:42:in `run'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/factory_runner.rb:29:in `block in run'
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activesupport/lib/active_support/notifications.rb:166:in `instrument'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/factory_runner.rb:28:in `run'
# /home/rof/cache/bundler/ruby/2.2.0/gems/factory_girl-4.8.0/lib/factory_girl/strategy_syntax_method_registrar.rb:20:in `block in define_singular_strategy_method'
# ./spec/requests/pages_spec.rb:49:in `block (3 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# PG::UndefinedTable:
# ERROR: invalid reference to FROM-clause entry for table "i"
# LINE 2: CROSS JOIN generate_subscripts(i.indkey, 1) k
# ^
# HINT: There is an entry for table "i", but it cannot be referenced from this part of the query.
# /home/rof/cache/bundler/ruby/2.2.0/bundler/gems/rails-e1b02f7efc0e/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:626:in `async_exec'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment