Adrian
Adrian

Reputation: 734

RVM error with deploying Rails app via Capistrano

History:

I then decided to do a proper deployment and setup for GIT/cap deploy as per "Agile Web Development with Rails".

The situation now is:

For foo, .bashrc contains the last line:

[[ -s '/usr/local/lib/rvm' ]] && source '/usr/local/lib/rvm'

When I issue:

type rvm | head -1

the response is "rvm is a function".

/etc/rvmrc contains

if [[ ! -s "$HOME/.rvm/scripts/rvm" ]]; then
  umask g+w
  export rvm_selfcontained=0
  export rvm_prefix="/usr/local/"
fi

Running out of ideas here, and hoping for some suggestions.

Upvotes: 24

Views: 13843

Answers (3)

engineerDave
engineerDave

Reputation: 3935

I just wanted to add to @imonyse's comment.

the head branch of rvm might be a tad too unstable for some deploys. I know our deprecated SLES boxes have a tendency to choke on it. It might be advisable to get the most recent stable version.

rvm get stable

Also don't do this on a really old server running production code as it may have undesired consequences.

Upvotes: 0

imonyse
imonyse

Reputation: 151

It seems like rvm-shell is not in your rvm install directory. Run this command

rvm get head

Then you'll get it right in your rvm bin directory.

Upvotes: 5

mpapis
mpapis

Reputation: 53158

Next time try to add this in your capistrano:

set :rvm_type, :system

Upvotes: 78

Related Questions