Skip to content

None of the static class methods in the gem seem to work in a Rails app #112

Description

@exterm

I'm not sure whether this is a bug or user error, but in the Rails console, I can't use any of the static methods from the timescale gem. E.g. Timescaledb::Extension.version and Timescaledb::Stats.new([MyModel.hypertable]).to_h. So I also can't execute Timescaledb::Extension.update!. It seems that Timescaledb::Connection.instance is not initialized.

my_application(prod)> Timescaledb::Extension.installed?
(my_application):7:in '<main>': connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory (PG::ConnectionBad)
        Is the server running locally and accepting connections on that socket?
my_application(prod)> Timescaledb::Connection.instance.connected?
=> false

I can't find any code that would initialize the connection when used within a Rails app. Should my app have a custom initializer that does so?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions