<?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>Tony Baltazar &#187; Web Development</title>
	<atom:link href="http://abaltazar.org/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://abaltazar.org</link>
	<description>Free Software / Ruby / Security / Arsenal Football Club</description>
	<lastBuildDate>Tue, 24 Jan 2012 07:52:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Re-enabling mod_ruby on perlninja.pl</title>
		<link>http://abaltazar.org/2010/08/08/re-enabling-mod_ruby-on-perlninja-pl/</link>
		<comments>http://abaltazar.org/2010/08/08/re-enabling-mod_ruby-on-perlninja-pl/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 05:16:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://abaltazar.org/?p=325</guid>
		<description><![CDATA[I finally managed to re-enable mod_ruby on my server once again. This time around, I had a hard time enabling eRuby to work in Apache.
New Apache configuration file:
 

AddType text/html .rhtml
LoadModule ruby_module modules/mod_ruby.so
#&#60;IfModule mod_ruby.c&#62;
RubyRequire apache/ruby-run
RubyRequire apache/eruby-run
&#60;Files *.rb&#62;
Options +ExecCGI
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
&#60;/Files&#62;
&#60;Files *.rhtml&#62;
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
&#60;/Files&#62;
#&#60;/IfModule&#62;

The Apache eRuby SetHandler (rhtml) was not able to render any html/ruby pages, [...]]]></description>
			<content:encoded><![CDATA[<p>I finally managed to re-enable mod_ruby on my server once again. This time around, I had a hard time enabling eRuby to work in Apache.</p>
<p>New Apache configuration file:</p>
<p><code> </code></p>
<p><code></p>
<div id="_mcePaste">AddType text/html .rhtml</div>
<div id="_mcePaste">LoadModule ruby_module modules/mod_ruby.so</div>
<div id="_mcePaste">#&lt;IfModule mod_ruby.c&gt;</div>
<div id="_mcePaste">RubyRequire apache/ruby-run</div>
<div id="_mcePaste">RubyRequire apache/eruby-run</div>
<div id="_mcePaste">&lt;Files *.rb&gt;</div>
<div id="_mcePaste">Options +ExecCGI</div>
<div id="_mcePaste">SetHandler ruby-object</div>
<div id="_mcePaste">RubyHandler Apache::RubyRun.instance</div>
<div id="_mcePaste">&lt;/Files&gt;</div>
<div id="_mcePaste">&lt;Files *.rhtml&gt;</div>
<div id="_mcePaste">SetHandler ruby-object</div>
<div id="_mcePaste">RubyHandler Apache::ERubyRun.instance</div>
<div id="_mcePaste">&lt;/Files&gt;</div>
<div id="_mcePaste">#&lt;/IfModule&gt;</div>
<p></code></p>
<p>The Apache eRuby SetHandler (rhtml) was not able to render any html/ruby pages, while regular ruby scripts (.*rb) were able to run just fine.</p>
<p>Apache log error:<br />
[Sun Aug 08 20:56:15 2010] [error] mod_ruby: (eval):45: (eval):45: uninitialized constant Apache::ERubyRun (NameError)</p>
<p><strong>FIX:</strong></p>
<p>Specify the absolute path to the eRuby Apache module in <strong>/usr/lib/ruby/1.8/apache/eruby-run.rb</strong>.</p>
<p>Change  line 45</p>
<p>require &#8216;eruby&#8217;</p>
<p>to</p>
<p>require &#8220;/usr/lib/ruby/1.8/i386-linux/eruby.so&#8221;</p>
<p>Restart Apache and eRuby should render html/ruby pages as expected.</p>
<p>I hope people find this useful (and save a headache) as I spent about 5 hours researching this problem and I wasn&#8217;t able to find this fix anywhere.</p>
]]></content:encoded>
			<wfw:commentRss>http://abaltazar.org/2010/08/08/re-enabling-mod_ruby-on-perlninja-pl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_ruby and eRuby</title>
		<link>http://abaltazar.org/2010/02/16/mod_ruby-and-eruby/</link>
		<comments>http://abaltazar.org/2010/02/16/mod_ruby-and-eruby/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 07:13:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://abaltazar.org/?p=75</guid>
		<description><![CDATA[I finally had some time to install mod_ruby and eRuby on my server. 
Prerequisites:
httpd-devel ruby ruby-devel eruby
yum install httpd-devel ruby ruby-devel eruby
Installing mod_ruby was pretty confusing, as module default compilation is intended for Apache 1.3 (not why this is the case)
If you&#8217;re running Apache 2.0 or higher,  I managed to successfully compiled mod_ruby as [...]]]></description>
			<content:encoded><![CDATA[<p>I finally had some time to install mod_ruby and eRuby on my server. </p>
<p>Prerequisites:<br />
httpd-devel ruby ruby-devel eruby<br />
yum install httpd-devel ruby ruby-devel eruby</p>
<p>Installing mod_ruby was pretty confusing, as module default compilation is intended for Apache 1.3 (not why this is the case)</p>
<p>If you&#8217;re running Apache 2.0 or higher,  I managed to successfully compiled mod_ruby as the following:<br />
 ./configure.rb &#8211;with-apr-includes=/usr/include/apr-1<br />
make<br />
make install</p>
<p>After the install, then its a matter of just adding the custom ruby http conf file to httpd conf.d directory.</p>
<p>SAMPLE:<br />
<code><br />
AddType text/html .rhtml<br />
LoadModule ruby_module modules/mod_ruby.so</p>
<p><IfModule mod_ruby.c><br />
  RubyRequire apache/ruby-run<br />
  #RubyRequire apache/ruby-debug</p>
<p>  RubyRequire apache/eruby-run<br />
  #RubyRequire apache/eruby-debug</p>
<p>  # Execute *.rbx files as Ruby scripts<br />
  <Files *.rbx><br />
    Options ExecCGI<br />
    SetHandler ruby-object<br />
    RubyHandler Apache::RubyRun.instance<br />
    #RubyHandler Apache::RubyDebug.instance<br />
  </Files></p>
<p>  # Handle *.rhtml files as eRuby files<br />
  <Files *.rhtml><br />
    SetHandler ruby-object<br />
    RubyHandler Apache::ERubyRun.instance<br />
    RubyHandler Apache::ERubyDebug.instance<br />
  </Files><br />
</IfModule><br />
</code></p>
<p>Now I can embed Ruby code on standard html pages serving and running natively using Apache and eRuby. <img src='http://abaltazar.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
Hence, <a href="http://perlninja.pl">perlninja.pl</a></p>
<p>References:<br />
<a href="http://www.modruby.net/en/">http://www.modruby.net/en/</a><br />
<a href="http://www.ptwit.ac.th/seksan/blog/?p=59">http://www.ptwit.ac.th/seksan/blog/?p=59</a></p>
]]></content:encoded>
			<wfw:commentRss>http://abaltazar.org/2010/02/16/mod_ruby-and-eruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Upgrade</title>
		<link>http://abaltazar.org/2010/02/15/wordpress-upgrade/</link>
		<comments>http://abaltazar.org/2010/02/15/wordpress-upgrade/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 02:17:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://abaltazar.org/?p=60</guid>
		<description><![CDATA[WordPress upgrade went real smooth. At a glance, WordPress 1.4 and 2.9 seem to be worlds apart.
]]></description>
			<content:encoded><![CDATA[<p>WordPress upgrade went real smooth. At a glance, WordPress 1.4 and 2.9 seem to be worlds apart.</p>
]]></content:encoded>
			<wfw:commentRss>http://abaltazar.org/2010/02/15/wordpress-upgrade/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

