Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Dawarich
  3. How to use the Rails Console

How to use the Rails Console

Scheduled Pinned Locked Moved Unsolved Dawarich
1 Posts 1 Posters 14 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • imc67I Offline
    imc67I Offline
    imc67
    translator
    wrote last edited by
    #1

    According to https://dawarich.app/docs/FAQ I want to do some datapoint cleaning:

    1. 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 console and 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. there I did https://dawarich.app/docs/FAQ#my-distance-is-off-how-can-i-fix-it:
    [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 😉

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Bookmarks
    • Search