pg

    0热度

    1回答

    我想部署我的Rails应用程序到Heroku。我创建了一个应用程序,并成功地推动它,但是当我做 heroku run rake db:migrate 我收到此错误 > rake aborted! > LoadError: libruby.so.2.3: cannot open shared object file: No such file or directory - > /app/

    0热度

    2回答

    我刚刚创建了一个新应用程序并安装了'pg'gem,创建了一个psql用户和数据库,并创建了一个database.yml文件。但是,服务器不会接受我的密码,即使它是正确的。 下面是我跑到我创建用户和数据库的命令: Project$ sudo -i -u postgres [email protected]:~$ psql postgres=# CREATE USER Project WITH P

    7热度

    2回答

    似乎有很多文档(例如https://devcenter.heroku.com/articles/heroku-postgresql#connecting-in-node-js,但也包括此站点在内的其他地方)表明正确使用pg.js节点包进行连接的方法是使用pg.connect。不过,我试图(后与我的实际代码前面的问题)通过使用上述Heroku的文档上显示的确切的代码进行测试: var pg = re

    1热度

    1回答

    由node.js开发。我正在使用pg-promise。 插入以下数据时出现问题。 我想在下表中插入多行数据。 create table info ( id varchar(20) not null, name varchar(20) not null, createdate timestamp with time zone not null ) 我插入了下面的数据

    2热度

    1回答

    所以我这个表称为SeasonRate create_table "season_rates", force: :cascade do |t| t.string "title" t.datetime "from_date" t.datetime "to_date" t.float "rate" t.integer "property_type_id"

    0热度

    1回答

    我使用travis-ci.org来测试Node.js模块。 它使用最新的pg包来访问PostgreSQL数据库。 集成测试需要使用的Postgres copy命令(从事务中...不是psql的\copy)来填充一些CSV数据的临时表。 一切都通过本地 ...但特拉维斯-CI运行我打: "COPY some_table(column_a,column_b) FROM '/home/travis/b

    0热度

    1回答

    我尝试使用简单函数来查询我的Web应用程序的数据时遇到了一个麻烦。这个想法是使用一个函数来列出一个表的内容;另一个函数使用此表中的user-selected record_id查询另一个表中的详细内容数据。 运行时,应用程序运行这两个函数时没有任何错误,但没有数据。检查控制台,发现第二个函数的查询结果是null(我输入了第二个函数,发现他们得到并使用了正确的查询键)。因为我确信数据库有用于查询的数

    0热度

    1回答

    每次我尝试运行 bundle exec rake db:create db:migrate 我得到这个错误: PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) HINT: Use the sam

    0热度

    1回答

    我有以下疑问: 问题1:在下面的代码,调用游泳池的任何功能之前,我该如何确保游泳池是活动? const { Pool } = require('pg'); var pool = new Pool(); //global variable, used by multiple modules function f1(){ /* Check here if pool is ac

    2热度

    1回答

    亲爱的社区和有希望的, 我正在建立一个网站/服务器pg-promise。 我使用postgre角色/组登录进行身份验证。 我不知道我是否正确地做了这些事情,但我希望每个用户都使用自己的postgres连接来查询数据库。 因此,在实践中,我们为每个用户在连接时创建连接(如果它尚不存在)。 要做到这一点,我创建了一个池对象与一个丑陋的“假承诺”和PGUSER对象: var pgPool = funct