I'm trying to install RVM with Amazon OpsWorks using the following cookbook https://github.com/fnichol/chef-rvm. I want rvm to run under the user tomcat6, so I included the recipe rvm::user with the correct attributes.
The error I'm getting is:
Wed, 06 Mar 2013 20:05:05 +0000 ERROR: Running exception handlers Wed, 06 Mar 2013 20:05:05 +0000 ERROR: Exception handlers complete Wed, 06 Mar 2013 20:05:05 +0000 DEBUG: Re-raising exception: LoadError - no such file to load -- rvm /opt/aws/opsworks/current/site-cookbooks/rvm/recipes/default.rb:29:in
require' /opt/aws/opsworks/current/site-cookbooks/rvm/recipes/default.rb:29:in
from_file'
And the piece of code raising the exception is:
chef_gem 'rvm' do
action :install
version '>= 1.11.3.6'
end
ruby_block "require rvm" do
block do
require 'rvm'
create_rvm_shell_chef_wrapper
create_rvm_chef_user_environment
end
action :create
end
After getting the error I logged in the instance with ssh and checked whether or not the rvm gem was installed. I could not see rvm listed under * LOCAL GEMS *.
Then I replaced the method chef_gem with gem_package and still got the same error. But this time when I checked gem list rvm was listed.
Any help? Thanks in advance.