How to use the Rails Console
-
According to https://dawarich.app/docs/FAQ I want to do some datapoint cleaning:
- https://dawarich.app/docs/FAQ#how-to-enter-dawarich-console enter the Rails Console, as the app terminal is already in docker I did:
bin/rails consoleand entered "something"
/app/code# bin/rails console [dotenv] Set DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD, DATABASE_NAME, DATABASE_PORT, REDIS_URL, and OBJC_DISABLE_INITIALIZE_FORK_SAFETY [dotenv] Loaded .env.development OIDC: Not configured (missing OIDC_CLIENT_ID or OIDC_CLIENT_SECRET) Loading development environment (Rails 8.0.3) [1] pry(main)>[1] pry(main)> points = Point.where(latitude: 0, longitude: 0) ActiveRecord::ConnectionNotEstablished: connection to server at "::1", port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished) Is the server running on that host and accepting TCP/IP connections? connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? from /app/code/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:69:in 'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.new_client' Caused by PG::ConnectionBad: connection to server at "::1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? from /app/code/vendor/bundle/ruby/3.4.0/gems/pg-1.6.2-x86_64-linux/lib/pg/connection.rb:751:in 'PG::Connection::Pollable#polling_loop' [2] pry(main)>Now the question is how to get this working? There are many more "tools" via this Console but it has to work in the first place

- https://dawarich.app/docs/FAQ#how-to-enter-dawarich-console enter the Rails Console, as the app terminal is already in docker I did: