ITコンサルティング企業で働く男のAWS日記

AWS(Amazon Web Services )についての個人的な備忘録です。

AmazonLinuxでAWS SDK for Rubyを使うときにnokogiri とかlibxml2とかでいつものようにハマる

Installing the aws-sdk gem on EC2 (using the Amazon Linux AMI) https://gist.github.com/trevorrowe/1870314

 

yum install -y gcc make libxml2 libxml2-devel libxslt libxslt-devel rubygems ruby-devel
gem install nokogiri -- --with-xml2-lib=/usr/local/lib --with-xml2-include=/usr/local/include/libxml2 --with-xslt-lib=/usr/local/lib --with-xslt-include=/usr/local/include

↑これのあとで↓これをやればOK

 

  gem install nokogiri -- --use-system-libraries

 

gem install aws-sdk --no-ri --no-rdoc