Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Apologies for any incorrect terminology.

I'm using Chef to automate server deployment.

I've built an AMI that has Ruby 1.9.3 compiled from source and then chef takes over from that point.

When ruby is compiled from source gets added to /usr/lib.

The problem is that require 'mysql' fails during the chef run because it's looking for which does not exist.

I can fix this by running sudo apt-get install libruby1.9.1 but I think there's probably a more elegant solution, ideally one that I can add to the AMI or the chef deploy that fixes this.

Any ideas?

share|improve this question

The Right Way to do this is to install Ruby from a package instead of from source. Based on the changelog for the ruby1.9.1 package in Ubuntu 12.04, it's actually version 1.9.3p0 even though the package name implies it is 1.9.1. If you're compiling from source because you need 1.9.3 you should simply use the packages from Ubuntu. If there's another reason you're compiling from source, try to find an Ubuntu package or build the package yourself.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.