![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I wanted system-wide RVM. The idea of having RVM install different version of ruby into my home directory strikes me as a bit odd.
Anyways, I also ran into problems with getting Passenger to install - somewhere along the steps of getting RVM installed, then Ruby 1.9.1, I messed up the gem paths or used sudo when I shouldn't have used sudo. So I had problems running passenger-install-apache2-module. I kept getting the error:
/usr/lib/ruby/1.8/rubygems.rb:636:in `report_activate_error': Could not find RubyGem passenger (>= 0) (Gem::LoadError)
from /usr/lib/ruby/1.8/rubygems.rb:141:in `activate'
from /usr/lib/ruby/1.8/rubygems.rb:49:in `gem'
from /usr/bin/passenger-spawn-server:18
gem list said it was installed.
However, I discovered that Gem.path was terribly messed up and didn't match gem env at all. When running
$ ruby -r RubyGems -e "p Gem.path"
I got really strange path that had 1.9.1 in it, despite having 1.9.2 installed.
$ gem env
...
- GEM PATHS:
- /usr/local/rvm//gems/ruby-1.9.2-p0
- /usr/local/rvm//gems/ruby-1.9.2-p0@global
...
Anyways, in the end, I used a combination of:
http://rvm.beginrescueend.com/rvm/install/
+
http://rvm.beginrescueend.com/deployment/system-wide/
$ Sudo su
first, to get into a root shell, followed by
$ bash
Then I followed the normal installation steps - that installed rvm into /usr/local/rvm
Created /etc/rvmrc:
# Setup default configuration for rvm.
# If an rvm install exists in the home directory, don't load this.'
if [[ ! -s "\$HOME/.rvm/scripts/rvm" ]]; then
umask g+w
export rvm_selfcontained=0
export rvm_prefix="/usr/local/rvm"
export rvm_path="/usr/local/rvm"
fi
Added the following to /etc/profile:
# Load RVM if it is installed,
# first try to load user install
# then try to load root install,
# if user install is not there.
if [ -s "$HOME/.rvm/scripts/rvm" ] ; then
. "$HOME/.rvm/scripts/rvm"
elif [ -s "/usr/local/rvm/scripts/rvm" ] ; then
. "/usr/local/rvm/scripts/rvm"
fi
Added the following to ~/.profile
export rvm_path="/usr/local/rvm"
[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/scripts/rvm" # This loads RVM into a shell session.
Anyways, I also ran into problems with getting Passenger to install - somewhere along the steps of getting RVM installed, then Ruby 1.9.1, I messed up the gem paths or used sudo when I shouldn't have used sudo. So I had problems running passenger-install-apache2-module. I kept getting the error:
/usr/lib/ruby/1.8/rubygems.rb:636:in `report_activate_error': Could not find RubyGem passenger (>= 0) (Gem::LoadError)
from /usr/lib/ruby/1.8/rubygems.rb:141:in `activate'
from /usr/lib/ruby/1.8/rubygems.rb:49:in `gem'
from /usr/bin/passenger-spawn-server:18
gem list said it was installed.
However, I discovered that Gem.path was terribly messed up and didn't match gem env at all. When running
$ ruby -r RubyGems -e "p Gem.path"
I got really strange path that had 1.9.1 in it, despite having 1.9.2 installed.
$ gem env
...
- GEM PATHS:
- /usr/local/rvm//gems/ruby-1.9.2-p0
- /usr/local/rvm//gems/ruby-1.9.2-p0@global
...
Anyways, in the end, I used a combination of:
http://rvm.beginrescueend.com/rvm/install/
+
http://rvm.beginrescueend.com/deployment/system-wide/
$ Sudo su
first, to get into a root shell, followed by
$ bash
Then I followed the normal installation steps - that installed rvm into /usr/local/rvm
Created /etc/rvmrc:
# Setup default configuration for rvm.
# If an rvm install exists in the home directory, don't load this.'
if [[ ! -s "\$HOME/.rvm/scripts/rvm" ]]; then
umask g+w
export rvm_selfcontained=0
export rvm_prefix="/usr/local/rvm"
export rvm_path="/usr/local/rvm"
fi
Added the following to /etc/profile:
# Load RVM if it is installed,
# first try to load user install
# then try to load root install,
# if user install is not there.
if [ -s "$HOME/.rvm/scripts/rvm" ] ; then
. "$HOME/.rvm/scripts/rvm"
elif [ -s "/usr/local/rvm/scripts/rvm" ] ; then
. "/usr/local/rvm/scripts/rvm"
fi
Added the following to ~/.profile
export rvm_path="/usr/local/rvm"
[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/scripts/rvm" # This loads RVM into a shell session.
re:
Date: 2011-01-08 07:00 pm (UTC)provides access
Date: 2011-01-18 12:08 am (UTC)