apt-get update
apt-get install build-essential bison openssl libreadline5 libreadline5-dev \
curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 \
libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
echo '[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
source ~/.bash_profile
Apparently, you need to first install 1.8.7.
rvm install 1.8.7
rvm use 1.8.7
rvm install 1.9.2
rvm use 1.9.2 --default
curl -OL http://rubyforge.org/frs/download.php/74886/rubygems-1.8.3.tgz
tar zxf rubygems-1.8.3.tgz
cd rubygems-1.8.3/
ruby setup.rb
The following line gets rid of deprecation warnings, should you get those.
gem pristine --all --no-extensions
Finally, make bundler available to all gemsets.
rvm use 1.9.2@global
gem i bundler
Install whatever the Passenger install script asks you to.
gem i passenger
passenger-install-apache2-module
At the end, the install script gives you three lines for your Apache config. Put the first line into mods-available/passenger.load
in the Apache 2 directory, and the other two into passenger.conf
in the same directory (wrapped in <IfModule mod_passenger.c>
if you like). Then enable it.
a2enmod passenger
/etc/init.d/apache2 restart