<?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>Carl Mercier&#039;s blog &#187; jruby</title>
	<atom:link href="http://blog.carlmercier.com/tag/jruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.carlmercier.com</link>
	<description>me = entrepreneur + hacker;</description>
	<lastBuildDate>Thu, 02 Feb 2012 18:38:06 +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>Changes at IsItJRuby.com</title>
		<link>http://blog.carlmercier.com/2009/12/14/changes-at-isitjruby-com/</link>
		<comments>http://blog.carlmercier.com/2009/12/14/changes-at-isitjruby-com/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 04:56:45 +0000</pubDate>
		<dc:creator>Carl Mercier</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Sites I like]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[jruby]]></category>

		<guid isPermaLink="false">http://blog.carlmercier.com/?p=276</guid>
		<description><![CDATA[I&#8217;ve been ridiculously busy lately. Way too busy. Too busy to sleep, to hit the gym, and definitely maintain yet another website. Unfortunately, IsItJRuby.com didn&#8217;t get the love it deserved so I started hunting for someone to take my place. Alex Coles (@myabc) volunteered and is now the new maintainer. He already shared with me [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been ridiculously busy lately. Way too busy. Too busy to sleep, to hit the gym, and definitely maintain yet another website. Unfortunately, <a href="http://IsItJRuby.com" target="_blank">IsItJRuby.com</a> didn&#8217;t get the love it deserved so I started hunting for someone to take my place.</p>
<p>Alex Coles (<a href="http://twitter.com/myabc" target="_blank">@myabc</a>) volunteered and is now the new maintainer. He already shared with me a couple good ideas for the site, which he&#8217;ll hopefully implement soon.</p>
<p>Thank you, Alex, and congrats!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carlmercier.com/2009/12/14/changes-at-isitjruby-com/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Running Merb on JRuby 1.2 and Glassfish 2.1</title>
		<link>http://blog.carlmercier.com/2009/03/30/running-merb-on-jruby-12-and-glassfish-21/</link>
		<comments>http://blog.carlmercier.com/2009/03/30/running-merb-on-jruby-12-and-glassfish-21/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 19:50:31 +0000</pubDate>
		<dc:creator>Carl Mercier</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[glassfish]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[merb]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http://blog.carlmercier.com/?p=219</guid>
		<description><![CDATA[So I&#8217;ve been trying to get Merb running on JRuby a good part of last night. I don&#8217;t know jack about Java, so this has been a little bit more challenging than it should have been. Most (if not all) of the tutorials I found were old and obsolete, so I decided to throw out [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been trying to get Merb running on JRuby a good part of last night. I don&#8217;t know jack about Java, so this has been a little bit more challenging than it should have been.  Most (if not all) of the tutorials I found were old and obsolete, so I decided to throw out my very own.</p>
<p>I need to give credit to <a href="http://blog.nodeta.fi/2008/05/22/living-on-the-edge-jruby-merb-glassfish/" target="_blank">this page</a>, without which I&#8217;d still be fighting with this whole thing.</p>
<p>This tutorial uses JRuby 1.2, Glassfish 2.1, Merb 1.0.10 and Ubuntu 8.04 LTS. To make my life easy, I simply fired an EC2 instance based on ami-71fd1a18. I recommend you do the same.  However, it should work from just any vanilla Ubuntu 8.04.</p>
<p>Some important comments are in the script below, make sure to read them. Enjoy!</p>
<div class="code">
<!--start_raw--><br />
<textarea rows=30 cols=80><br />
# Setup the scene<br />
apt-get update<br />
apt-get upgrade<br />
# this is the Corporate World, folks, you&#8217;ll need to accept some license agreement in the next step<br />
apt-get install -y vim-full build-essential git-core sun-java6-jdk ant<br />
apt-get install -y mysql-server mysql-client</p>
<p># Install JRuby<br />
cd /tmp<br />
wget http://dist.codehaus.org/jruby/1.2.0/jruby-bin-1.2.0.tar.gz<br />
tar xzvf jruby-bin*<br />
mv jruby-1.2.0 /opt/jruby<br />
echo &#8220;export PATH=&#8221;/opt/jruby/bin:$PATH&#8221;" >> ~/.bashrc<br />
export PATH=&#8221;/opt/jruby/bin:$PATH&#8221;</p>
<p># By now, &#8216;jirb&#8217; should start IRB on JRuby!</p>
<p># Let&#8217;s now install some gems<br />
jruby -S gem install erubis rake json_pure rspec rack mime-types rubigen &#8211;no-rdoc &#8211;no-ri<br />
jruby -S gem install hpricot &#8211;no-rdoc &#8211;no-ri &#8211;version &#8216;~>0.6.1&#8242; # version 7 doesn&#8217;t work with JRuby as of now<br />
jruby -S gem install merb-core merb-more &#8211;no-rdoc &#8211;no-ri</p>
<p># Test to see if Merb is installed:<br />
jruby -S merb help</p>
<p># Create an Hello World app<br />
cd ~<br />
jruby -S merb-gen core hello_world<br />
cd hello_world<br />
jruby -S merb-gen controller hello<br />
echo &#8220;<br />
<h1>This is a Merb app running on JRuby. w00t!</h1>
<p>&#8221; > app/views/hello/index.html.erb<br />
# Freeze Merb into your app<br />
jruby -S gem install merb-core merb-more &#8211;no-rdoc &#8211;no-ri -i gems</p>
<p># Install Glassfish<br />
cd /tmp<br />
wget http://java.net/download/javaee5/v2.1_branch/promoted/Linux/glassfish-installer-v2.1-b60e-linux.jar<br />
# and yet more licensing!<br />
java -Xmx256m -jar glassfish-installer-v2.1-b60e-linux.jar<br />
mv glassfish /opt/<br />
cd /opt/glassfish<br />
ant -f setup.xml</p>
<p># Start Glassfish server, it might take some time.<br />
./bin/asadmin start-domain domain1</p>
<p># Warbler and friends<br />
jruby -S gem install rails warbler activerecord-jdbc-adapter &#8211;no-rdoc &#8211;no-ri<br />
cd ~/hello_world<br />
jruby -S warble config</p>
<p># Make sure frozen gems are included in your .war file.<br />
# edit config/warble.rb and add &#8220;gems&#8221; to the config.dirs line</p>
<p># create some missing directories, otherwise, warble will complain.<br />
mkdir -p lib log vendor<br />
# create a .war file<br />
jruby -S warble war<br />
# copy it to Glassfish.<br />
cp hello_world.war /opt/glassfish/domains/domain1/autodeploy/</p>
<p># Glassfish finds your app and starts it automatically.  Give it a few seconds.<br />
# Then, go to http://{server-ip}:4848<br />
# User: admin    Pass: adminadmin        Sounds like a good idea to change this for production!!!!!<br />
# Click &#8220;Web Applications&#8221;, then &#8220;hello_world&#8221;.  Change &#8220;Context Root&#8221; to &#8220;/&#8221; and Save.  Saving was slow for me.</p>
<p>#<br />
# That&#8217;s it!!!<br />
#<br />
# Now go see your l33t web 2.0 app in action:<br />
# Go to http://{server-ip}:8080/<br />
# and http://{server-ip}:8080/hello<br />
</textarea><br />
<!--end_raw-->
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.carlmercier.com/2009/03/30/running-merb-on-jruby-12-and-glassfish-21/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

