Can’t install RMagick 2.13.1. Can’t find Magick-config

Problem

You are trying to install rmagick in an Ubuntu 12.04 virtual box, but you get the following error:

Can't install RMagick 2.13.1. Can't find Magick-config

Solution

Make sure you install both the imagemagick and the libmagickwand-dev packages with either apt-get :

sudo apt-get install imagemagick libmagickwand-dev

or in a puppet script as:

package {
  "imagemagick":
    ensure => installed
}

package {
  "libmagickwand-dev":
    ensure  => installed
}

$rvm_path (/home/ubuntu/.rvm/) does not exist. error

Problem

When you want to use the capistrano recipe to deploy to a vagrant virtual box as described in ‘Deploying Rails’, and after you have corrected the rvm_path as described here, you get the following error message:

$rvm_path (/home/ubuntu/.rvm/) does not exist.

Solution

Make sure that after adding the rvm_path add also the following to the deploy.rb file, since rvm is installed system wide.

set :rvm_type, :system

Suggestion from here.

.rvm/bin/rvm-shell: No such file or directory error

Problem

When trying to set up the capistrano deploy recipe to deploy to the vagrant virtual box as described in ‘Deploying rails’, you get the error:

.rvm/bin/rvm-shell: No such file or directory

when you have installed rvm system wide on the virtual box.

Solution

Make sure that you add the following into your deploy.rb file to set up the path for rvm:

set :rvm_bin_path, "/usr/local/rvm/bin"

Solution taken from here