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)

maec's picture

Any notions on when the standard RoR appliance will be updated once the new TKL core is out of beta?

The Rails appliance is excellent now, and REE would make it even better.

Another consideration is that Rails 3 is near.

Liraz Siri's picture

We're aiming to start pushing out updates within a few weeks.

Rails 3 was recently released (Aug 29). The new rails appliance will be based on it. REE is available as a package for Ubuntu 10.04 so if we don't run into too many issues there's a good chance we'll include it in the upcoming release as well.

Adrian Moya's picture

I've never downloaded the rails appliance, but I thought of updating this appliance earlier. As you know, I'm a big fan of rails (although I haven't made my first app with it!). Is it intended to be a rails dev env for developing? or a rails production env for deploying a final app? 

If it is intended to be a dev env, I think it's a must to setup rvm so to have multiple versions of ruby to test the app against it. 

As a production environment I don't see it very useful. Every rails app should bundle it's own rail under the vendor folder. I don't think of deploying to Rails app using the same system-wide rails gems. 

That's why I ultimately left this out of my queue of work! I'd like to help with this one if you can clarify how is it to be used. (ahhhh that short screencast telling you how to use your tkl appliance is missing! :P)

maec's picture


With the liberal use of virtual machines, I think the appliance can work for both purposes, in its current form.

My production use for the appliance is as an "end user", e.g. deployment of a single in-house application, rather than as a hosting platform. So a single static version of Ruby/Rails is fine. Any upgrade of either, or any other component, would be deployed to another virtual machine. A single machine instance dedicated to a single application.

And the appliance could also be used, again as a vm, for a quick, standard development setup on a pc or mac, so rvm would be a useful addition.

I'm more from the application side than system admin, but glad to help out if I can.

Add new comment