Friday, July 27, 2012

The rvmrc located in '/x/y/z/path' could not be loaded, likely due to trust mechanisms. Please run 'rvm rvmrc {trust,untrust} '/x/y/z/path'' to continue, or set rvm_trust_rvmrcs_flag to 1. (RVM::ErrorLoadingRVMRC)


Environment:
Rails 3.2.6
ruby 1.9.3p194
Phusion Passenger version 3.0.13


Error message:
The rvmrc located in '/x/y/z/path'
could not be loaded, likely due to trust mechanisms. Please run 'rvm rvmrc
{trust,untrust} '/x/y/z/path'' to
continue, or set rvm_trust_rvmrcs_flag to 1. (RVM::ErrorLoadingRVMRC)

Problem:
Unknown, don't know what this is happening


Fix:
1. cd to /x/y/z/path and run `rvm rvmrc trust` on the command line, restart apache (this didn't work for me)
2. add rvm_trust_rvmrcs_flag=1 to ~/.rvmrc, restart apache (this worked for me)

Friday, July 13, 2012

You have already activated rack (gem name) 1.4.1(gem version), but your Gemfile requires rack (gem name) 1.3.6 (gem version)

Error message:
You have already activated rack (gem name) 1.4.1(gem version), but your Gemfile requires rack (gem name) 1.3.6 (gem version)

This could be any gem and any version, this is just my example using the rack gem.


Problem:
On my production machine I am using passenger 3.0.13 and it requires rack 1.4.1. In my Gemfile I am using Rails 3.1.3. Unfortunately rails 3.1.3 uses actionpack (and others) which depends on rack 1.3.6. I am not using rvm so rack 1.4.1 loads when passenger loads and therefore is loaded before rack 1.3.6. Since you can't have more than one version running, I get the error. Makes since, right?


Fix:
There are multiple possible fixes.
1. install rvm and add a gemset
2. (the one that I used) I decided to just upgrade rails to 3.2.6. This uses rack 1.4.1 and now all is happy :)
3. downgrade passenger to a version that uses rack 1.3.6