title: How to use a RVM cookbook together with Passenger?
body: <p>I am trying to setup a cookbook for RVM with Chef-solo.</p>
  
  <p>My run_list looks like:</p>
  
  <pre>
    "run_list": [
      "recipe[apt]",
      "recipe[build-essential]",
      "recipe[curl]",
      "recipe[users]",
      "recipe[rvm::vagrant]",
      "recipe[rvm::system]",
      "recipe[nginx::passenger]",
      "recipe[nginx::source]",
      "recipe[postgresql::server]",
      "recipe[postgresql::client]"
    ]
  </pre>
  
  <p>My attributes for RVM and Nginx:</p>
  
  <pre>
    "rvm": {
      "rubies": ["1.9.3-p0"],
      "global": ["1.9.3-p0"],
      "vagrant": { "system_chef_solo" : "/opt/ruby/bin/chef-solo" },
      "gems": {
        "1.9.3-p0": [
          {"name": "bundler"},
          {"name": "passenger"},
          {"name": "rake"}
        ]
      }
    },
  
    "nginx": {
      "version": "1.2.5",
      "user": "deploy",
      "init_style": "init",
      "modules": [
        "http_stub_status_module",
        "http_ssl_module",
        "http_gzip_static_module"
      ],
      "passenger": {
        "version": "3.0.18"
      },
      "configure_flags": [
        "--add-module=/var/lib/gems/1.9.1/gems/passenger-3.0.18/ext/nginx"
      ],
      "gzip_types": [
        "text/plain",
        "text/html",
        "text/css",
        "text/xml",
        "text/javascript",
        "application/json",
        "application/x-javascript",
        "application/xml",
        "application/xml+rss"
      ]
    },
  
  </pre>
  
  <p>However, the conversion breaks with:</p>
  
  <pre>
  
  ================================================================================
  
  Error executing action `install` on resource 'gem_package[passenger]'
  
  ================================================================================
  
  
  Gem::InstallError
  
  -----------------
  
  passenger requires rake (>= 0.8.1)
  
  
  Resource Declaration:
  
  ---------------------
  
  # In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/nginx/recipes/passenger.rb
  
   53: gem_package 'passenger' do
   54:   action :install
   55:   version node["nginx"]["passenger"]["version"]
   56:   gem_binary node["nginx"]["passenger"]["gem_binary"] if node["nginx"]["passenger"]["gem_binary"]
   57: end
   58: 
  
  Compiled Resource:
  
  ------------------
  
  # Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/nginx/recipes/passenger.rb:53:in `from_file'
  
  gem_package("passenger") do
    version "3.0.18"
    package_name "passenger"
    provider Chef::Provider::Package::Rubygems
    retry_delay 2
    action [:install]
    retries 0
    recipe_name "passenger"
    cookbook_name :nginx
  end
  
  ....
  
  /opt/ruby/lib/ruby/gems/1.8/gems/chef-10.18.2/bin/../lib/chef/application/solo.rb:216:in `run_application'
  /opt/ruby/lib/ruby/gems/1.8/gems/chef-10.18.2/bin/../lib/chef/application.rb:72:in `run'
  /opt/ruby/lib/ruby/gems/1.8/gems/chef-10.18.2/bin/chef-solo:25
  /opt/ruby/bin/chef-solo:19:in `load'
  /opt/ruby/bin/chef-solo:19
  [2013-02-26T14:22:18+00:00] FATAL: Gem::InstallError: gem_package[passenger] (nginx::passenger line 53) had an error: Gem::InstallError: passenger requires rake (>= 0.8.1)
  Chef never successfully completed! Any errors should be visible in the
  output above. Please fix your recipes so that they properly complete.
  
  </pre>
  
  <p>What can be done?</p>