Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG::UndefinedTable: ERROR: relation "settings" does not exist #226

Open
bairdmw opened this issue Oct 7, 2018 · 0 comments
Open

PG::UndefinedTable: ERROR: relation "settings" does not exist #226

bairdmw opened this issue Oct 7, 2018 · 0 comments

Comments

@bairdmw
Copy link

bairdmw commented Oct 7, 2018

I'm a newbie to Linux and have tried installing RidePilot, but I get the following error when I run the bin/rake db:setup command. I have installed Ruby 2.5.1, Rails 5.2.1 and Postgresql 10.5 with PostGIS 2.5. Postgresql is running and I have been able to connect to the db server using pgAdmin.
Would appreciate any advice/assistance with this.

TIA
Matt

[bairdmw@localhost ridepilot]$ bin/rake db:setup
/usr/ridepilot/config/initializers/01_load_app_config.rb:4: warning: already initialized constant APP_CONFIG
/usr/ridepilot/config/initializers/01_load_app_config.rb:1: warning: previous definition of APP_CONFIG was here
[bairdmw@localhost ridepilot]$ /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:61:in 'async_exec': PG::UndefinedTable: ERROR: relation "settings" does not exist
LINE 8: WHERE a.attrelid = '"settings"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"settings"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
(ActiveRecord::StatementInvalid)
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:61:in 'block (2 levels) in query'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:46:in 'block in permit_concurrent_loads'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/concurrency/share_lock.rb:185:in 'yield_shares'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:45:in 'permit_concurrent_loads'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:60:in 'block in query'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:613:in 'block (2 levels) in log'
from /usr/share/ruby/monitor.rb:226:in 'mon_synchronize'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:612:in 'block in log'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in 'instrument'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:604:in 'log'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:59:in 'query'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:765:in 'column_definitions'
from /usr/share/gems/gems/activerecord-postgis-adapter-5.2.0/lib/active_record/connection_adapters/postgis/schema_statements.rb:9:in 'columns'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/schema_cache.rb:67:in 'columns'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/schema_cache.rb:73:in 'columns_hash'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/model_schema.rb:471:in 'load_schema!'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/attributes.rb:233:in 'load_schema!'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/attribute_decorators.rb:50:in 'load_schema!'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/model_schema.rb:464:in 'block in load_schema'
from /usr/share/ruby/monitor.rb:226:in 'mon_synchronize'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/model_schema.rb:461:in 'load_schema'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/model_schema.rb:343:in 'columns_hash'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/inheritance.rb:78:in 'descends_from_active_record?'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/inheritance.rb:84:in 'finder_needs_type_condition?'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/core.rb:310:in 'relation'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/scoping/default.rb:35:in 'unscoped'
from /usr/share/gems/gems/rails-settings-cached-0.6.6/lib/rails-settings/settings.rb:99:in 'thing_scoped'
from /usr/share/gems/gems/rails-settings-cached-0.6.6/lib/rails-settings/settings.rb:73:in '[]='
from /usr/share/gems/gems/rails-settings-cached-0.6.6/lib/rails-settings/base.rb:44:in '[]='
from /usr/ridepilot/config/initializers/cad_avl.rb:2:in '<top (required)>'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in 'load'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in 'block in load'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in 'load_dependency'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in 'load'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/engine.rb:655:in 'block in load_config_initializer'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in 'instrument'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/engine.rb:654:in 'load_config_initializer'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/engine.rb:612:in 'block (2 levels) in <class:Engine>'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/engine.rb:611:in 'each'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/engine.rb:611:in 'block in <class:Engine>'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/initializable.rb:30:in 'instance_exec'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/initializable.rb:30:in 'run'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/initializable.rb:59:in 'block in run_initializers'
from /usr/share/ruby/tsort.rb:228:in 'block in tsort_each'
from /usr/share/ruby/tsort.rb:350:in 'block (2 levels) in each_strongly_connected_component'
from /usr/share/ruby/tsort.rb:422:in 'block (2 levels) in each_strongly_connected_component_from'
from /usr/share/ruby/tsort.rb:431:in 'each_strongly_connected_component_from'
from /usr/share/ruby/tsort.rb:421:in 'block in each_strongly_connected_component_from'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/initializable.rb:48:in 'each'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/initializable.rb:48:in 'tsort_each_child'
from /usr/share/ruby/tsort.rb:415:in 'call'
from /usr/share/ruby/tsort.rb:415:in 'each_strongly_connected_component_from'
from /usr/share/ruby/tsort.rb:349:in 'block in each_strongly_connected_component'
from /usr/share/ruby/tsort.rb:347:in 'each'
from /usr/share/ruby/tsort.rb:347:in 'call'
from /usr/share/ruby/tsort.rb:347:in 'each_strongly_connected_component'
from /usr/share/ruby/tsort.rb:226:in 'tsort_each'
from /usr/share/ruby/tsort.rb:205:in 'tsort_each'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/initializable.rb:58:in 'run_initializers'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/application.rb:353:in 'initialize!'
from /usr/ridepilot/config/environment.rb:94:in '<top (required)>'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in 'require'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in 'block in require'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in 'load_dependency'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in 'require'
from /usr/share/gems/gems/spring-2.0.2/lib/spring/application.rb:102:in 'preload'
from /usr/share/gems/gems/spring-2.0.2/lib/spring/application.rb:153:in 'serve'
from /usr/share/gems/gems/spring-2.0.2/lib/spring/application.rb:141:in 'block in run'
from /usr/share/gems/gems/spring-2.0.2/lib/spring/application.rb:135:in 'loop'
from /usr/share/gems/gems/spring-2.0.2/lib/spring/application.rb:135:in 'run'
from /usr/share/gems/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in '<top (required)>'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in 'require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in 'require'
from -e:1:in '<main>'[bairdmw@localhost ridepilot]$ bin/rake db:setup
/usr/ridepilot/config/initializers/01_load_app_config.rb:4: warning: already initialized constant APP_CONFIG
/usr/ridepilot/config/initializers/01_load_app_config.rb:1: warning: previous definition of APP_CONFIG was here
[bairdmw@localhost ridepilot]$ /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:61:in 'async_exec': PG::UndefinedTable: ERROR: relation "settings" does not exist
LINE 8: WHERE a.attrelid = '"settings"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"settings"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
(ActiveRecord::StatementInvalid)
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:61:in 'block (2 levels) in query'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:46:in 'block in permit_concurrent_loads'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/concurrency/share_lock.rb:185:in 'yield_shares'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:45:in 'permit_concurrent_loads'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:60:in 'block in query'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:613:in 'block (2 levels) in log'
from /usr/share/ruby/monitor.rb:226:in 'mon_synchronize'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:612:in 'block in log'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in 'instrument'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:604:in 'log'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:59:in 'query'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:765:in 'column_definitions'
from /usr/share/gems/gems/activerecord-postgis-adapter-5.2.0/lib/active_record/connection_adapters/postgis/schema_statements.rb:9:in 'columns'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/schema_cache.rb:67:in 'columns'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/schema_cache.rb:73:in 'columns_hash'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/model_schema.rb:471:in 'load_schema!'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/attributes.rb:233:in 'load_schema!'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/attribute_decorators.rb:50:in 'load_schema!'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/model_schema.rb:464:in 'block in load_schema'
from /usr/share/ruby/monitor.rb:226:in 'mon_synchronize'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/model_schema.rb:461:in 'load_schema'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/model_schema.rb:343:in 'columns_hash'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/inheritance.rb:78:in 'descends_from_active_record?'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/inheritance.rb:84:in 'finder_needs_type_condition?'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/core.rb:310:in 'relation'
from /usr/share/gems/gems/activerecord-5.1.6/lib/active_record/scoping/default.rb:35:in 'unscoped'
from /usr/share/gems/gems/rails-settings-cached-0.6.6/lib/rails-settings/settings.rb:99:in 'thing_scoped'
from /usr/share/gems/gems/rails-settings-cached-0.6.6/lib/rails-settings/settings.rb:73:in '[]='
from /usr/share/gems/gems/rails-settings-cached-0.6.6/lib/rails-settings/base.rb:44:in '[]='
from /usr/ridepilot/config/initializers/cad_avl.rb:2:in '<top (required)>'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in 'load'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in 'block in load'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in 'load_dependency'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in 'load'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/engine.rb:655:in 'block in load_config_initializer'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in 'instrument'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/engine.rb:654:in 'load_config_initializer'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/engine.rb:612:in 'block (2 levels) in <class:Engine>'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/engine.rb:611:in 'each'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/engine.rb:611:in 'block in <class:Engine>'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/initializable.rb:30:in 'instance_exec'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/initializable.rb:30:in 'run'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/initializable.rb:59:in 'block in run_initializers'
from /usr/share/ruby/tsort.rb:228:in 'block in tsort_each'
from /usr/share/ruby/tsort.rb:350:in 'block (2 levels) in each_strongly_connected_component'
from /usr/share/ruby/tsort.rb:422:in 'block (2 levels) in each_strongly_connected_component_from'
from /usr/share/ruby/tsort.rb:431:in 'each_strongly_connected_component_from'
from /usr/share/ruby/tsort.rb:421:in 'block in each_strongly_connected_component_from'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/initializable.rb:48:in 'each'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/initializable.rb:48:in 'tsort_each_child'
from /usr/share/ruby/tsort.rb:415:in 'call'
from /usr/share/ruby/tsort.rb:415:in 'each_strongly_connected_component_from'
from /usr/share/ruby/tsort.rb:349:in 'block in each_strongly_connected_component'
from /usr/share/ruby/tsort.rb:347:in 'each'
from /usr/share/ruby/tsort.rb:347:in 'call'
from /usr/share/ruby/tsort.rb:347:in 'each_strongly_connected_component'
from /usr/share/ruby/tsort.rb:226:in 'tsort_each'
from /usr/share/ruby/tsort.rb:205:in 'tsort_each'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/initializable.rb:58:in 'run_initializers'
from /usr/share/gems/gems/railties-5.1.6/lib/rails/application.rb:353:in 'initialize!'
from /usr/ridepilot/config/environment.rb:94:in '<top (required)>'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in 'require'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in 'block in require'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in 'load_dependency'
from /usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in 'require'
from /usr/share/gems/gems/spring-2.0.2/lib/spring/application.rb:102:in 'preload'
from /usr/share/gems/gems/spring-2.0.2/lib/spring/application.rb:153:in 'serve'
from /usr/share/gems/gems/spring-2.0.2/lib/spring/application.rb:141:in 'block in run'
from /usr/share/gems/gems/spring-2.0.2/lib/spring/application.rb:135:in 'loop'
from /usr/share/gems/gems/spring-2.0.2/lib/spring/application.rb:135:in 'run'
from /usr/share/gems/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in '<top (required)>'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in 'require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in 'require'
from -e:1:in '<main>'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant