When I enter my rails dir on server RVM switch to
/home/capistrano/.rvm/gems/ruby-1.9.2-p290@global/bin/bundle
although it should use ruby-1.9.2-p290@mygemset/bin/bundle as it works on my local machine. When I type rvm use 1.9.2@mygemset it works. Nginx server is also looking for gems in the @global gemset
my .rvmrc file:
environment_id="ruby-1.9.2-p290@mygemset"
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
then
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]]
then
. "${rvm_path:-$HOME/.rvm}/hooks/after_use"
fi
else
# If the environment file has not yet been created, use the RVM CLI to select.
if ! rvm --create use "$environment_id"
then
echo "Failed to create RVM environment '${environment_id}'."
return 1
fi
fi
RVM is going through rapid develpment so the syntax and functionality of commands sometimes vary. Anyway, I solved it with upgrading to stable RVM:
which is now
rvm 1.14.1 (stable). Afterwards commands likervm 1.9.3-p194@mygemset --create
works perfectly.Another thing I was missing is the new syntax for executing commands:
This will install all gems for given gemset and ruby specified in .rvmrc file