fog

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

落花浮王杯 提交于 2019-12-10 12:46:49
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . 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

Use Fog with Ruby to generate a Pre-signed URL to PUT a file in Amazon S3

♀尐吖头ヾ 提交于 2019-12-10 04:37:06
问题 I am using the Fog gem to generate presigned urls. I can do this successfully to get read access to the file. Here's what I do: fog_s3 = Fog::Storage.new({ :provider => 'AWS', :aws_access_key_id => key, :aws_secret_access_key => secret }) object_path = 'foo.wav' expiry = Date.new(2014,2,1).to_time.to_i url = fog_s3.directories.new(:key => bucket).files.new(:key => object_path).url(expiry,path_style: true) But this doesn't work when I try to upload the file. Is there a way to specify the http

Save files using paperclip via API

我是研究僧i 提交于 2019-12-09 06:07:01
问题 I'm using paperclip to manage uploads, backed onto S3 via Fog. It works well. I'm trying to take attachments out of emails and save them via paperclip (using the same model etc). Email are parsed by an external service and POSTed to my app, including the attachments. I'm receiving the file itself fine, but I can't work out how to save it using paperclip. The post gives me an object of type ActionDispatch::Http::UploadedFile . I took a look at the below, but this involves creating a new File

Set content_type of Fog storage files on s3

半世苍凉 提交于 2019-12-08 02:51:41
问题 I'm working with Fog and Amazon s3 to manage video and image files. I've been running into a lot of trouble with setting the content_type for my files. When working from the console, I am able to go through and individually update each file's content_type, and then run save. However, when I try to run an update on all of the files within a specific directory, I don't get an error, but nothing gets updated. I've run multiple different methods, all with the same basic idea, and all set to print

Digest::Digest is deprecated; use Digest

☆樱花仙子☆ 提交于 2019-12-07 16:07:10
问题 I am getting the following error Digest::Digest is deprecated; use Digest when i try to boot my rails server. I tried to search my source code for Digest::Digest but i am not using it anywhere. any idea how to solve that? Only place i am using is <% digest = OpenSSL::Digest.new('sha1') %> @alias = Digest::MD5.hexdigest(phone) 回答1: It is most likely used by one of the gems your app is dependent on. install (unless already installed) ack tool and run the following command: # of course, the path

Need to change the storage “directory” of files in an S3 Bucket (Carrierwave / Fog)

本小妞迷上赌 提交于 2019-12-07 08:27:15
问题 I am using Carrierwave with 3 separate models to upload photos to S3. I kept the default settings for the uploader, which was to store photos in a root S3 bucket. I then decided to store them in sub-directories according to model name like /avatars, items/, etc. based on the model they were uploaded from... Then, I noticed that files of the same name were being overwritten and when I deleted a model record, the photo wasn't being deleted. I've since changed the store_dir from an uploader

How can I use fog to edit a file on s3?

允我心安 提交于 2019-12-07 06:07:05
问题 I have a bunch of files on s3. I have fog set up with a .fog config file so I can fire up fog and get a prompt. Now how do I access and edit a file on s3, if I know its path? 回答1: The easiest thing to do is probably to use IRB or PRY to get a local copy of the file, or write a simple script to download, edit and then re-upload it. Assume you have a file named data.txt. You can use the following script to initialize a connection to S3. require 'fog' connection = Fog::Storage.new({ :provider =>

Duplicated key at line 80 ignored: “name” rvm

萝らか妹 提交于 2019-12-07 02:19:56
问题 This doesn't seem to have affected anything, it's just irritating in my terminal - I regularly receive the following warning (sometimes I receive multiple, calling out different lines, and sometimes the path after /gem/ varies, but other than that, this is the output: /Users/alecwilson/.rvm/gems/ruby-2.2.1/gems/fog-1.23.0/lib/fog/rackspace/mock_data.rb:42: warning: duplicated key at line 80 ignored: "name" It's most common when bundling and running rake test . Any idea on how to fix it? I'm

Carrierwave + s3 + fog (Excon::Errors::SocketError)

帅比萌擦擦* 提交于 2019-12-07 01:04:28
问题 I'm currently getting the following error: Excon::Errors::SocketError - Broken pipe (Errno::EPIPE) when uploading images bigger than about 150kb. Images under 150kb work correctly. Research indicates that others have also experienced this problem but I'm yet to find a solution. Error message Excon::Errors::SocketError at /photos Message Broken pipe (Errno::EPIPE) File /Users/thmsmxwll/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl/buffering.rb Line 375 image_uploader.rb class

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

亡梦爱人 提交于 2019-12-06 20:06:13
问题 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 exists. The Documentation lists the exists? method. This actually works, if I want to check the existence of the original version: asset.file.exists? # => true But when I use the "thumb" version like this: asset.url(:thumb).file.exists? it get: