A collection of computer systems and programming tips that you may find useful.
 
Brought to you by Craic Computing LLC, a bioinformatics consulting company.

Tuesday, January 27, 2009

AWS EC2 ec2-bundle-vol and Ruby problem

When you want to bundle an image on an Amazon Web Services EC2 node you run the 'ec2-bundle-vol' script. This is a Ruby script that performs all sorts of magic.

Be aware of the following problem if you install your own version of Ruby

I'm running a Fedora Core 8 node and the latest version of Ruby that I can get using the yum updater is 1.8.6 - but I want 1.8.7 - so I installed from source into /usr/local/bin. I have /usr/local/bin ahead of /usr/bin in my path so I get to see the 1.8.7 version and I can leave the old version alone.

But when I try to bundle an EC2 image I get this:
# ec2-bundle-vol
/usr/lib/site_ruby/ec2/amitools/bundlevol.rb:11:in `require': no such file to load -- ec2/amitools/bundle (LoadError)


The problem appears to be tied to the new version. I can fix it by temporarily changing my path so that I pick up the 1.8.6 version of Ruby
# PATH=/usr/bin:$PATH

And now the command works... of course you will need to run the command with your certificates etc. You will probably see a verbose message about rsync exiting with an error code - ignore it.

Follow that with a call to ec2-upload-bundle

Make sure you reset your path after this so you can get the latest version of Ruby. I guess you can also rename /usr/bin/ruby (1.8.6) and then symlink in the 1.8.7 version.

I have so many issues with installing separate versions of ruby on Mac and Linux systems. All I really want to do is be able to upgrade the default installation to the latest version. Not sure why that is so difficult with yum, etc.

4 comments:

സന്തോഷ്. said...

Awsome..!

Works like a charm...! Thanks for this post. I was just behind this stupid error since last few hours though all my other settings looks ok for bundle-vol. Thanks Again

Santhosh.

സന്തോഷ്. said...

Awsome..!

Works like a charm...! Thanks for this post. I was just behind this stupid error since last few hours though all my other settings looks ok for bundle-vol. Thanks Again

Santhosh.

brinkka said...

I recently came across your blog and have been reading along. I think I will leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
By : http://www.factspenisenlargement.com

Blogger said...

You could be eligible to get a $1,000 Amazon Gift Card.

Archive of Tips