heroku

How to switch from SQLite3 to Postgres to deploy on Heroku

情到浓时终转凉″ 提交于 2020-03-06 04:01:07
问题 My initial database is SQLite 3, but heroku doesn't support it and I have to switch to PostgreSQL. I tried to aad the gem in the gemfile, but the deployment still failed. This is my gemfile: source 'https://rubygems.org' gem 'postgres', '~> 0.8.1' group :development, :test do gem 'sqlite3' end This extract from the deployment logs shows what failed: ... Bundled gems are installed into ./vendor/bundle. remote: Post-install message from rdoc: remote: Depending on your version of ruby, you may

TypeError: this.state.workorders.map is not a function

左心房为你撑大大i 提交于 2020-03-05 04:15:37
问题 MERN app deployed to Heroku - All works well in my dev environment but once I deploy and receive a successful build to production; My landing page and login are fine but once routed to the Home page where a list of workorders should appear - just a blank page with the console stating that "TypeError: this.state.workorders.map is not a function" I've looked around quite a bit trying to resolve this - I understand that you can only map through an array, etc. but I am sure missing something. Any

Rails 5.2 application secrets empty at Heroku

泄露秘密 提交于 2020-03-05 04:15:08
问题 I deployed to Heroku with success but there is an issue with credentials. I added RAILS_MASTER_KEY env variable at Heroku app CONFIG VARS section and copy-pasted the value from my app master.key file: Then when I check its value from Heroku console, it is still nil: Loading production environment (Rails 5.2.3) irb(main):001:0> Rails.application.secrets.secret_key_base => nil irb(main):002:0> Rails.application.secrets => {:secret_key_base=>nil, :secret_token=>nil} irb(main):003:0> But when I

Flask deployment to Heroku: 404 URL Not Found, discussing Flask file structure compatible for Heroku

拈花ヽ惹草 提交于 2020-03-05 03:14:12
问题 I've gotten past the error mentioned here I think... But there's an error 404 message that won't go away for my flask application once I launch it on heroku, and I'm not sure what to do at this point. Heroku/Flask deployment failing, either 'can't find attribute app' or 'can't find module name (flask_module)', proc file to blame? I restructured my flask project so that it uses a "single module" organizational pattern. File tree: My __init__.py and experiment.py / app.py files On my previous

Heroku-18: Git push fails. Showing different versions of Ruby on push

随声附和 提交于 2020-03-03 14:00:22
问题 My apologies if this is a dumb question. I am not familiar with anything about Ruby. Also tried several solutions from SO. Managed to upgrade Ruby, resolve dependencies. Now just stuck and not able to move ahead. Any help is appreciated. Thank you. When I push, I get ruby v2.2.2 but I just upgraded to 2.5.7 which is supported by heroku-18. Here are CLI records: remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1

AWS::S3::Errors::AccessDenied. Cannot save to S3 with Ruby on Rails

偶尔善良 提交于 2020-03-02 07:01:29
问题 I am attempting to connect Amazon S3 to my site so to store user avatars. I expect users to be able to add an avatar to their profiles, but it seems that I am denied access. I've looked at and tried several solutions with no success: Ruby Amazon S3 Access Denied when listing buckets How to solve “Access Denied” with Heroku + Paperclip + S3 + ROR Uploading to S3 With Paperclip Error message: AWS::S3::Errors::AccessDenied: Access Denied File "/app/app/controllers/profiles_controller.rb", line

Scala实战-通过微信聊天窗口实现应答式点餐 1:连接微信API

一笑奈何 提交于 2020-03-01 12:06:47
当前代码tag: v0.0.1, https://github.com/yangbajing/wechat-meal/tree/v0.0.1 微信公众号提供了详尽的API文档说明,提供了明文和加密两种接入方式。这里,我们选择加密的接入方式 微信公众号接入指南 。 本此实战的代码部署到了 Heroku ,读者也可以下载代码尝试部署到 Heroku 并连接微信公众号。本章末尾讲讲述 Heroku 的部署及怎样与微信公众号连接。 微信API 现在主要的功能是实现与微信公众号的连接,我们将在微信里实现一个 echo 功能。就是用户在公众号聊天窗口里输入一段文本,系统原样返回。 连接微信API的代码 WeixinCtrl 。微信公众号的连接分两个部分: 验证服务器地址有效性 这个接口为 WeixinCtrl.get 方法,用户校验服务器的有效性 依据接口文档实现业务逻辑 这个接口为 WeixinCtrl.post 方法,通过微信公众号聊天窗口发送的各类消息都会发送的这里。 代码 WeixinService 是所以微信API相关功能实现的入口,现在提供了签名校验、加密消息和解密消息功能。 在 WeixinCtrl 控制器中,我们将收到的微信公众号消息原样返回给用户: def post = Action.async(parse.tolerantText) { request => def

Using runtime env with React and heroku

江枫思渺然 提交于 2020-03-01 11:51:41
问题 SoI have a staging and production apps on heroku. I also use create-react-app , where the environmental variables are embedded during the build time. Since the build happens on staging and then the app is released to production , I'm having staging env vars on production. Is there a way to get the runtime envs on production (from heroku config) without rebuild the whole app? 回答1: No is the short answer. Basically when you build frontend applications they turn from a node server (in the case

Using runtime env with React and heroku

霸气de小男生 提交于 2020-03-01 11:51:08
问题 SoI have a staging and production apps on heroku. I also use create-react-app , where the environmental variables are embedded during the build time. Since the build happens on staging and then the app is released to production , I'm having staging env vars on production. Is there a way to get the runtime envs on production (from heroku config) without rebuild the whole app? 回答1: No is the short answer. Basically when you build frontend applications they turn from a node server (in the case

Error when running “python manage.py syncdb” locally, but no error when running the same command via Heroku

99封情书 提交于 2020-02-28 17:25:15
问题 I am new to Heroku and Django/Python. I was hoping to find an answer for an issue I'm experiencing. I have been following the Getting Started tutorial in Heroku's Dev Center: https://devcenter.heroku.com/articles/django Everything is working properly when running commands and pushing app code to Heroku. For example, when I run the CLI command "heroku run python manage.py syncdb" everything works as expected with no errors. However, when I try to run the same command locally, "python manage.py