heroku

Is it possible to consume environment variables inside of npm / package.json?

爷,独闯天下 提交于 2020-01-14 07:39:09
问题 I'm attempting to build a package.json so that when running a NodeJS app on Heroku it will run the scripts.postinstall step using an environment variable. For example: ... "scripts": { "postinstall": "command $ENV_VAR"} }, ... I've looked at the docs and wasn't able to find something saying I can. Is this even possible? Is this even desirable and "I'm Doing It Wrong"™? 回答1: To answer the last questions, because they're the most important one: yes, no, and absolutely, because you've just

Connecting Heroku Lumen App to Amazon RDS MySQL 5.7.19

倾然丶 夕夏残阳落幕 提交于 2020-01-14 06:35:32
问题 I have granted access for the Amazon RDS MySQL instance (5.7.19) for 0.0.0.0/0 as suggested by Heroku. This makes the connection work successfully. When I force SSL for the mysql-user (ALTER USER 'user'@'%' REQUIRE SSL;) the connection breaks. I have followed these instructions from Heroku. My Heroku DATABASE_URL config variable: mysql://username:password@AMAZONRDSMYSQLURL/DATABASE?sslca=config/amazon-rds-ca-cert.pem The certificate is stored under /config/amazon-rds-ca-cert.pem From my

Heroku Rails 4— FileNotFound jquery.ui.all

泄露秘密 提交于 2020-01-14 06:10:15
问题 I am running my app on my local server with no issues, and have been pushing to Heroku with no issues until now. I am suddenly seeing this error: Running: rake assets:precompile rake aborted! Sprockets::FileNotFound: couldn't find file 'jquery.ui.all' My gemfile: gem 'jquery-rails' gem 'jquery-ui-rails' My application.js : //= require jquery //= require jquery_ujs //= require jquery.turbolinks //= require turbolinks //= require bootstrap //= require_tree ./ //= require jquery.ui.all Let me

Heroku Rails 4— FileNotFound jquery.ui.all

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-14 06:09:28
问题 I am running my app on my local server with no issues, and have been pushing to Heroku with no issues until now. I am suddenly seeing this error: Running: rake assets:precompile rake aborted! Sprockets::FileNotFound: couldn't find file 'jquery.ui.all' My gemfile: gem 'jquery-rails' gem 'jquery-ui-rails' My application.js : //= require jquery //= require jquery_ujs //= require jquery.turbolinks //= require turbolinks //= require bootstrap //= require_tree ./ //= require jquery.ui.all Let me

How to get Mern Stack to work on Heroku

喜夏-厌秋 提交于 2020-01-14 06:05:07
问题 I'm testing out the Mern Stack (Mongo Express React/Redux Node) and set it up with development with no issue. Now I'm trying to deploy to Heroku. I did a git push heroku master just like normal, but when I check out the website I see Heroku's Application Error. I added a MongoDB through Heroku, and changed my heroku config variables, so it uses that db (I think I did this correctly). So I check into logs: npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn

Rails 4, Asset Compiling

左心房为你撑大大i 提交于 2020-01-14 05:54:11
问题 I have probably wasting 4 hours trying to make this problem go away and not sure what the problem is. Locally I have been creating my Rails Application and all the assets load properly which can be see here: <link data-turbolinks-track="true" href="/assets/application.css?body=1" media="all" rel="stylesheet" /> <link data-turbolinks-track="true" href="/assets/auth.css?body=1" media="all" rel="stylesheet" /> <link data-turbolinks-track="true" href="/assets/authenications.css?body=1" media="all

Couchbase on Heroku

牧云@^-^@ 提交于 2020-01-14 05:39:06
问题 This might be a general question, but I have a simple "gym log" app, written in node and I am using Couchbase as the database. Everything works when I run it on my machine. The problem arises when after I've deployed it to Heroku and try to run it. When I check the logs I get the error that module couchbase could not be found. Do I have to add an add-on to heroku or define couchbase as a dependency in my package.json for my app to work on heroku ? Could someone give me some pointers please?

Intalling the PostgreSQL gem pq for Heroku

为君一笑 提交于 2020-01-14 05:26:10
问题 First question here, but I want to thank you very much now, because stackoverflow helped me almost 15 times just in the first chapter of michael hartl tut. Now I'm trying to install PostgreSQL (pg gem) with this command: ` group :production do gem 'pg', '0.15.1' gem 'rails_12factor', '0.0.2' end` but it shows an ERROR -bash: group: command not found Then I tried to install directly (?) the gem with gem install pg But it shows another ERROR `Fetching: pg-0.17.1.gem (100%) Building native

Heroku pg:psql stalls out

痴心易碎 提交于 2020-01-14 03:01:07
问题 When i run heroku pg:psql i get --> Connecting to postgresql-cylindrical-38664 and stalls out. Everything is looking good to go, it just gets stuck and doesn't do anything. 回答1: I seem to have the same issue in gitbash but when using command prompt, it seems to work. In command prompt, this works: heroku pg:psql --app={appnameinheroku} . You can see the apps you have to choose from by running heroku apps . 回答2: On Windows when using GitBash or Command Prompt you may encounter this issue. The

Ruby on Rails: Unable to sign out of application in production

那年仲夏 提交于 2020-01-14 02:29:28
问题 I have an application deployed on Heroku. Everything is working fine, except for signing out. When I click the link to sign out I get this error: "The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved. If you are the application owner check the logs for more information." For user authentiation I am using of course the devise gem, I have multiple solutions hovering around Stack Overflow however none of them worked for me. Take a look at the