Reputation: 2756
I am trying to upload a file to S3 using fog. I have been following the fog tutorial found here: http://fog.io/storage/ but I am getting an error. Is there anything obvious that I am missing? My connection object is valid and I can browse directories and existing files. I can create a new text file. But when I try to upload an mp3 I get an ssh error. I am happy to give more information about my setup, I just don't know what is relevant.
when I run this ruby code:
connection.directories[1].files.create(key: 'test.mp3', body: File.open("/path/to/test.mp3"), public: true)
I get this error:
Excon::Errors::SocketError: uninitialized constant OpenSSL::OPENSSL_LIBRARY_VERSION (NameError)
from /Users/me/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/excon-0.45.2/lib/excon/socket.rb:245:in `rescue in block in write_nonblock'
I am using ruby 2.0.0-p451
I am on OSX 10.9.5
Here are all the foggy things in my gemfile:
fog (1.28.0)
fog-atmos
fog-aws (~> 0.0)
fog-brightbox (~> 0.4)
fog-core (~> 1.27, >= 1.27.3)
fog-ecloud
fog-json
fog-profitbricks
fog-radosgw (>= 0.0.2)
fog-riakcs
fog-sakuracloud (>= 0.0.4)
fog-serverlove
fog-softlayer
fog-storm_on_demand
fog-terremark
fog-vmfusion
fog-voxel
fog-xml (~> 0.1.1)
ipaddress (~> 0.5)
nokogiri (~> 1.5, >= 1.5.11)
fog-atmos (0.1.0)
fog-core
fog-xml
fog-aws (0.1.1)
fog-core (~> 1.27)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-brightbox (0.7.1)
fog-core (~> 1.22)
fog-json
inflecto (~> 0.0.2)
fog-core (1.29.0)
builder
excon (~> 0.38)
formatador (~> 0.2)
mime-types
net-scp (~> 1.1)
net-ssh (>= 2.1.3)
fog-ecloud (0.0.2)
fog-core
fog-xml
fog-json (1.0.0)
multi_json (~> 1.0)
fog-profitbricks (0.0.1)
fog-core
fog-xml
nokogiri
fog-radosgw (0.0.3)
fog-core (>= 1.21.0)
fog-json
fog-xml (>= 0.0.1)
fog-riakcs (0.1.0)
fog-core
fog-json
fog-xml
fog-sakuracloud (1.0.0)
fog-core
fog-json
fog-serverlove (0.1.1)
fog-core
fog-json
fog-softlayer (0.4.1)
fog-core
fog-json
fog-storm_on_demand (0.1.0)
fog-core
fog-json
fog-terremark (0.0.4)
fog-core
fog-xml
fog-vmfusion (0.0.1)
fission
fog-core
fog-voxel (0.0.2)
fog-core
fog-xml
fog-xml (0.1.1)
fog-core
nokogiri (~> 1.5, >= 1.5.11)
openssl version:
openssl
OpenSSL> version
OpenSSL 0.9.8zd 8 Jan 2015
Upvotes: 2
Views: 234
Reputation: 2542
sorry to hear you are having this issue. We added a check in excon for openssl version because openssl had a release with a bug in it (so we set it up to give a better warning/instruction when you hit that bug to update). We didn't realize that this constant might not be defined in some cases. I've updated the code to skip the check when the constant is undefined and released excon 0.45.3, if you update to that it should avoid this issue.
All that said, I think it is also worth noting that the openssl version you have there is quite outdated (though it maybe is not obviously so, due to backported security fixes). It would probably be a good idea to bump up to something in the 1.0.1 or even 1.0.2 series (probably using a package manager, I use homebrew for this). This might also fix your issue, but regardless is probably a good idea.
Hope that helps!
Upvotes: 2