· 7 years ago · Jul 30, 2018, 04:24 PM
1require 'rubygems'
2gem 'fog'
3require 'fog'
4
5# create a connection
6connection = Fog::Storage.new(
7 :provider => 'AWS',
8 :aws_secret_access_key => 'SECRET_KEY',
9 :aws_access_key_id => 'KEY_ID'
10)
11
12p connection.directories
13
14ruby fog.rb
15Excon::Errors::SocketError: The processing instruction target matching "[xX][mM][lL]" is not allowed.
16 request at C:/jruby-1.6.1/lib/ruby/gems/1.8/gems/excon-0.6.3/lib/excon/connection.rb:174
17 request at C:/jruby-1.6.1/lib/ruby/gems/1.8/gems/fog-0.8.1/lib/fog/core/connection.rb:20
18 request at C:/jruby-1.6.1/lib/ruby/gems/1.8/gems/fog-0.8.1/lib/fog/storage/aws.rb:323
19 get_service at C:/jruby-1.6.1/lib/ruby/gems/1.8/gems/fog-0.8.1/lib/fog/storage/requests/aws/get_service.rb:24
20 all at C:/jruby-1.6.1/lib/ruby/gems/1.8/gems/fog-0.8.1/lib/fog/storage/models/aws/directories.rb:13
21 lazy_load at C:/jruby-1.6.1/lib/ruby/gems/1.8/gems/fog-0.8.1/lib/fog/core/collection.rb:123
22 empty? at (eval):3
23 inspect at C:/jruby-1.6.1/lib/ruby/gems/1.8/gems/fog-0.8.1/lib/fog/core/collection.rb:70
24 indent at C:/jruby-1.6.1/lib/ruby/gems/1.8/gems/formatador-0.1.3/lib/formatador.rb:92
25 inspect at C:/jruby-1.6.1/lib/ruby/gems/1.8/gems/fog-0.8.1/lib/fog/core/collection.rb:63
26 p at org/jruby/RubyKernel.java:483
27 (root) at fog.rb:12