ruby aws-s3的替代品

时间:2013-02-06 17:17:51

标签: ruby amazon-s3 install

是否有替代ruby aws-s3 我安装了aws-s3(gem install aws-s3),但是当我运行脚本时出错了

ruby s3Metadata.rb
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in    
'gem_original_require': /usr/lib/ruby/gems/1.8/gems/builder-3.1.4/lib/builder/xmlbase.rb:183:  
syntax error, unexpected ',', expecting '|' (SyntaxError)   
        define_method(sym) do |*args, &block|    
                                     ^   
/usr/lib/ruby/gems/1.8/gems/builder-3.1.4/lib/builder/xmlbase.rb:192: syntax error,    unexpected kEND, expecting $end  from /usr/local/lib/site_ruby/1.8/rubygems   /custom_require.rb:31:in 'require'    
    from /usr/lib/ruby/gems/1.8/gems/builder-3.1.4/lib/builder/xmlmarkup.rb:14   
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in    'gem_original_require'   
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in 'require'   
    from /usr/lib/ruby/gems/1.8/gems/builder-3.1.4/lib/builder.rb:12   
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in    'gem_original_require'   
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in 'require'   
    from /usr/lib/ruby/gems/1.8/gems/aws-s3-0.6.3/lib/aws/s3/extensions.rb:159:in    'require_library_or_gem'   
    from /usr/lib/ruby/gems/1.8/gems/aws-s3-0.6.3/lib/aws/s3.rb:12   
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in    'gem_original_require'   
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in 'require'   
    from s3Metadata.rb:4`   

s3Metadata.rb:4   = `require 'aws/s3'
用Google搜索但没有解决方案....
我需要运行脚本来更新/添加亚马逊S3中的一些元数据。

aws-s3 (0.6.3)
有旧版本的红宝石ruby 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux]
我无法升级它会搞砸很多东西。是否有解决方案或替代ruby aws-s3?

2 个答案:

答案 0 :(得分:2)

The Rightscale AWS gem也有s3支持。

答案 1 :(得分:1)

亚马逊提供了名为aws-sdk的宝石。我不能保证它适用于1.8.6,使用这样一个古老版本的Ruby我认为你最好的选择是安装任何宝石的早期版本,因为很多版本将在最近的版本中转移到1.9。