Questions tagged [fog]

fog describes itself as 'the Ruby cloud services library'.

fog describes itself as 'the Ruby cloud services library'. It is available at https://fog.io/

498 questions
12
votes
2 answers

Adding Additional Headers to Carrierwave for Amazon s3 Encryption

In short In short I want to know if I can send additional headers through a carrierwave and fog connection to Amazon s3? In depth I recently found that amazon supports Client and Server side encryption of files. more info »…
JonathanSimmons
  • 1,528
  • 1
  • 16
  • 28
12
votes
1 answer

recreate versions - carrierwave-fog-aws

I'm trying to recreate the images that I have uploaded using the following in my model... Post.all.each do |ym| ym.avatar.cache_stored_file! ym.avatar.retrieve_from_cache!(ym.avatar.cache_name) ym.avatar.recreate_versions! …
user749798
  • 5,210
  • 10
  • 51
  • 85
12
votes
2 answers

Is there a way to read a file object using Fog and CarrierWave?

I'm using CarrierWave and Fog to store attachments to an ActiveRecord model on S3. I can use them to generate the URL, but I can't seem to locate any method to actually read a file. Is this something that the Fog gem will even do, or do I need to…
RubyRedGrapefruit
  • 12,066
  • 16
  • 92
  • 193
11
votes
1 answer

Carrierwave & Amazon S3 file downloading/uploading

I have a rails 3 app with an UploadsUploader and a Resource model on which this is mounted. I recently switched to using s3 storage and this has broken my ability to download files using the send_to method. I can enable downloading using the…
technix
  • 409
  • 1
  • 6
  • 12
11
votes
2 answers

How do I rename a file with Fog?

I have a rails 3.2 app. Using fog to store files in S3. I would like to write a script to rename all of the files that have been uploaded. I can't seem to find any fog documentation in this area. Is this possible with fog? Do I need another gem?
BM5k
  • 1,210
  • 10
  • 28
11
votes
2 answers

How to create an S3 object in a bucket with one Fog call?

Here is the Fog walkthrough of creating a file (an S3 object) in a directory (an S3 bucket): connection = Fog::Storage.new({ :provider => 'AWS', :aws_access_key_id => YOUR_AWS_ACCESS_KEY_ID, :aws_secret_access_key =>…
David J.
  • 31,569
  • 22
  • 122
  • 174
11
votes
4 answers

Rubber 2 (fog) and keypair error

Hi I am trying out rubber gem with ec2 but having some issues getting through the quick start section. For some reason Fog under rubber is not finding the keypair. Here is the detail: in irb (the path here is what is in my rubber.yml key_file…
charleetm
  • 916
  • 1
  • 12
  • 26
10
votes
2 answers

How to check if image version exists on S3 with Carrierwave and Fog?

I'm uploading my images with Carrierwave and Fog to S3. On the upload I also create a thumbnail version of the image: version :thumb do process :resize_to_limit => [90, 80], if: :is_resizable? end Now I need a method to check if thumbnail version…
crispychicken
  • 2,592
  • 2
  • 33
  • 50
10
votes
1 answer

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

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: …
andy
  • 8,775
  • 13
  • 77
  • 122
9
votes
4 answers

"Excon::Error::Forbidden" error when trying to save files to Google Cloud Storage with Fog and Carrierwave

I'm using Carrierwave and Fog to store images on the cloud. I was previously using Amazon S3 for the actual storage, which worked with no issues. But I switched over to Google Cloud Storage, and now I'm getting the following error whenever I try to…
9
votes
3 answers

Carrierwave: Move version name to end of filename, instead of front

Currently with Carrierwave, after uploading a file like foo.png when creating different versions like so: class ImageUploader < CarrierWave::Uploader::Base include CarrierWave::MiniMagick storage :fog def store_dir …
AnApprentice
  • 108,152
  • 195
  • 629
  • 1,012
9
votes
1 answer

Amazon S3 + Fog warning: connecting to the matching region will be more performant

I get the following warning while querying Amazon S3 via the Fog gem: [WARNING] fog: followed redirect to my-bucket.s3-external-3.amazonaws.com, connecting to the matching region will be more performant How exactly do I "connect to the matching…
clozach
  • 5,118
  • 5
  • 41
  • 54
9
votes
1 answer

Heroku app crashes with 'libruby.so.1.9: cannot open shared object file'

I've never had problems deploying this app but I've just pushed and now I'm getting this weird error, which is deep enough in the stack that it's not even getting sent to Airbrake. I have a feeling it might be a problem at Heroku's end, possibly…
8
votes
2 answers

Ruby Backup gem failing when uploading to S3. connection reset after 37 min

The backups are 250MB. I don't think that's very big, but it appears the problem is increasing with the size. Log from the Backup gem below. Note the time span; about 37 min into the uploading I get connection reset. [2015/10/30 09:20:40][message]…
oma
  • 38,642
  • 11
  • 71
  • 99
8
votes
2 answers

Why is it taking so long to retrieve a file URL from S3 using CarrierWave and Fog?

I'm using CarrierWave (0.9.0), Fog (1.14.0) and S3 to store user avatars. It seems to be taking a long time to determine the avatar URL for a given user. Subsequent calls have a greatly reduced time. config/initializers/fog.rb CarrierWave.configure…
ben
  • 29,229
  • 42
  • 124
  • 179
1
2
3
33 34