<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Simone Carletti&#039;s Blog &#187; multiruby</title>
	<atom:link href="http://www.simonecarletti.com/blog/tags/multiruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simonecarletti.com/blog</link>
	<description>Simone Carletti&#039;s personal ramblings on programming, syndication, search engines &#38; marketing.</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:48:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adding Ruby Enterprise Edition to multiruby versions</title>
		<link>http://www.simonecarletti.com/blog/2009/06/adding-ruby-enterprise-edition-to-multiruby-versions/</link>
		<comments>http://www.simonecarletti.com/blog/2009/06/adding-ruby-enterprise-edition-to-multiruby-versions/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 06:58:28 +0000</pubDate>
		<dc:creator>Simone Carletti</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[multiruby]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby enterprise edition]]></category>

		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=380</guid>
		<description><![CDATA[How to add Ruby Enterprise Edition to multiruby version and test a Ruby command across multiple versions of ruby all at once.]]></description>
			<content:encoded><![CDATA[<p>Like many other Rails developers, the most part of my Rails applications run on production with Apache, <a href="http://www.modrails.com">mod_rails</a> and <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a>. In fact, this environment has proved to be one of the most successful under many aspects.</p>
<p><strong>Ruby Enterprise Edition is a server-oriented friendly branch of Ruby which includes various enhancements</strong>. Although it should share more or less the same Ruby 1.8.6 behavior and be 100% compatible, you should never rely on assumptions when debugging your application.</p>
<p>Debugging an application running on Ruby Enterprise Edition can be a little tricky unless you don&#8217;t <strong>install Ruby Enterprise Edition on your local machine</strong>. However, this means you should either replace your favorite Ruby version or create a kind of switch to choose the Ruby interpreter you might want to use for that specific development session.</p>
<p>Taking this problem to an other level, many programmers started to have the same need as soon as they wanted to test their application against Ruby 1.8.x and Ruby 1.9. Fortunately, the solution already exists and it&#8217;s called <strong>multiruby</strong>.<span id="more-380"></span></p>
<p>Multiruby is an awesome tool crafted by <a title="Polishing Ruby" href="http://blog.zenspider.com/">Ryan Davis</a> that enables you to <a title="Testing for ruby 1.8 and 1.9 using multiruby - Polishing Ruby" href="http://blog.zenspider.com/2007/12/testing-for-ruby-18-and-19-usi.html">run the same ruby code across multiple versions of ruby</a> all at once. Off course, you can also run your application, debug your script or run your test against multiple ruby versions.</p>
<p>So, the next obvious step is to <strong>add Ruby Enterprise Edition to the list of multiruby versions</strong>. In this way you&#8217;ll be able to use Ruby EE on your local machine or execute the same piece of code with other Ruby interpreters.</p>
<p>Note. This tutorials assumes you are running a Unix based operating system like Linux or Mac OS X. This is my configuration:</p>
<ul>
<li>Mac OS X 10.5 Leopard</li>
<li>ZenTest 4.1.1</li>
<li>Ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]</li>
</ul>
<h2>Installing multiruby</h2>
<p>If you haven&#8217;t heard about multiruby yet, you should probably start reading <a title="Dr Nic’s Future proofing your Ruby code. Ruby 1.9.1 is coming." href="http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/">this excellent post by Dr Nic</a>.</p>
<p>In short, follow these steps.</p>
<p>To install multiruby, first install the <strong>ZenTest</strong> GEM. It should add <code>multiruby</code> and <code>multiruby_setup</code> binaries as well.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo gem install ZenTest<br />
<br />
Successfully installed ZenTest-4.1.1<br />
1 gem installed<br />
Installing ri documentation for ZenTest-4.1.1...<br />
Installing RDoc documentation for ZenTest-4.1.1...<br />
<br />
$ which multiruby<br />
/usr/bin/multiruby<br />
<br />
$ which multiruby_setup<br />
/usr/bin/multiruby_setup</div></td></tr></tbody></table></div>
<p>Download, build and install the default multiruby Ruby versions. Simply type the following command to have multiruby do the job for you.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">multiruby_setup the_usual</div></td></tr></tbody></table></div>
<p>Please note that this step might take a while. Be patient while your computer downloads the .tgz archives and performs the necessary operations.</p>
<p>At the end of the story, multiruby should probably have <strong>installed 3 Ruby versions</strong>: <strong>Ruby 1.8.6</strong>, <strong>Ruby 1.8.7</strong> and <strong>Ruby 1.9.1</strong>.</p>
<p>Run a simple command, for example <code>multiruby -e "p 1+1"</code>, just to make sure everything works as expected. You should end up with something like this.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ multiruby -e &quot;p 1+1&quot;<br />
<br />
VERSION = 1.8.6-p369<br />
CMD &nbsp; &nbsp; = ~/.multiruby/install/1.8.6-p369/bin/ruby -e p 1+1<br />
<br />
2<br />
<br />
RESULT = 0<br />
<br />
VERSION = 1.8.7-p173<br />
CMD &nbsp; &nbsp; = ~/.multiruby/install/1.8.7-p173/bin/ruby -e p 1+1<br />
<br />
2<br />
<br />
RESULT = 0<br />
<br />
VERSION = 1.9.1-p129<br />
CMD &nbsp; &nbsp; = ~/.multiruby/install/1.9.1-p129/bin/ruby -e p 1+1<br />
<br />
2<br />
<br />
RESULT = 0<br />
<br />
TOTAL RESULT = 0 failures out of 3<br />
<br />
Passed: 1.9.1-p129, 1.8.6-p369, 1.8.7-p173<br />
Failed:</div></td></tr></tbody></table></div>
<p>Great, it works! If you want to learn more about multiruby you should probably start reading <code>multiruby</code> and <code>multiruby_setup</code> documentation.</p>
<h2>Installing Ruby Enterprise Edition</h2>
<p>As you probably already noticed, you can add more Ruby versions using the <code>multiruby_setup</code> command. Unfortunately, you can&#8217;t actually use it to install Ruby Enterprise Edition because this version comes with a custom installer.</p>
<p>If you want to learn more about the problem, be sure to read the following section. Otherwise, simply skip to the <strong>Downloading Ruby Enterprise Edition section</strong> and you&#8217;ll find the steps to install Ruby EE without additional fuss.</p>
<h3>Under the hood of multiruby</h3>
<p>One of my biggest complain about multiruby is probably the lack of a good documentation. You can find many blog post and tutorial, but no comprehensive documentation neither about <code>multiruby</code> nor <code>multiruby_setup</code>.</p>
<p>What do you usually do when no documentation is available? Simple enough, you open the library and read the code!</p>
<p>I found the way multiruby detects ruby versions to be a bit obscure unless you are used to it. The are 4 subfolders in the <code>.multiruby</code> folder: tmp, <code>build</code>, <code>versions</code> and <code>install</code>.</p>
<p>All Ruby versions are located in the <code>install</code> subfolder and, if you store a new Ruby installation directly in this folder, it will be listed by the <code>multiruby_setup list</code> command. However, it turns out that if you try to run a command with <code>multiruby</code>, the version is simply ignored unless a corresponding <code>.tar</code> package exists in the <code>versions</code> folder.</p>
<p>And this is only a part of the story. The package in <code>versions</code> must be called <code>ruby-CUSTOM_VERSION.tgz</code> while the folder in <code>install</code> must be named exactly <code>CUSTOM_VERSION</code>. At least, this worked for me.</p>
<p>Be careful. Whenever you try to run a command with <code>multiruby</code>, it first compares the package in <code>versions</code> with the installed Ruby versions and if it founds a package without a corresponding folder in <code>install</code>, first it runs the installation process.</p>
<p>This is the reason why <strong>you should remove all Ruby Enterprise Edition installation files before running the very first script with multiruby</strong>.</p>
<h3>Downloading Ruby Enterprise Edition</h3>
<p>Download Ruby Enterprise Edition from Phusion website and move the package to the multiruby <code>versions</code> folder, usually located under your home directory at <code>.multiruby/versions</code>. Notice the <code>.</code> before the folder name: it&#8217;s a hidden folder, you might need to change your system settings to view it.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ wget http://www.rubyenterpriseedition.com/ruby-enterprise-1.8.6-20090610.tar.gz<br />
<br />
$ mv ruby-enterprise-1.8.6-20090610.tar.gz ~/.multiruby/versions</div></td></tr></tbody></table></div>
<p>Move the package to the multiruby version folder and decompress it.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ cd ~/.multiruby/versions<br />
$ tar -xzvf ruby-enterprise-1.8.6-20090610.tar.gz</div></td></tr></tbody></table></div>
<h3>Running Ruby Enterprise Edition Installer</h3>
<p>As I told you before, Ruby EE comes with its own installer. Run the script and answer the questions as follows.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ./ruby-enterprise-1.8.6-20090610/installer<br />
<br />
Welcome to the Ruby Enterprise Edition installer<br />
This installer will help you install Ruby Enterprise Edition 1.8.6-20090610.<br />
Don't worry, none of your system files will be touched if you don't want them<br />
to, so there is no risk that things will screw up.<br />
<br />
You can expect this from the installation process:<br />
<br />
&nbsp; 1. Ruby Enterprise Edition will be compiled and optimized for speed for this<br />
&nbsp; &nbsp; &nbsp;system.<br />
&nbsp; 2. Ruby on Rails will be installed for Ruby Enterprise Edition.<br />
&nbsp; 3. You will learn how to tell Phusion Passenger to use Ruby Enterprise<br />
&nbsp; &nbsp; &nbsp;Edition instead of regular Ruby.<br />
<br />
Press Enter to continue, or Ctrl-C to abort.<br />
<br />
Checking for required software...<br />
<br />
&nbsp;* C compiler... found at /usr/bin/gcc<br />
&nbsp;* C++ compiler... found at /usr/bin/g++<br />
&nbsp;* Zlib development headers... found<br />
&nbsp;* OpenSSL development headers... found<br />
&nbsp;* GNU Readline development headers... found<br />
--------------------------------------------</div></td></tr></tbody></table></div>
<p>The installer first checks your environment for <strong>required softwares</strong>. If a requirement is miss, the installation is aborted and you should install that library before running the installer again.</p>
<p>Once you have all dependencies installed, the installer asks for the <strong>target directory</strong>. This is the most important step of the entire tutorial: be sure to follow these instructions carefully.</p>
<p>The target folder must be called exactly as the ruby enterprise archive name, except for the <code>ruby</code> prefix that you must ignore. It should also points to the <code>.multiruby/install</code> folder.</p>
<p>Here&#8217;s the example for the package <code>ruby-enterprise-1.8.6-20090610.tar.gz</code> I&#8217;ve just downloaded before.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Target directory<br />
<br />
Where would you like to install Ruby Enterprise Edition to?<br />
(All Ruby Enterprise Edition files will be put inside that directory.)<br />
<br />
[/opt/ruby-enterprise-1.8.6-20090610] : /Users/weppos/.multiruby/install/enterprise-1.8.6-20090610<br />
--------------------------------------------</div></td></tr></tbody></table></div>
<p>As you can see, I specified the full qualified path instead of using the <code>~</code> shortcut for the home directory: <code>~/.multiruby/install/enterprise-1.8.6-20090610</code>.</p>
<p>Ok, you&#8217;re almost done. Now Ruby Enterprise Edition is going to be compiled and installed. As the installer notifies you, it&#8217;s going to take a while.<br />
Relax and take a coffee.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Compiling and optimizing the memory allocator for Ruby Enterprise Edition<br />
In the mean time, feel free to grab a cup of coffee.<br />
<br />
./configure --prefix=/Users/weppos/.multiruby/install/enterprise-1.8.6-20090610 --disable-dependency-tracking<br />
...</div></td></tr></tbody></table></div>
<h3>Compilation Errors/Warnings</h3>
<p>The installer doesn&#8217;t only install Ruby Enterprise Edition, but it also tries to install some common GEMs and libraries. Depending on your system configuration, you might be unable to get some of them.</p>
<p>For instance, Ruby Enterprise Edition hasn&#8217;t been able to install MySQL and PostgreSQL adapters on my computer due to the lack of some required libraries.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Installing mysql...<br />
/Users/weppos/.multiruby/install/enterprise-1.8.6-20090610/bin/ruby /Users/weppos/.multiruby/install/enterprise-1.8.6-20090610/bin/gem install -r --no-rdoc --no-ri --no-update-sources --backtrace mysql<br />
Building native extensions. &nbsp;This could take a while...<br />
ERROR: &nbsp;Error installing mysql:<br />
&nbsp; &nbsp; &nbsp; &nbsp; ERROR: Failed to build gem native extension.<br />
<br />
/Users/weppos/.multiruby/install/enterprise-1.8.6-20090610/bin/ruby extconf.rb<br />
checking for mysql_query() in -lmysqlclient... no<br />
checking for main() in -lm... yes<br />
checking for mysql_query() in -lmysqlclient... no<br />
checking for main() in -lz... yes<br />
checking for mysql_query() in -lmysqlclient... no<br />
checking for main() in -lsocket... no<br />
checking for mysql_query() in -lmysqlclient... no<br />
checking for main() in -lnsl... no<br />
checking for mysql_query() in -lmysqlclient... no<br />
*** extconf.rb failed ***<br />
Could not create Makefile due to some reason, probably lack of<br />
necessary libraries and/or headers. &nbsp;Check the mkmf.log file for more<br />
details. &nbsp;You may need configuration options.<br />
<br />
Installing postgres...<br />
/Users/weppos/.multiruby/install/enterprise-1.8.6-20090610/bin/ruby /Users/weppos/.multiruby/install/enterprise-1.8.6-20090610/bin/gem install -r --no-rdoc --no-ri --no-update-sources --backtrace postgres<br />
Building native extensions. &nbsp;This could take a while...<br />
ERROR: &nbsp;Error installing postgres:<br />
&nbsp; &nbsp; &nbsp; &nbsp; ERROR: Failed to build gem native extension.<br />
<br />
/Users/weppos/.multiruby/install/enterprise-1.8.6-20090610/bin/ruby extconf.rb<br />
extconf.rb:73: command not found: pg_config --bindir</div></td></tr></tbody></table></div>
<p>If this happens, don&#8217;t worry. Unless this is an unrecoverable error, the installer will simply skip them and you&#8217;ll be able to take care of these issues later, if you really need to.</p>
<p>If everything goes well, at the end of the installation you should probably see a message like</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">--------------------------------------------<br />
Ruby Enterprise Edition is successfully installed!<br />
If want to use Phusion Passenger (http://www.modrails.com) in combination<br />
with Ruby Enterprise Edition, then you must reinstall Phusion Passenger against<br />
Ruby Enterprise Edition, as follows:<br />
<br />
&nbsp; /Users/weppos/.multiruby/install/enterprise-1.8.6-20090610/bin/passenger-install-apache2-module<br />
<br />
Make sure you don't forget to paste the Apache configuration directives that<br />
the installer gives you.<br />
<br />
If you ever want to uninstall Ruby Enterprise Edition, simply remove this<br />
directory:<br />
<br />
&nbsp; /Users/weppos/.multiruby/install/enterprise-1.8.6-20090610<br />
<br />
If you have any questions, feel free to visit our website:<br />
<br />
&nbsp; http://www.rubyenterpriseedition.com<br />
<br />
Enjoy Ruby Enterprise Edition, a product of Phusion (www.phusion.nl) :-)</div></td></tr></tbody></table></div>
<h3>Removing Installation Files</h3>
<p><strong>Before running any multiruby command</strong>, you need to remove the installation files. Remove the Ruby Enterprise Edition folder <strong>but don&#8217;t remove the .tar package</strong>. multiruby needs it in order to work properly.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ rm -rf ~/.multiruby/versions/ruby-enterprise-1.8.6-20090610</div></td></tr></tbody></table></div>
<h3>Checking multiruby installation</h3>
<p>At this point, multiruby should correctly display Ruby EE in the known version list.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ multiruby_setup list<br />
<br />
Known versions:<br />
&nbsp; 1.8.6-p369<br />
&nbsp; 1.8.7-p173<br />
&nbsp; 1.9.1-p129<br />
&nbsp; enterprise-1.8.6-20090610</div></td></tr></tbody></table></div>
<p>Run a simple test command with <code>multiruby</code>. It should be executed across all ruby versions, including Ruby EE.</p>
<div class="codecolorer-container text default code-bash" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ multiruby -e 'p 1+1'<br />
<br />
VERSION = 1.8.6-p369<br />
CMD &nbsp; &nbsp; = ~/.multiruby/install/1.8.6-p369/bin/ruby -e p 1+1<br />
<br />
2<br />
<br />
RESULT = 0<br />
<br />
VERSION = 1.8.7-p173<br />
CMD &nbsp; &nbsp; = ~/.multiruby/install/1.8.7-p173/bin/ruby -e p 1+1<br />
<br />
2<br />
<br />
RESULT = 0<br />
<br />
VERSION = 1.9.1-p129<br />
CMD &nbsp; &nbsp; = ~/.multiruby/install/1.9.1-p129/bin/ruby -e p 1+1<br />
<br />
2<br />
<br />
RESULT = 0<br />
<br />
VERSION = enterprise-1.8.6-20090610<br />
CMD &nbsp; &nbsp; = ~/.multiruby/install/enterprise-1.8.6-20090610/bin/ruby -e p 1+1<br />
<br />
2<br />
<br />
RESULT = 0<br />
<br />
TOTAL RESULT = 0 failures out of 4<br />
<br />
Passed: 1.9.1-p129, enterprise-1.8.6-20090610, 1.8.6-p369, 1.8.7-p173<br />
Failed:</div></td></tr></tbody></table></div>
<h2>Looking for other Ruby versions?</h2>
<p>This tutorial is largely inspired by Nate Murray&#8217;s blog post about <a title="adding macruby to multiruby versions" href="http://www.xcombinator.com/2009/05/22/adding-macruby-to-multiruby-versions/">Adding MacRuby to multiruby</a>. Checkout his tutorial to install MacRuby and don&#8217;t forget to read Rob Seaman&#8217;s blog post if you want to <a title="Rob Seaman  Adding JRuby to multiruby Versions" href="http://blog.robseaman.com/2008/12/21/adding-jruby-to-multiruby-versions">install JRuby</a>.</p>
<h2>Is this the right way to accomplish this?</h2>
<p>If you dig into the multiruby source code, you probably notice that it provides built-in support for many different Ruby implementations. You might be wondering if this tutorial follows the right way to install Ruby EE.</p>
<p>As I told you at the beginning of this post, Ruby EE differs from the other Ruby versions because it comes with its own installer. You should use it to ensure the installation process ends successfully.</p>
<p>In order to add Ruby EE built-in support to multiruby, you should probably hack the Ruby EE installer and pass it the required parameters such as the target path. I must confess I didn&#8217;t have so much time to check how to do this and I found the default installation to be the most fast and easiest way.</p>
<p>Because multiruby is always looking for maintainers for others Ruby implementation, I don&#8217;t exclude to create a patch in the future. Off course, if you have a better solution, feel free to share it here and send a patch to the ZenTest project.</p>
<p>Related posts<ol>
<li><a href='http://www.simonecarletti.com/blog/2009/08/ruby-has-a-new-whois-library/' rel='bookmark' title='Ruby has a new WHOIS library'>Ruby has a new WHOIS library</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecarletti.com/blog/2009/06/adding-ruby-enterprise-edition-to-multiruby-versions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

