fog

Missing required arguments: aws_access_key_id, aws_secret_access_key in server

泪湿孤枕 提交于 2020-08-07 08:17:07
问题 I keep getting this error whenever I am trying to start the server validate_options': Missing required arguments: aws_access_key_id, aws_secret_access_key (ArgumentError) I can't seem to solve the issue! I am almost sure that the issue is caused Carrierwave and fog gems to use amazon s3. But I am not sure exactly in which folder the issue is! Here's my initializer/carrierwave.rb: CarrierWave.configure do |config| config.fog_credentials = { :provider => 'AWS', # required :aws_access_key_id =>

程序开发者去世,代码没人懂,一个bug导致千万损失

大憨熊 提交于 2020-05-06 22:59:11
云栖号资讯:【 点击查看更多行业资讯 】 在这里您可以找到不同行业的第一手的上云资讯,还在等什么,快来! 系统出故障了。当年负责写这个程序的开发者早在十五年前就去世了,现在已经没有人能读得懂他的代码了...... 现在一些关键系统的运行仍依赖于过时的软件,但编写他们的人要么离职要么已经去世。中间也缺少维护或更新,导致现在几乎没人能理解它们,而且一旦出现 Bug 就会给企业造成不可挽回的损失。 而现实中的这种例子,远比你想象中的要多。 一个令人深思的故事 我的一位客户负责数项世界排名前一百的养老基金,该公司在前几个月成功的将程序搬到了云端。作为项目的主任架构师,前两天我很意外地直接收到了 CIO 的短信:“抱歉打扰,我们出 S1X 级的大问题了。你能下午飞过来吗?”。 “S1X”是他们对“比最严重级别还要糟,级联影响到业务其它非直接相关部分”问题的定义。 事情看起来十万火急,当天晚上我就飞到现场进行了诊断,发现是该客户的系统中一个批处理任务发生了崩溃。 该任务每天晚上执行一次,通过写一个 CSV 文件为某些养老金计算缴费率,再将计算的结果输出到另一个收益(benefit)分配程序。原先收益分配程序设定为在缴费(contribution)低于预测(projection)时会向客户发出报警。由于上一个处理任务已发生崩溃,不再产生输出,因此程序认为“所有缴费为零”。

howto: Basic setup of carrierwave [Heroku and S3]

感情迁移 提交于 2020-01-12 08:04:29
问题 I have an S3 bucket for production and development. I have done my research and came across this post but my current config does not work as expected. I get the following exception (below) locally and I get no file uploads to my S3 bucket from my heroku app: is not a recognized storage provider Extracted source (around line #3): 1: 2: <p><%= user.name %></p> 3: <%= image_tag user.avatar.url %> 4: <%= link_to 'Show', user %> 5: <%= link_to 'Edit', edit_user_path(user) %> 6: <%= link_to

Canvas gradient performance

断了今生、忘了曾经 提交于 2019-12-30 10:57:05
问题 I am currently programming a little game using canvas. For the game I need some kind of fog which hides the most part of the map and only a small area around the player should be visible. Therfor I use a second canvas to overlay the one where the game takes place and fill it with a gradient (from transparent to black): function drawFog(){ fogc.clearRect(0,0,700,600); // Create gradient var grd=fogc.createRadialGradient(player.getPosX(),player.getPosY(),0,player.getPosX(),player.getPosY(),100)

Upload file to S3 using CarrierWave without a model, is it possible?

大憨熊 提交于 2019-12-30 02:13:09
问题 CarrierWave has amazing documentation, until you need to do it without a model! I have my uploader and fog settings set up, and they all work fine when using the mounted uploader on a model, but now I want to do it without a model. I have this: uploader = CsvUploader.new something = uploader.store!(File.read(file_path)) uploader.retrieve_from_store!(self.file_name) When I call .store! the code runs immediately which is weird since it should take a few seconds to upload the file? Then after I

Heroku ArgumentError ( is not a recognized provider)

不问归期 提交于 2019-12-25 05:45:28
问题 I am trying to upload profile pictures to Google Cloud using Paperclip and Fog gems. so far this what I have In my Gemfile gem "paperclip", git: "git://github.com/thoughtbot/paperclip.git" gem 'fog' In my user model has_attached_file :avatar, styles: {:big => "200x200>", thumb: "50x50>"}, storage: :fog, fog_credentials: "#{Rails.root}/config/gce.yml", fog_directory: "google-bucket-name" validates_attachment_content_type :avatar, content_type: /\Aimage\/.*\Z/ When I run this locally, I am able

Uploading Videos to S3 with Carrierwave and Fog

你。 提交于 2019-12-25 03:33:19
问题 I have configured my testapp with Carrierwave and Fog. My goal is to upload videos to Amazon S3 but if I try to upload a video I get an error "pipe broken". It works if I'm just uploading a picture, so my Amazon configs should be ok! Does carrierwave works for videos? Or why does it work for images and not for videos? Carrierwave.rb: CarrierWave.configure do |config| config.fog_credentials = { :provider => 'AWS', :aws_access_key_id => 'XXX', :aws_secret_access_key => 'YYY' } config.fog

How can I temporarily store (cache) images before uploading to S3?

谁都会走 提交于 2019-12-24 22:47:02
问题 My rails app is using CarrierWave and Fog to upload images to S3. Remote URLs are working fine, HOWEVER I need to temporarily store local images (from the device it's being uploaded) before I can upload these local images to S3. How do I go about this? How do I cache my images? Vision table: class CreateVisions < ActiveRecord::Migration[5.1] def change create_table :visions do |t| t.string :image t.text :description t.timestamps end end end Vision model: class Vision < ApplicationRecord

Carrierwave s3 403 (Forbidden) error

萝らか妹 提交于 2019-12-24 03:39:53
问题 I'm trying to get carrierwave to work with Amazon S3 (in my Rails 4 app), I use fog gem to upload the images to s3 . I'm currently successfully able to upload the files to my bucket. But I cannot get the images back. server is giving 403 (Forbidden) error However if I check the image, it's there uploaded in S3. My image path would be something like https://<bucket name>.s3.amazonaws.com/uploads/image/picture/8/card_34676_l.jpg&Signature=<signature>&Expires=<expires> Following is my

Carrierwave + fog + aws s3 and rails in production

↘锁芯ラ 提交于 2019-12-23 23:52:03
问题 I have just migrated from paperclip to carrierwave and managed to successfully get uploading to S3 to work locally on my machine, but after deploying the Rails application to my server (which uses Ubuntu, Passenger with nginx, was a mission getting it to work), and when i try to upload an image, it tries to save it to public/uploads/... which comes up with a permission denied error, I have looked and searched everywhere to find out why its not working, and have found nothing. My Uploader file