I am getting a seg fault when I try to use s3. The weird thing is
that I have s3 interaction working on a different project, but copying
and pasting that code into my new project gives a seg fault. I am
using fog 0.7.1 in my gemfile. I am using ruby-1.9.2-p136 on both
projects. Essentially I alter an already working uploader to try to
use s3 like this:
class VideoUploader < CarrierWave::Uploader::Base
storage :s3
def store_dir
"#{ENV['RAILS_ENV']}/assets/#{model.class.to_s.underscore}/
#{
model.id}"
end
end
CarrierWave.configure do |config|
config.root = Rails.root.join('tmp')
config.cache_dir = 'carrierwave'
config.s3_access_key_id = 'XXXX'
config.s3_secret_access_key = 'XXXX'
config.s3_bucket = 'XXXX'
end
This crashes my server with a seg fault, the last few lines of the
trace are:
/Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/excon-0.6.0/lib/excon/
connection.rb:220: [BUG] Segmentation fault
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.6.0]
-- control frame ----------
c:0098 p:---- s:0521 b:0521 l:000520 d:000520 CFUNC :connect
c:0097 p:0372 s:0518 b:0518 l:000517 d:000517 METHOD /Users/nic/.rvm/
gems/ruby-1.9.2-p136@hci/gems/excon-0.6.0/lib/excon/connection.rb:220
c:0096 p:0030 s:0512 b:0509 l:000508 d:000508 METHOD /Users/nic/.rvm/
gems/ruby-1.9.2-p136@hci/gems/excon-0.6.0/lib/excon/connection.rb:239
c:0095 p:0580 s:0506 b:0506 l:000505 d:000505 METHOD /Users/nic/.rvm/
gems/ruby-1.9.2-p136@hci/gems/excon-0.6.0/lib/excon/connection.rb:126
c:0094 p:0100 s:0491 b:0491 l:000490 d:000490 METHOD /Users/nic/.rvm/
gems/ruby-1.9.2-p136@hci/gems/fog-0.7.1/lib/fog/core/connection.rb:20
c:0093 p:0106 s:0483 b:0483 l:000482 d:000482 METHOD /Users/nic/.rvm/
gems/ruby-1.9.2-p136@hci/gems/fog-0.7.1/lib/fog/storage/aws.rb:323
Thanks,
-Nic