Adrian Moya's picture

I just saw in other post that Alon suggested TKLPatching an instalation of Ruby Enterprise. I just took the first part of my Gitorious TKLPatch and converted it to a TKLPatch that can be used as base for installing other Ruby projects. This patch is for turnkey-core-beta-lucid-x86.

Hope it's usefull! 


* Ruby Enterprise 1.8.7 

* RubyGems 1.3.7

* Passenger 2.2.15

* SSL Support Enabled.

* Apache Rewrite module enabled (convenience)

What it Does:

1. Download and installs Ruby Enterprise & RubyGems 1.3.7. Creates symlinks to usr/bin

# Install Ruby Enterprise and RubyGems
dpkg -i ruby-enterprise_1.8.7-2010.02_i386_ubuntu10.04.deb
rm ruby-enterprise_1.8.7-2010.02_i386_ubuntu10.04.deb
ln -s /usr/local/bin/ruby /usr/bin/ruby
tar xf rubygems-1.3.7.tgz
cd rubygems-1.3.7/
ruby setup.rb
ln -s /usr/local/bin/gem /usr/bin/gem
cd /root/
rm -Rf rubygems-1.3.7/

2. Installs apache, passenger and apache modules

install build-essential apache2-mpm-prefork apache2-prefork-dev libapr1-dev libaprutil1-dev ssl-cert
gem install --no-ri --no-rdoc --version 2.2.15 passenger
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/bin/passenger-install-apache2-module -a
echo "LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/" > /etc/apache2/mods-available/passenger.load
echo "<IfModule mod_passenger.c>" > /etc/apache2/mods-available/passenger.conf
echo "   PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15" >> /etc/apache2/mods-available/passenger.conf
echo "   PassengerRuby /usr/local/bin/ruby" >> /etc/apache2/mods-available/passenger.conf
echo "</IfModule>" >> /etc/apache2/mods-available/passenger.conf
a2enmod passenger
a2enmod rewrite  
a2enmod ssl 
a2ensite default-ssl
service apache2 restart
3. Clean up apt cache

Add MySQL too into the build as it is normally required in most applications

Liraz Siri's picture

Ruby Enterprise looks like a drop in replacement for Ruby that is more memory efficient so we'll have to look into the pros and cons of using it in our standard Ruby on Rails appliance.

(edited to remove foot from mouth)

Add new comment