heroku

Trouble Accessing Remote Postgres DB on Heroku from Local Node.js Webapp

空扰寡人 提交于 2020-01-15 18:48:49
问题 I struggled today to get my local node.js app to reach out to the db on Heroku instead of settling for a parallel db on my machine. Thanks to a post I tested and then stopped expecting process.env.DATABASE_URL to provide the URL and replaced it with the actual URL from heroku config along the lines of var connectionString = "postgres://thinga:thingb@ec2-23-21-119-36.compute-1.amazonaws.com:5432/thingc"; . But that didn't solve the problem completely. I found I also had to use var pg = require

Unable to connect to PostgreSQL server

ぐ巨炮叔叔 提交于 2020-01-15 15:28:08
问题 I'm trying to connect to the PostgreSQL database of my app on Heroku: $host = "ec2-54-235-242-31.compute-1.amazonaws.com"; $username = "user"; $password = "pass"; $database = "dbname"; $port = "5432"; $dbconn = pg_connect("host=".$host." port=".$port ." dbname=".$database." user=".$username." password=".$password) or die('Could not connect: ' . pg_last_error()); but I'm getting this error: Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: no pg_hba

Unable to connect to PostgreSQL server

▼魔方 西西 提交于 2020-01-15 15:26:04
问题 I'm trying to connect to the PostgreSQL database of my app on Heroku: $host = "ec2-54-235-242-31.compute-1.amazonaws.com"; $username = "user"; $password = "pass"; $database = "dbname"; $port = "5432"; $dbconn = pg_connect("host=".$host." port=".$port ." dbname=".$database." user=".$username." password=".$password) or die('Could not connect: ' . pg_last_error()); but I'm getting this error: Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: no pg_hba

Installing Ruby / GSL in Heroku Application

随声附和 提交于 2020-01-15 12:46:08
问题 Context: I have an application that makes heavy use of the GSL library and its Ruby bindings. I'd like to deploy the app to Heroku. I'm very new to programming in general, much less deployment, and Heroku is very simple to use, especially for Rails apps. I have GSL installed on my laptop. I am using the 'gsl' gem. The Problem: The gem requires that the GSL library already be installed. GSL is not already installed in the Heroku environment. So, unsurprisingly, I get this error from Heroku

installing psycopg2 on Windows xp using pip and virtualenv

被刻印的时光 ゝ 提交于 2020-01-15 12:23:19
问题 I'm following Heroku's "Getting started with Django on Heroku" article and am getting a long series of errors on "pip install psycopg2". Django 1.5.1 and PostgreSQL 9.2.4 are already installed, and yes, the postgres \bin\, \include\ directories are on the PATH. C:\Python27\Scripts> C:\Python27\Scripts>cd C:\Projects\hellodjango C:\Projects\hellodjango>pip install psycopg2 Downloading/unpacking psycopg2 Downloading psycopg2-2.5.1.tar.gz (684kB): 684kB downloaded Running setup.py egg_info for

jQuery is included twice in Rails application on Heroku

限于喜欢 提交于 2020-01-15 11:42:30
问题 My question is similar to some other questions here which still didn't provide an answer for my situation I am including jQuery gem in my app in Gemfile: gem 'jquery-rails' And in application.js: //= require jquery //= require jquery-ui //= require jquery_ujs ... //= require_tree . My development.rb has # Do not compress assets config.assets.compress = false # Expands the lines which load the assets config.assets.debug = true My assets are not precompiled, there is no public/assets.

jQuery is included twice in Rails application on Heroku

家住魔仙堡 提交于 2020-01-15 11:42:15
问题 My question is similar to some other questions here which still didn't provide an answer for my situation I am including jQuery gem in my app in Gemfile: gem 'jquery-rails' And in application.js: //= require jquery //= require jquery-ui //= require jquery_ujs ... //= require_tree . My development.rb has # Do not compress assets config.assets.compress = false # Expands the lines which load the assets config.assets.debug = true My assets are not precompiled, there is no public/assets.

Heroku + Grails - missing DATABASE_URL when building app on heroku

雨燕双飞 提交于 2020-01-15 10:54:26
问题 I'm trying to connect my application to Shared Database 5MB using grails tutorial. I'm using grails 2.1.0. On my local machine when I run heroku config I can see that DATABASE_URL is set, but after executing git push... my build stops with error: Error packaging application: Error loading DataSource.groovy: null (Use --stacktrace to see the full trace) Failed to build app Heroku push rejected, failed to compile Grails app So I've added logging to see how environment looks on heroku. I've

How to isolate id from string primary key in Heroku Postgres

对着背影说爱祢 提交于 2020-01-15 10:44:08
问题 I have a model where I'm using a string as a primary key: class Employee < ActiveRecord::Base self.primary_key = "employment_id" end This table also contains the Rails default 'id' field, with a uniqueness constraint. When I add a new employee locally it all works fine, with Rails automatically generating a new unique id. However when I run this on Heroku Postgres it appears to treat 'id' and 'employment_id' as the same field. I tried to get around this by manually setting a unique id, but

Make http call from node to python in heroku dyno

末鹿安然 提交于 2020-01-15 10:14:52
问题 I've inherited a repository that contains both a NodeJS part and a Python part. The project structure is such that the NodeJS is at the root of the repository, and the Python pieces are in a Python folder: root |- app |- some.js |- files.js |- Python |- other.py |- files.py I've set up a Heroku dyno to serve both a Python server and a NodeJS server, by doing this in my Procfile (based loosely on this older article): web: npm start python: sh -c 'cd ./Python/ && export PYTHONPATH=. && python