I am writing a recipe for installing and going back from ruby enterprise
edition to regular ruby in ubuntu. The guys at brightbox provide a nice apt
repo for ree. In that repo ree is packaged to overwrite regular ruby
The recipe that installs ruby enterprise from regular ruby basically adds a
file to /etc/apt/sources.list.d/ruby-ee with the repository parameters, this
notifies imediately an apt-get update, and then I have the following code
that tries to install ruby.
packages = %w(ruby ruby-dev rubygems libopenssl-ruby libreadline-ruby
librmagick-ruby librmagick-ruby1.8 rubygems1.8 ruby1.8 ruby1.8-dev
libopenssl-ruby1.8 librmagick-ruby1.8 libruby1.8)
packages.each do |p|
package p do
action [ :install, :upgrade ]
The reverse operation is performed in a similar way, I just check if ree is
installed, then I remove the /etc/apt/sources.list.d/ruby-ee file, apt-get
update, and the code above.
My problem: chef does not notice the change (apt-cache show ruby gives the
Is this a problem on how chef handles the apt resource?
Should I pass an extra parameter to the package resource to force the
Jacobo García López de Araujo