Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 libruby.so.1.9 gets added to /usr/lib.

The problem is that require 'mysql' fails during the chef run because it's looking for libruby-1.9.1.so.1.9 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

1 Answer 1

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

 
discard

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.