heroku

Irreversible migration, can it be fixed? - Rails 4

南笙酒味 提交于 2021-02-10 05:42:47
问题 So i made a migration like this class AddDatetimeAttrToUsers < ActiveRecord::Migration def change change_column :users, :oauth_expires_at, :datetime end end on my local environment it works just fine but when i try heroku run rake db:migrate i get an error ERROR: column "oauth_expires_at" cannot be cast automatically to type timestamp without time zone HINT: Specify a USING expression to perform the conversion. When i searched it, i created a new migration like this as best practice for

Making a Python-Telegram-Bot persistent

你说的曾经没有我的故事 提交于 2021-02-10 04:21:11
问题 I recently coded a simple telegram bot using the python-telegram-bot library, and deployed this bot on Heroku. Now i'm looking for an effective way to make the bot persistent, allowing it to store Bot_data and user_data between runs. I took a look at the persistence classes the library offers and i understood that PicklePersistence would not work with heroku's "ephemeral" hard drive. My question is, how can i implement the bot's persistence to make it work on heroku? Should i give up storing

Making a Python-Telegram-Bot persistent

偶尔善良 提交于 2021-02-10 04:12:41
问题 I recently coded a simple telegram bot using the python-telegram-bot library, and deployed this bot on Heroku. Now i'm looking for an effective way to make the bot persistent, allowing it to store Bot_data and user_data between runs. I took a look at the persistence classes the library offers and i understood that PicklePersistence would not work with heroku's "ephemeral" hard drive. My question is, how can i implement the bot's persistence to make it work on heroku? Should i give up storing

Making a Python-Telegram-Bot persistent

大兔子大兔子 提交于 2021-02-10 04:10:24
问题 I recently coded a simple telegram bot using the python-telegram-bot library, and deployed this bot on Heroku. Now i'm looking for an effective way to make the bot persistent, allowing it to store Bot_data and user_data between runs. I took a look at the persistence classes the library offers and i understood that PicklePersistence would not work with heroku's "ephemeral" hard drive. My question is, how can i implement the bot's persistence to make it work on heroku? Should i give up storing

Logging multiline messages in heroku

邮差的信 提交于 2021-02-09 20:43:48
问题 I'm developing an application using NodeJS and deployed in Heroku. I need to log multi-line messages (eg. stacktraces and other multiline information) but would like to retain them as one log message each. The problem is that when using console.log (or any framework that uses console.log / stdout ) with a multiline message it's interpreted like multiple messages by Heroku (one message per each line in the original message). I think the problem lies in that Heroku reads the messages from the

Logging multiline messages in heroku

☆樱花仙子☆ 提交于 2021-02-09 20:41:57
问题 I'm developing an application using NodeJS and deployed in Heroku. I need to log multi-line messages (eg. stacktraces and other multiline information) but would like to retain them as one log message each. The problem is that when using console.log (or any framework that uses console.log / stdout ) with a multiline message it's interpreted like multiple messages by Heroku (one message per each line in the original message). I think the problem lies in that Heroku reads the messages from the

How to protect Google API Key in an open-source (Github + Heroku) application

冷暖自知 提交于 2021-02-09 09:16:31
问题 I'm creating an application I wish to open-source in the coming weeks. The source code is on Github and Heroku autodeploys the code when there is a new commit if it passes the Travis CI tests. In this application, I've several API keys that I managed to keep out of the open source repository by using env variables in my heroku dynos. For the Google server-to-server API, however, I must have a .p12 file. In php, the following will authenticate my client: $client = new Google_Client(); $client-

How to protect Google API Key in an open-source (Github + Heroku) application

醉酒当歌 提交于 2021-02-09 09:16:04
问题 I'm creating an application I wish to open-source in the coming weeks. The source code is on Github and Heroku autodeploys the code when there is a new commit if it passes the Travis CI tests. In this application, I've several API keys that I managed to keep out of the open source repository by using env variables in my heroku dynos. For the Google server-to-server API, however, I must have a .p12 file. In php, the following will authenticate my client: $client = new Google_Client(); $client-

How to protect Google API Key in an open-source (Github + Heroku) application

ぃ、小莉子 提交于 2021-02-09 09:15:31
问题 I'm creating an application I wish to open-source in the coming weeks. The source code is on Github and Heroku autodeploys the code when there is a new commit if it passes the Travis CI tests. In this application, I've several API keys that I managed to keep out of the open source repository by using env variables in my heroku dynos. For the Google server-to-server API, however, I must have a .p12 file. In php, the following will authenticate my client: $client = new Google_Client(); $client-

Heroku H10 works on localhost, won't work in deployment

笑着哭i 提交于 2021-02-09 09:01:58
问题 This error seems to be pretty popular here! The app works great locally, but when deploying to Heroku... crickets, Application crashes. This is server.js var app = express(); var PORT = process.env.PORT || process.env.REACT_APP_PORT; app.use(express.urlencoded({ extended: true })); app.use(express.json()); (process.env.NODE_ENV === "production") ? app.use(express.static("build")) : app.use(express.static("public")); //code goes here app.use(cors()); app.get('*', function (req, res) { res