So you’ve tried
sudo gem install rjb
and it just won’t work?
How about:
export JAVA_HOME='/System/Library/Frameworks/JavaVM.framework/Home' sudo gem install rjb
Still won’t work?
That’s because sudo won’t inherit the JAVA_HOME variable. Try this:
sudo su - export JAVA_HOME='/System/Library/Frameworks/JavaVM.framework/Home' gem install rjb
…now enjoy the RJB gem. :)
We frequently deploy on BSD based operating systems. However, sometimes we need to deploy on CentOS. Here are the steps we take to deploy on a freshly installed CentOS 4.5 box:
rpm --import /usr/share/rhn/RPM-GPG-KEY up2date -u up2date -i yum yum update # the following line will change based on the most recent version of rpmforge... rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm cd /etc/yum.repos.d wget http://dev.centos.org/centos/4/CentOS-Testing.repo yum --enablerepo=c4-testing install ruby ruby-docs ri ruby-libs ruby-mode irb rdoc ruby-devel
The new Testing repo will allow us to install a newer version of Ruby. Continuing on…
yum install ruby ruby-devel ruby-libs irb yum install subversion yum install pound yum install httpd yum install gcc wget http://rubyforge.org/frs/download.php/28174/rubygems-0.9.5.tgz tar xvfz rubygems-0.9.5.tgz cd rubygems-0.9.5 ruby setup.rb gem install rails --include-dependencies gem install mongrel --include-dependencies gem install mongrel_cluster --include-dependencies
Then we modify apache to listen on port 8000, deploy the app, start everything up and we are good to go. Of course you’ll need to modify the ports to suit your configuration for mongrel and apache. Your mileage may also vary depending on the gems you need to install.
