1

是否有 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'

谷歌搜索但没有解决方案....
我需要运行脚本来更新/添加亚马逊 S3 中的一些元数据。

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

4

2 回答 2

2

Rightscale AWS gem也支持 s3。

于 2013-02-06T17:37:28.300 回答
1

亚马逊提供了他们自己的 gem,叫做aws-sdk. 我不能保证它可以在 1.8.6 中工作,对于如此古老的 Ruby 版本,我认为您最好的选择是安装任何 gem 的非常早期版本,因为在更新的版本中很多人会迁移到 1.9。

于 2013-02-06T20:32:02.387 回答