Ruby:AWS-SDK错误安装

时间:2014-08-12 00:37:00

标签: ruby-on-rails ruby amazon-web-services amazon-ec2 aws-sdk

我最近跟着this guide在我的EC2服务器上安装了rails。我现在要弄清楚的是如何安装rails aws-sdk(我甚至需要?)。

当我运行“gem install aws-sdk”时,我收到以下错误:

  

gem install aws-sdk

Building native extensions.  This could take a while...
ERROR:  Error installing aws-sdk:
        ERROR: Failed to build gem native extension.

    /usr/bin/ruby2.0 extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/ruby/include/ruby.h


Gem files will remain installed in /usr/local/share/ruby/gems/2.0/gems/nokogiri-1.6.3.1 for inspection.
Results logged to /usr/local/share/ruby/gems/2.0/gems/nokogiri-1.6.3.1/ext/nokogiri/gem_make.out

我不确定该怎么做......

1 个答案:

答案 0 :(得分:0)

除非您从Rails应用程序直接向AWS发出API调用,否则不需要aws-sdk gem。如果您要将文件上传到Amazon S3,连接到Amazon DynamoDB或使用Amazon Simple Email Service发送电子邮件,这种情况很常见。

如果您要开始使用aws-sdk,我强烈建议您使用版本2 SDK。它只依赖于纯Ruby gem,因此您不会遇到这些gem安装失败。