S3에 여러 파일을 업로드해야합니다. 내가 파일을 업로드 할 carrierwave + 안개를 사용하여 레일 프로젝트에있어 ... 모든 것은 내가 할 경우, 다음, 콘솔에서 잘 작동 :레이크 스크립트, 반송파 및 안개가 작동하지 않는 S3 업로드 파일
image = ImageUploader.new
image.store!(File.open("image.jpg"))
이 있었다 지금은 무리를 업로드 할 수 있고, 테스트 파일의 입/작업이 upload.rake라는 이름의 폴더 ...이 upload.rake 내부 내가 다음을 수행 lib 디렉토리 안에 레이크 스크립트를 만들 수 있도록 : 그냥 작동하지 않습니다
task :upload => :environment do
path = "app/assets/images"
Dir.foreach(path) do |file|
if file != "." && file !=".."
uploader = ImageUploader.new
uploader.store!(File.open(File.join(path,file)))
puts file
end
end
end
하지만, 그럴 수 없어 이유를 이해하십시오 ... 오류 :
rake aborted!
Broken pipe (Errno::EPIPE)
아무도 무슨 일이 일어나고 있는지 아이디어가 있습니까 ?? 나를 미친 듯이 몰아 넣고있어.이게 마지막 부분이야.
.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/openssl/buffering.rb:292:in `syswrite_nonblock'
.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/openssl/buffering.rb:292:in `write_nonblock'
.rvm/gems/ruby-1.9.2-p320/gems/excon-0.16.7/lib/excon/socket.rb:139:in `write'
.rvm/gems/ruby-1.9.2-p320/gems/excon-0.16.7/lib/excon/ssl_socket.rb:84:in `write'
.rvm/gems/ruby-1.9.2-p320/gems/excon-0.16.7/lib/excon/connection.rb:269:in `request_kernel'
.rvm/gems/ruby-1.9.2-p320/gems/excon-0.16.7/lib/excon/connection.rb:103:in `request'
.rvm/gems/ruby-1.9.2-p320/gems/fog-1.6.0/lib/fog/core/connection.rb:20:in `request'
.rvm/gems/ruby-1.9.2-p320/gems/fog-1.6.0/lib/fog/aws/storage.rb:392:in `request'
.rvm/gems/ruby-1.9.2-p320/gems/fog-1.6.0/lib/fog/aws/requests/storage/put_object.rb:43:in `put_object'
.rvm/gems/ruby-1.9.2-p320/gems/fog-1.6.0/lib/fog/aws/models/storage/file.rb:133:in `save'
고마워!