1
votes

I am actually running phusion passenger on ubuntu for a while. today i updated Ruby Enterprise Edition to the latest version - now it seems i have to reinstall all the gems that were installed on the system. so here are my questions

  • what is the best way to setup phusion passenger and ruby enterprise edition to easily maintain gems afterwards, even if a new Ruby Enterprise Edition gets released?
  • should gems be installed from the root user or from a system user (user .gem directory) - what would be the best practice here?
2

2 Answers

0
votes

i now did the following to make maintainability more easy on my system (any comments welcome, as i am not sure if that is the best practice)

  • uninstall all gems as the root user: gem list --no-versions | xargs gem uninstall -a -I
  • install passenger as root user (via /opt/REE/bin/gem install passenger ) - i also had to install 'rake'
  • made a symlink from /opt/REE to the latest ruby enterprise version dir
  • run /opt/REE/bin/passenger-install-apache2-module as the root user
  • added the loadmodule directives to /etc/apache2/apache2.conf
  • create a user phusion passenger runs under and change his path to 1) ruby system binary directory 2) user specific gem binary directory

    PATH=$PATH:/home//.gem/ruby/1.8/bin:/opt/ruby-enterprise-1.8.7-2010.01/bin

(i changed that settings in .bash_profile and switch to the user with su username -l ) most of the gems i maintain now within the packages (frozen). except rails, which is installed on the system.

is there anoter (better) way? how are other people doing this kind of system maintainance?

0
votes

I wonder if you could use GEM_HOME like jruby does? I haven't tried it but it seems that it would be elegant.