无法通过我的应用将图像上传到Google Cloud Platform

时间:2018-12-28 16:22:03

标签: ruby-on-rails heroku google-cloud-platform

因此,我在本地计算机上创建了一个应用程序,该应用程序允许我将图像上传到Google Cloud Platform。在本地计算机上使用该应用程序时,我可以上传到云中。但是,当我将其上传到Heroku时,尝试上传图像时会收到“很抱歉,出了点问题”。运行日志时,出现“ ActionView :: Template :: Error(提供的位置无。无法生成URI。):”如何解决此问题? 我正在做一个投资组合,想炫耀我能做什么。这是我的github存储库:https://github.com/isepulveda78/yelpdemo

1 个答案:

答案 0 :(得分:0)

更改 config / environments / production.rb

中的第42行
config.active_storage.service = :local

config.active_storage.service = :google

有关更多信息:Setup Active Storage

编辑:

观看github后,您的图像甚至都不会进入Google云。 您是否已在Google控制台中签入了图片?

按照这些不同的教程来使用主动存储和谷歌云。

Active_storage

Google Cloud Storage account