rubygems - Ruby: no such file to load -- EC2 -
i using script website: http://dysinger.net/2008/10/13/using-amazon-ec2-metadata-as-a-simple-dns/ have phpperson , know pretty much nil ruby. anyway using scipt on ec2 instance amazon linux, installed ruby , rubygems yum, , did
gem install amazon-ec2
$ gem list:
*** local gems *** amazon-ec2 (0.9.17) rubygems-update (1.8.25) xml-simple (1.1.2)
looks good, when run script get:
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file load -- ec2 (loaderror) /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' /usr/local/sbin/hosts:2 /usr/local/sbin/hosts:2:in `each' /usr/local/sbin/hosts:2
...why? tried figure 1 hr still have no idea.
the blog post little bit outdated. in order utilize amazon-ec2 gem, need require 'aws'
, not require 'ec2'
. means have alter sec line to:
%w(optparse rubygems aws resolv pp).each {|l| require l}
you have alter line:
ec2::base.new(options).describe_instances # etc...
to
aws::ec2::base.new(options).describe_instances # etc...
ruby rubygems amazon-ec2
No comments:
Post a Comment