<?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>ActivoRicordi Captain&#039;s log</title>
	<atom:link href="http://blog.activoricordi.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.activoricordi.com</link>
	<description>Delivering Innovation through Technology</description>
	<lastBuildDate>Sat, 21 Jan 2012 00:56:22 +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>Create a LiftWeb project with Simple Build Tool</title>
		<link>http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter6/</link>
		<comments>http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter6/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 18:24:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[liftweb]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[Lift]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[ScalaLiftBasis]]></category>
		<category><![CDATA[ScalaLIft_Setup]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=279</guid>
		<description><![CDATA[Once the SBT tool is installed, we proceed to create the lift project structure, there are 2 ways to create a Lift Project, the first one is tha we can create a new project by the traditional means using maven.]]></description>
			<content:encoded><![CDATA[<p>If you are like me an eternal beginner on the Lift Web Framework, after starting a few attempts you probably think that perhaps maven lift archetypes are sometimes really slow process to start a liftweb project, and also that you need something more intuitive as <a href="http://rubyonrails.org">Rails</a> or <a href="http://grails.org">Grails</a>. Most of the time, when I am using maven, I need to look on the documentation again and again. So I have decided that I would like to use other option such as the <a href="http://code.google.com/p/simple-build-tool/">Simple Build Tool</a>.</p>
<p>First, we are going to install sbt. I have already made a small tutorial of how to install sbt for Mac OS X Leopard users, which is located <a href="http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter5/‎">here</a></p>
<p>Once the SBT tool has finally been installed, we proceed to create the lift project structure, there are 2 ways to create a Lift Project, the first one to create a new project by the traditional means using maven:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">  mvn archetype:generate \
           <span style="color: #660033;">-DarchetypeGroupId</span>=net.liftweb \
           <span style="color: #660033;">-DarchetypeArtifactId</span>=lift-archetype-basic_2.8.0 \
           <span style="color: #660033;">-DarchetypeVersion</span>=<span style="color: #000000;">2.1</span>                           \
           <span style="color: #660033;">-DarchetypeRepository</span>=http:<span style="color: #000000; font-weight: bold;">//</span>scala-tools.org<span style="color: #000000; font-weight: bold;">/</span>repo-snapshots \
           <span style="color: #660033;">-DremoteRepositories</span>=http:<span style="color: #000000; font-weight: bold;">//</span>scala-tools.org<span style="color: #000000; font-weight: bold;">/</span>repo-snapshots \
           <span style="color: #660033;">-DgroupId</span>=org.activoricordi.cloudconsole \
           <span style="color: #660033;">-DartifactId</span>=dbcloudconsole \
           <span style="color: #660033;">-Dversion</span>=<span style="color: #000000;">1.0</span></pre></div></div>

</pre>
<p>Then use sbt to manage the rest. We later build the sbt project. However, this way of working is precisely what I want to avoid.</p>
<p>The other option is to use <a href="http://www.git.org">git</a> and download the lift-sbt-prototype from the <a href="http://github.com/lift/lift_sbt_prototype">LiftWeb Prototype</a> Site. If you have not downloaded git, I would suggest two options or either find at Google a good tutorial of how to do it or the other option is to wait for new tutorial where we explain how we install it in Eclipse.</p>
<p>We clone the project repository using the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">git clone git:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>lift<span style="color: #000000; font-weight: bold;">/</span>lift_sbt_prototype.git</pre></div></div>

<p>But there is a better option, which is using <a href="http://lifty.github.com/">Lifty</a>. Lifty is a SBT processor for generating files associated with the Lift framework. It is a open source project created by <a href="http://www.sidewayscoding.com/">Mads Hartmann</a>, which is based on a sbt framework called Lifty engine, which we will describe another day.</p>
<div id="attachment_336" class="wp-caption alignleft" style="width: 310px"><a href="http://blog.activoricordi.com/wp-content/uploads/2010/10/Screen-shot-2010-10-23-at-1.03.19-AM.png" rel="wp-prettyPhoto[g279]"><img src="http://blog.activoricordi.com/wp-content/uploads/2010/10/Screen-shot-2010-10-23-at-1.03.19-AM-300x149.png" alt="Lifty site" title="Lifty site" width="300" height="149" class="size-medium wp-image-336" /></a><p class="wp-caption-text">Lifty site</p></div>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> lifty_test
<span style="color: #7a0874; font-weight: bold;">cd</span> lifty_test
sbt</pre></div></div>

<p>Once we enter the sbt command the following message will appear:<br />
<div id="attachment_338" class="wp-caption aligncenter" style="width: 400px"><a href="http://blog.activoricordi.com/wp-content/uploads/2010/10/sbt_project_creation_line.png" rel="wp-prettyPhoto[g279]"><img src="http://blog.activoricordi.com/wp-content/uploads/2010/10/sbt_project_creation_line.png" alt="Project does not exist, create new project? (y/N) : y" title="sbt_project_creation_line" width="390" height="16" class="size-full wp-image-338" /></a><p class="wp-caption-text">SBT Project Creation Line</p></div><br />
If we select the option <em>Y</em> and we then to enter commands to fill the parameters appear:</p>
<ul>
<li><strong>Name:</strong>liftytest</li>
<li><strong>Organization:</strong>org.lifty</li>
<li><strong>Version [1.0]:</strong>1</li>
<li><strong>Scala version [2.7.7]:</strong> 2.8.0</li>
<li><strong>sbt version [0.7.4]:</strong> 0.7.4</li>
<p>Here we can see an screenshot of the process:<br />
<div id="attachment_339" class="wp-caption aligncenter" style="width: 552px"><a href="http://blog.activoricordi.com/wp-content/uploads/2010/10/sbt_project_creation_process.png" rel="wp-prettyPhoto[g279]"><img src="http://blog.activoricordi.com/wp-content/uploads/2010/10/sbt_project_creation_process.png" alt="sbt_project_creation_process" title="sbt_project_creation_process" width="542" height="298" class="size-full wp-image-339" /></a><p class="wp-caption-text">Screenshot from sbt project creation process</p></div><br />
This means that we have created a normal scala project, where we have filled the necessary fields<br />
We then enter the following command at the <em>sbt</em> prompt which are located on this page: http://lifty.github.com/Lifty/: </p>
<pre class="brush: bash; title: ; notranslate">
*lifty is org.lifty lifty 1.3
</pre>
<p>This command download the lifty processor. </p>
<p>To test it, we are going to enter the following command. </p>
<pre class="brush: bash; title: ; notranslate">
lifty help
</pre>
<p>The lifty processor is quite simple, supporting the following commands:</p>
<p><strong>help</strong>: This will list all of the available commands<br />
<strong>templates</strong>: This will list all of the available templates<br />
<strong>create:</strong> This will attempt to create on of the templates</p>
<pre class="brush: bash; title: ; notranslate">
lifty create project
</pre>
<p>This command creates all the structure needed to execute the project. Even it creates the command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">import sbt._
&nbsp;
class LiftProject<span style="color: #7a0874; font-weight: bold;">&#40;</span>info: ProjectInfo<span style="color: #7a0874; font-weight: bold;">&#41;</span> extends DefaultWebProject<span style="color: #7a0874; font-weight: bold;">&#40;</span>info<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  val mavenLocal = <span style="color: #ff0000;">&quot;Local Maven Repository&quot;</span> at
  <span style="color: #ff0000;">&quot;file://&quot;</span>+Path.userHome+<span style="color: #ff0000;">&quot;/.m2/repository&quot;</span>
&nbsp;
   val scalatoolsSnapshot = <span style="color: #ff0000;">&quot;Scala Tools Snapshot&quot;</span> at
  <span style="color: #ff0000;">&quot;http://scala-tools.org/repo-snapshots/&quot;</span>
&nbsp;
  val scalatoolsRelease = <span style="color: #ff0000;">&quot;Scala Tools Snapshot&quot;</span> at
  <span style="color: #ff0000;">&quot;http://scala-tools.org/repo-releases/&quot;</span>
&nbsp;
  val liftVersion = <span style="color: #ff0000;">&quot;2.1-SNAPSHOT&quot;</span>
&nbsp;
  override def libraryDependencies = Set<span style="color: #7a0874; font-weight: bold;">&#40;</span>
    <span style="color: #ff0000;">&quot;net.liftweb&quot;</span> <span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #ff0000;">&quot;lift-webkit&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> liftVersion <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;compile-&gt;default&quot;</span>,
    <span style="color: #ff0000;">&quot;net.liftweb&quot;</span> <span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #ff0000;">&quot;lift-testkit&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> liftVersion <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;compile-&gt;default&quot;</span>,
    <span style="color: #ff0000;">&quot;net.liftweb&quot;</span> <span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #ff0000;">&quot;lift-wizard&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> liftVersion <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;compile-&gt;default&quot;</span>,
    <span style="color: #ff0000;">&quot;net.liftweb&quot;</span> <span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #ff0000;">&quot;lift-mapper&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> liftVersion <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;compile-&gt;default&quot;</span>,
    <span style="color: #ff0000;">&quot;com.h2database&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;h2&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;1.2.138&quot;</span>,
    <span style="color: #ff0000;">&quot;org.mortbay.jetty&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;jetty&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;6.1.22&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;test-&gt;default&quot;</span>,
    <span style="color: #ff0000;">&quot;junit&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;junit&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;4.5&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;test-&gt;default&quot;</span>,
    <span style="color: #ff0000;">&quot;org.scala-tools.testing&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;specs&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;1.6.1&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;test-&gt;default&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">&#41;</span> ++ super.libraryDependencies
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>As a tip, I would recommend adding are going to add the following dependencies which I consider very valuable.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #ff0000;">&quot;net.liftweb&quot;</span> <span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #ff0000;">&quot;lift-widgets&quot;</span> <span style="color: #000000; font-weight: bold;">%</span> liftVersion <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #ff0000;">&quot;compile-&gt;default&quot;</span>,</pre></div></div>

<p> Once we add it we have to save the file and use the sbt reload command again.<br />
To summarize:<br />
a) We create the folder with the name of the project we want to create<br />
b) We access to the folder and we then use the sbt command<br />
c) Instead of filling it </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install the Simple Build Tool for LiftWeb Framework</title>
		<link>http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter5/</link>
		<comments>http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter5/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 18:22:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[liftweb]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[Lift]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[ScalaLiftBasis]]></category>
		<category><![CDATA[ScalaLIft_Setup]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=276</guid>
		<description><![CDATA[Install Lift 2.1 in MacOSX Leopard (V) - Install the Simple Build Tool (SBT) in MacOSX Leopard ]]></description>
			<content:encoded><![CDATA[<h4>Install the Simple Build Tool (SBT) for LiftWeb Framework</h4>
<p>Best way to install SBT for Mac OS X is described on the following tutorial called <a href="http://chrismoos.com/2010/02/10/getting-started-with-scala-using-sbt/" target="_blank">Getting Started with Scala using SBT</a>.<br />
However, in this case since I do not have <em>wget</em> installed, we have downloaded the sbt-launcher.jar file from the official <a href="http://code.google.com/p/simple-build-tool/" target="_blank">Simple Build Tool</a> and place it on our Downloads folder. Using the following commands, we can install the sbt launcher and make it accessible from the command tools :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> ~<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>sbt-launch-0.7.4.jar <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>sbt-launcher.jar
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;java -Xmx512M -jar /usr/local/bin/sbt-launcher.jar <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\$</span>@<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">tee</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>sbt
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>sbt</pre></div></div>

<p>Thank&#8217;s to Chris Moos script, the SBT jar is installed and it creates a script called sbt that will allow us to run the sbt jar. To test it  just type sbt and press enter, and you now have access to SBT.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create a Lift Project with Maven</title>
		<link>http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter4/</link>
		<comments>http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter4/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 18:19:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[liftweb]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[Lift]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[ScalaLiftBasis]]></category>
		<category><![CDATA[ScalaLIft_Setup]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=274</guid>
		<description><![CDATA[Install Lift 2.1 in MacOSX Leopard > (4) Create a Lift Project with Maven: The Apache Maven has become a standard, a standard that is already installed in Mac OS X Leopard by default, and there is no need to installed again. It is also possible to update it. Once the maven is installed, we [...]]]></description>
			<content:encoded><![CDATA[<h4> Install Lift 2.1 in MacOSX Leopard  >  (4) Create a Lift Project with Maven:</h4>
<p>The <a href="http://maven.apache.org">Apache Maven</a> has become a standard, a standard that is already installed in Mac OS X Leopard by default, and there is no need to installed again. It is also possible to update it.</p>
<p>Once the maven is installed, we can use it to create a Lift Project, you could start the mvn command, and create a project with the following structure.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mvn archetype:generate \
 <span style="color: #660033;">-DarchetypeGroupId</span>=net.liftweb \
 <span style="color: #660033;">-DarchetypeArtifactId</span>=lift-archetype-basic_2.8.0 \
 <span style="color: #660033;">-DarchetypeVersion</span>=<span style="color: #000000;">2.1</span> \
 <span style="color: #660033;">-DarchetypeRepository</span>=http:<span style="color: #000000; font-weight: bold;">//</span>scala-tools.org<span style="color: #000000; font-weight: bold;">/</span>repo-releases \
 <span style="color: #660033;">-DremoteRepositories</span>=http:<span style="color: #000000; font-weight: bold;">//</span>scala-tools.org<span style="color: #000000; font-weight: bold;">/</span>repo-releases \
 <span style="color: #660033;">-DgroupId</span>=org.activoricordi.app \
 <span style="color: #660033;">-DartifactId</span>=lift_app_test \
 <span style="color: #660033;">-Dversion</span>=<span style="color: #000000;">1.0</span></pre></div></div>

<p>We are going to analyze each of the terms on this archetype:</p>
<ul>
<li><strong>archetype:create -U: </strong>It indicates the type of archetype we are going to use, there could be others which we will use to build the application or deployed</li>
<li><strong>-DarchetypeArtifactId</strong> can have one of the three values
<ul>
<li><strong>- lift-archetype-blank:</strong> To create a blank project without any database or ORM.</li>
<li><strong>- lift-archetype-basic:</strong>To create a liftweb project with ORM and derby database, it is good for prototyping a project and help to start with beginners</li>
<li><strong>- lift-archetype-jpa-basic</strong> To create a liftweb project with ORM and jpa database</li>
</ul>
<p>We modify the following parameters to adjust it to our project:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #660033;">-DgroupId</span>=org.activoricordi.app \
 <span style="color: #660033;">-DartifactId</span>=lift_app_test \
 <span style="color: #660033;">-Dversion</span>=<span style="color: #000000;">1.0</span></pre></div></div>

<p>Once the execution of the Maven is completed, we execute the following commands:</p>
<ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span>  hellodarwin
mvn jetty:run</pre></div></div>

<p>It will immediately show the typical Lift application demo.</p>
<p>You could see an screenscast describing this process on the following video:</p>
<p><iframe src="http://player.vimeo.com/video/2461367" width="400" height="251" frameborder="0"></iframe>
<p><a href="http://vimeo.com/2461367">Getting Started with the Lift Web Framework Part II</a> from <a href="http://vimeo.com/user1015211">Matt Harrington</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install Apache Maven in Mac OS X Leopard</title>
		<link>http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-iii/</link>
		<comments>http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-iii/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 18:15:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[liftweb]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[LiftWeb]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[ScalaLiftBasis]]></category>
		<category><![CDATA[ScalaLIft_Setup]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=268</guid>
		<description><![CDATA[Install Lift 2.1 in MacOSX Leopard > (3) Install Maven in MacOSX Leopard: As we said before, Lift project uses Apache Maven as its default build system, luckily Maven is already installed on the Mac OS X Leopard computers, and we can check the version using the following command: mvn --version It is will appear [...]]]></description>
			<content:encoded><![CDATA[<h4> Install Lift 2.1 in MacOSX Leopard  >  (3) Install Maven in MacOSX Leopard:</h4>
<p>As we said before, Lift project uses Apache Maven as its default build system, luckily Maven is already installed on the Mac OS X Leopard computers, and we can check the version using the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mvn <span style="color: #660033;">--version</span></pre></div></div>

<p>It is will appear the following message:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Apache Maven 2.2.0 <span style="color: #7a0874; font-weight: bold;">&#40;</span>r788681; <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">26</span> <span style="color: #000000;">15</span>:04:01+0200<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Java version: 1.6.0_20
Java home: <span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>JavaVM.framework<span style="color: #000000; font-weight: bold;">/</span>Versions<span style="color: #000000; font-weight: bold;">/</span>1.6.0<span style="color: #000000; font-weight: bold;">/</span>Home
Default locale: en_US, platform encoding: MacRoman
OS name: <span style="color: #ff0000;">&quot;mac os x&quot;</span> version: <span style="color: #ff0000;">&quot;10.6.4&quot;</span> <span style="color: #c20cb9; font-weight: bold;">arch</span>: <span style="color: #ff0000;">&quot;x86_64&quot;</span> Family: <span style="color: #ff0000;">&quot;mac&quot;</span></pre></div></div>

<p>If you don’t already have Maven or in case it does not have the version you are looking for, then, the first thing to do is to download and install it on your Mac OS X Leopard. The process of installing Maven typically involves four simple steps, which are as follows:</p>
<p>1) To download a release build archive appropriate for your platform, in this case MacOS X from http://maven.apache.org/download.html. You may want to get the zip file on a Windows machine and tarred zip or bz2 file on a Linux, Unix or Mac OSX machine.</p>
<p>2) Expand the archive file in a preferred folder within your file system.</p>
<p>3) Create or update a few environment variables, namely: </p>
<p>JAVA_HOME – point it to your JDK folder. I assume JDK is already installed. If not, go get it before you go further.<br />
M2_HOME – point it to the folder where Maven is installed. It’s the same that was created when you extracted the Maven archive.<br />
M2 – point it to %M2_HOME%\bin on windows and $M2_HOME/bin on Linux/Unix/Mac OSX<br />
PATH – update the PATH environment variable. Add M2 to it.<br />
MAVEN_OPTS – Add -Xms256m -Xmx512m to this environment variable.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Lift 2.1 in MacOSX Leopard (II) &#8211; Install the Scala Language</title>
		<link>http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-ii/</link>
		<comments>http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-ii/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 18:07:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[liftweb]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[LiftWeb]]></category>
		<category><![CDATA[ScalaLiftBasis]]></category>
		<category><![CDATA[ScalaLIft_Setup]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=263</guid>
		<description><![CDATA[This chapter describes the process of install the Scala Language at Mac OSX Leopard once it has been successfully download it]]></description>
			<content:encoded><![CDATA[<p><strong>2) Install the Scala Language:</strong></p>
<p>I open the finder and choose the option <span style="font-style: italic;">Go to Folder</span> select /usr/local/, then we rename the folder to <span style="font-style: italic;">Scala </span>and we copied the folder there.We could also move it by Terminal using the following command:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> ~<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>scala-2.8.0.final <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span>
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> ~<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>scala <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span></pre></div></div>

<p>if we have already changed its file name.We edit the local PATH file. We open the Terminal application, we edit the .profile file (we can use vim editor or the TextEdit, or directly use Textmate if we have it installed using the mate ~/.profile).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">open <span style="color: #660033;">-a</span> TextEdit .profile
<span style="color: #007800;">SCALA_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>scala;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">$SCALA_HOME</span>; <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">SCALA</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$SCALA_HOME</span>/bin/scala&quot;</span>
<span style="color: #007800;">PATH</span>=<span style="color: #007800;">$SCALA_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span>; <span style="color: #7a0874; font-weight: bold;">export</span> PATH
<span style="color: #7a0874; font-weight: bold;">source</span> ~<span style="color: #000000; font-weight: bold;">/</span>.profile</pre></div></div>

<p>To test it we can insert the following command on the Terminal application</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">scala <span style="color: #660033;">-version</span></pre></div></div>

<p>And the following sentence will appear:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Scala code runner version 2.8.0.final <span style="color: #660033;">--</span> Copyright <span style="color: #000000;">2002</span>-<span style="color: #000000;">2010</span>, LAMP<span style="color: #000000; font-weight: bold;">/</span>EPFL</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Lift 2.1 in MacOSX Leopard (I) &#8211;  Download the Scala Language</title>
		<link>http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter1/</link>
		<comments>http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter1/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 18:06:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[liftweb]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[Lift]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[ScalaLiftBasis]]></category>
		<category><![CDATA[ScalaLIft_Setup]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=258</guid>
		<description><![CDATA[Download the Scala Language at Mac OS X]]></description>
			<content:encoded><![CDATA[<p><strong>1) Download the Scala Language:</strong></p>
<p>We download the Scala language file from the scala-lang <a class="wp-caption" title="Scala Lang Site" href="http://www.scala-lang.org" target="_blank">site</a>. We are going to install it following the instructions given by the following sites <a href="http://seanbehan.com/programming/installing-scala-on-mac-os-x-leopard/" target="_blank">Installing Scala on Mac OS X Leopard</a> and <a href="http://harrylove.org/2009/05/14/how-to-install-scala-on-mac.html" target="_blank">How</a> <a href="http://harrylove.org/2009/05/14/how-to-install-scala-on-mac.html" target="_blank">to Install Scala on Mac</a>. I have done a quick summary of the great tips:</p>
<ul>
<li>We go the official Scala Web Site,  <a class="ulink" href="http://www.scala-lang.org/downloads" target="_top">http://www.scala-lang.org/downloads</a>.</li>
<li>Download the  installer for your environment and follow the instructions on the downloads page.</li>
<li> I download the scala-2.8.0.final.tgz, I extract it in the <span style="font-style: italic;">Downloads</span> folder.<br />
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Install Lift Web Framework &#8211; The Series</title>
		<link>http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopardi/</link>
		<comments>http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopardi/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 18:05:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[liftweb]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=14</guid>
		<description><![CDATA[If you are a loyal reader of this blog, you know that I am a rather new fan of Lift and Scala. I have recently move to use Lift 2.1 over Scala 2.8.0.  Unfortunately, I cannot work with Lift as much as I want. My story with Lift and Scala is fill with a lot of blank spaces where, due to my job, I have no contact with Lift coding at all. For that reason, I have created these set of Quick and dirty instructions as tutorial where I review tips, tricks to install Scala, Lift Web Framework, Simple Build Tool, Maven, and Eclipse.

The idea is to keep it updated from time to time including my new findings, and novelties as I believe it is going to change at lot in the very next future.]]></description>
			<content:encoded><![CDATA[<p>If you are a loyal reader of this blog, you know that I am a rather new fan of Lift and Scala. I have recently move to use <del datetime="2011-08-31T06:46:59+00:00">Lift 2.1 over Scala 2.8.0</del>.  Unfortunately, I cannot work with Lift as much as I want. My story with Lift and Scala is fill with a lot of blank spaces where, due to my job, I have no contact with Lift coding at all. For that reason, I have created these set of Quick and dirty instructions as tutorial where I review tips, tricks to install Scala, Lift Web Framework, Simple Build Tool, Maven, and Eclipse.</p>
<p>The idea is to keep it updated from time to time including my new findings, and novelties as I believe it is going to change at lot in the very next future. Although I initially envision this as a simple post, I have decided to make a series in order to maintain them more easily and keep contributing to the series after.</p>
<p><a class="wp-caption-dd" title="Download the scala Language" href="http://blog.activoricordi.com/2010/10/macosxliftwebsetup_chapter1/" target="_self">Install Lift 2.1 in Mac OS X Leopard I &#8211; Download the Scala Language</a> &#8211;<br />
<a class="wp-caption-dd" title=" Install the Scala Language" href="http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-v/" target="_self">Install Lift 2.1 in MacOSX Leopard (II) &#8211; Install the Scala Language</a> &#8211; <a href="http://wp.me/p9x2B-4f">Shortlink</a><br />
<a class="wp-caption-dd" title="Download the scala Language" href="http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-v/" target="_self">Install Lift 2.1 in Mac OS X Leopard I &#8211; Download the Scala Language</a><br />
<a class="wp-caption-dd" title="Download the scala Language" href="http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-v/" target="_self">Install Lift 2.1 in Mac OS X Leopard I &#8211; Download the Scala Language</a><br />
<a class="wp-caption-dd" title="Download the scala Language" href="http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-v/" target="_self">Install Lift 2.1 in Mac OS X Leopard I &#8211; Download the Scala Language</a><br />
<a class="wp-caption-dd" title="Download the scala Language" href="http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-v/" target="_self">Install Lift 2.1 in Mac OS X Leopard V &#8211; Download the Scala Language</a><br />
<a class="wp-caption-dd" title="Download the scala Language" href="http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-v/" target="_self">Install Lift 2.1 in Mac OS X Leopard VI &#8211; Download the Scala Language</a><br />
<a class="wp-caption-dd" title="Download the scala Language" href="http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopard-v/" target="_self">Install Lift 2.1 in Mac OS X Leopard VII &#8211; Download the Scala Language</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2010/10/install-lift-2-1-in-macosx-leopardi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learn to build a Rails app using Heroku and Git</title>
		<link>http://blog.activoricordi.com/2009/11/learn-to-build-a-rails-app-using-heroku/</link>
		<comments>http://blog.activoricordi.com/2009/11/learn-to-build-a-rails-app-using-heroku/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 13:34:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyonRails]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=7</guid>
		<description><![CDATA[Hi All: I have recently discover Heroku service for building applications. It is extremely useful and extremely easy to use. It is also based in Git a SCM system which is also revolutionazing the version control systems. To install Git, we could use this guide located on the progit or also you can see this [...]]]></description>
			<content:encoded><![CDATA[<p>Hi All:</p>
<p>I have recently discover Heroku service for building applications. It is extremely useful and extremely easy to use. It is also based in Git a SCM system which is also revolutionazing the version control systems.</p>
<p>To install Git, we could use this guide located on the progit or also you can see this <a href="http://www.nice-panorama.com/Programmation/cappuccino/Tutorial-git.html">page</a> which explains how to use textmate with git</p>
<p>We set git configuration:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&lt;</span>span<span style="color:#006600; font-weight:bold;">&gt;</span>$<span style="color:#006600; font-weight:bold;">&lt;/</span>span<span style="color:#006600; font-weight:bold;">&gt;</span> git config <span style="color:#006600; font-weight:bold;">--</span>global user.<span style="color:#9900CC;">name</span> <span style="color:#006600; font-weight:bold;">&lt;</span>span<span style="color:#006600; font-weight:bold;">&gt;</span><span style="color:#996600;">&quot;Your Name&quot;</span><span style="color:#006600; font-weight:bold;">&lt;/</span>span<span style="color:#006600; font-weight:bold;">&gt;</span>
<span style="color:#006600; font-weight:bold;">&lt;</span>span<span style="color:#006600; font-weight:bold;">&gt;</span>$<span style="color:#006600; font-weight:bold;">&lt;/</span>span<span style="color:#006600; font-weight:bold;">&gt;</span> git config <span style="color:#006600; font-weight:bold;">--</span>global user.<span style="color:#9900CC;">email</span> youremail@example.<span style="color:#9900CC;">com</span></pre></div></div>

<p>There is a great Quickstart for using Heroku which I used as a base for this post: http://docs.heroku.com/quickstart</p>
<ul>
<li>Sign in in Heroku</li>
<li>Install Heroku gem:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">$ sudo gem install heroku</pre></div></div>

<ul>
<li>Create the local application in your mac: rails myapp</li>
<li>Access to the rails app: cd myapp</li>
<li>Install git</li>
<li>Execute git:  <em>$ git init</em></li>
<li>Do git add:  <em>$ git add .</em></li>
<li>We access to the following command:</li>
</ul>
<ul>
<li>
<ul>
<li>Do git first commit: <code><em>$ git commit -m "new app"</em><br />
</code></li>
<li>We open the application, and we start the local server <em>ruby script/server </em>and access to localserver using <em>http://127.0.0.1:3000</em></li>
<li>As usual, we generate a index or home controller. I generally call them <strong><em>dashboard</em></strong> as it is sexy: <em>$ ruby script/generate controller dashboard index</em></li>
<li>We delete the entry page: <em><span>$ rm public/index.html</span></em></li>
<li>We modify the <span style="font-weight: bold;">config/routes.rb </span>to enter the following route map:</li>
</ul>
<ul></ul>
<ul>
<li>We create the heroku application directly on the heroku site from our computer merely using the Heroku&#8217;s gem</li>
</ul>
<ul>
<li>Now the web site will be visible on the following address: http://severe-stone-45.heroku.com. Sustitute the name by the name provided by Heroku and you got it. As the heroku repository is blank when we create the application we need to deploy the code to a specific branch, we deploy the code throuh this instruction</li>
</ul>
</li>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">$ rake db:create
db<span style="color:#006600; font-weight:bold;">/</span>development.<span style="color:#9900CC;">sqlite3</span> already exists</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">map.<span style="color:#9900CC;">connect</span> <span style="color:#996600;">':controller/:action/:id'</span>
map.<span style="color:#9900CC;">connect</span> <span style="color:#996600;">':controller/:action/:id.:format'</span>
<span style="color:#008000; font-style:italic;"># Enter the route to access to enter the dashboard</span>
 map.<span style="color:#9900CC;">root</span> <span style="color:#ff3333; font-weight:bold;">:controller</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">&quot;dashboard&quot;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">rake db:migrate</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">heroku create
Created http:<span style="color:#006600; font-weight:bold;">//</span>severe<span style="color:#006600; font-weight:bold;">-</span>stone<span style="color:#006600; font-weight:bold;">-</span>45.<span style="color:#9900CC;">heroku</span>.<span style="color:#9900CC;">com</span><span style="color:#006600; font-weight:bold;">/</span> <span style="color:#006600; font-weight:bold;">|</span> git@heroku.<span style="color:#9900CC;">com</span>:severe<span style="color:#006600; font-weight:bold;">-</span>stone<span style="color:#006600; font-weight:bold;">-</span>45.<span style="color:#9900CC;">git</span></pre></div></div>

<p>$ git push heroku master</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2009/11/learn-to-build-a-rails-app-using-heroku/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I have changed to JQuery in Rails</title>
		<link>http://blog.activoricordi.com/2009/11/i-have-changed-to-jquery-in-rails/</link>
		<comments>http://blog.activoricordi.com/2009/11/i-have-changed-to-jquery-in-rails/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 09:23:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Rails 2.0]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/2009/11/i-have-changed-to-jquery-in-rails/</guid>
		<description><![CDATA[jQuery is today the best js library, prototype is a challenger.The reasons why I think this are beautifully illustrated on the following post. To use jQuery in rails install the following plugin: ruby script/plugin install http://ennerchi.googlecode.com/svn/trunk/plugins/jrails Here is a list of existing functions which are available once we replace prototype+scriptacuolous for the jquery. Hopefully, this [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery is today the best js library, prototype is a challenger.The reasons why I think this are beautifully illustrated on the following <a href="http://jimneath.org/2008/06/18/using-jquery-with-ruby-on-rails/">post</a>. To use jQuery in rails install the following plugin:</p>
<p>ruby script/plugin install http://ennerchi.googlecode.com/svn/trunk/plugins/jrails</p>
<p>Here is a <a href="http://justtalkaboutweb.com/2008/01/14/replace-prototype-with-jquery-on-rails/">list</a> of existing functions which are available once we replace prototype+scriptacuolous for the jquery. Hopefully, this support will improve once we approach to Rails 3.</p>
<p>If you want to use both libraries, you will keep prototype js files, if you plan to use only jquery you could removed them. I particularly think that seems you have decided to use jquery there is few reasons to keep them.</p>
<p>Also, there are two ways to use jquery, I just found this interesting article which speak about a different way to use jquery, not using jrails but instead in a more unobstrusive way. Interesting point of view.</p>
<p>http://www.notgeeklycorrect.com/english/2009/05/18/beginners-guide-to-jquery-ruby-on-rails/</p>
<p>Kind regards and good weekend</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2009/11/i-have-changed-to-jquery-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JRuby on Rails on SAP NetWeaver Studio</title>
		<link>http://blog.activoricordi.com/2009/08/jruby_on_rails_nwds/</link>
		<comments>http://blog.activoricordi.com/2009/08/jruby_on_rails_nwds/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 10:40:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JRuby]]></category>
		<category><![CDATA[sap]]></category>
		<category><![CDATA[JRuby on Rails]]></category>
		<category><![CDATA[sap netweaver]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=50</guid>
		<description><![CDATA[Many of you have already heard about JRuby and its Rails implementation called JRuby on Rails, for those who do not I would recommend to read the following articles: JRuby: The power of Java and Ruby This article which clearly explain the basics is about JRuby. This article from Java World gives an overview JRuby [...]]]></description>
			<content:encoded><![CDATA[<p>Many of you have already heard about JRuby and its Rails implementation called JRuby on Rails, for those who do not I would recommend to read the following articles:</p>
<ul>
<li><a href="http://www.youtube.com/watch?v=PfnP-8XbJao">JRuby: The power of Java and Ruby</a></li>
<li>This <a href="http://www.javaworld.com/javaworld/jw-07-2006/jw-0717-ruby.html">article</a> which clearly explain the basics is about JRuby.</li>
<li>This <a href="http://www.javaworld.com/javaworld/jw-02-2007/jw-02-jruby.html">article</a> from Java World gives an overview JRuby on Rails. </li>
<li>Additionally, there is another <a href="http://www.developer.com/lang/other/article.php/10942_3662031_2">article</a> from Developer.com which runs over the first steps on creating and deploying a JRuby on Rails application.</li>
</ul>
<p>Ok, once we are all on the same page, I am going to make a more detailed overview, on how to develop a JRuby on Rails project using SAP NetWeaver Studio. Just to mention that I am currently using version 7.1 SP6 which is built over Eclipse 3.3.0 and Java 5 Sdk.  I know it is a little bit more advanced than the most mayority of current SAP projects, which are probably using SAP NetWeaver Studio 7.0 but well, it is what I have.</p>
<p>There is an existing one-click installer from <a href="http://bitnami.org/stack/jrubystack">JRuby on Rails </a>suitable for testing for a company called bitnami, which has a very interesting market proposition. I am myself I use RubyStack with no futher problems.<br />
However, I have done manually to fully understand the development architecture. So let se which are the steps to perform:</p>
<p>1) Download JRuby: As first step, we are going to download latest version of JRuby from <a href="http://jruby.codehaus.org/">JRuby site</a>. In this case is JRuby 1.1.4, which can be download from its <a href="http://dist.codehaus.org/jruby/">repositories</a>. Select what it suits for your operating system.</p>
<p>While you wait it to download, if you like you can read something or you want watch a video related to JRuby on Rails, plese the following video:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="src" value="http://www.youtube.com/v/PfnP-8XbJao&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/PfnP-8XbJao&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6" allowfullscreen="true"></embed></object></p>
<p>Ok, now it is already download, we have to find the file and unzip. Do not underestimate the time it takes to find the file wherever you have download it. <img src='http://blog.activoricordi.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  .</p>
<p>As I always install my Jvm on the root directory of my C: drive (c:\jdk15,c:\jdk16,..) . I am going to follow the same procedure again, as it will ease the procedure of adding it to my PATH route. I do not know you but I am a little tired of adding things to my PATH, that I am not going to use so I have created a .bat file which do this for me. For more details about <a class="wp-caption" title="JRuby Getting Started" href="http://wiki.jruby.org/wiki/Getting_Started" target="_blank">how to getting started</a>. Obviously, it is designed to support my best practices, but you know today is &#8220;Convention over configuration&#8221; or DIY.</p>
<p>Prerequisites</p>
<p>JRuby 1.1.3 or higher<br />
Java 5 or higher<br />
Rails 2.0 or higher</p>
<p> Install Rails Framework &#8216;gems install rails -y&#8217; (if behind a http proxy, set HTTP_PROXY=http://${http-proxy-host}:${http-proxy-port}/)<br />
4. Install activerecord-jdbc &#8216;gems install activerecord-jdbc&#8217;<br />
5. Install database/jdbc driver (for mysql <a href="http://mysql.com/">http://mysql.com/</a>)<br />
6. Generate your Ruby on Rails application (<a href="http://rubyonrails.org/">http://rubyonrails.org/</a>)<br />
7. Modify database.yaml<br />
       development:<br />
           adapter: jdbc<br />
           driver: com.mysql.jdbc.Driver (for mysql)<br />
           url: jdbc:mysql://${database-hostname}/${db-schema}<br />
           username: ${username}<br />
           password: ${password}</p>
<p>8. Modify environment.rb by adding<br />
       require &#8216;active_record/connection_adapters/jdbc_adapter&#8217;</p>
<p>9. Download rails-integration-${version}-SNAPSHOT.jar into the WEB-INF/lib by checking out and building the rails-integration project<br />
svn://rubyforge.org/var/svn/jruby-extras/trunk/rails-integration<br />
10. Modify the template web.xml(see references below) with the right value of jruby.home<br />
11. Create a WEB-INF directory in the RoR application directory<br />
12. Copy web.xml to WEB-INF and rails-integration-${version}-SNAPSHOT.jar under WEB-INF/lib<br />
13. Jar up the RoR application directory contents as a WAR file</p>
<p>Requests to appropriate context-root of the deployed web application should invoke your Ruby code !</p>
<p>If you&#8217;d like to automate the building of a war file:<br />
Edit rails-integration/build.xml and add the following XML snippet<br />
  &lt;property environment=&#8221;env&#8221;/&gt;<br />
  &lt;target name=&#8221;build-rails-war&#8221; depends=&#8221;jar&#8221;&gt;<br />
    &lt;delete file=&#8221;${rails-app-dir}/${rails-app-name}.war&#8221;/&gt;<br />
    &lt;mkdir dir=&#8221;${rails-app-dir}/WEB-INF/lib&#8221;/&gt;<br />
    &lt;copy todir=&#8221;${rails-app-dir}/WEB-INF/lib&#8221;&gt;<br />
      &lt;fileset file=&#8221;${maven.build.directory}/${maven.build.final.name}.jar&#8221;/&gt;<br />
      &lt;fileset file=&#8221;${maven.repo.local}/org/jruby/jruby/0.9.1/jruby-0.9.1.jar&#8221;/&gt;<br />
      &lt;fileset file=&#8221;${maven.repo.local}/asm/asm/2.2.2/asm-2.2.2.jar&#8221;/&gt;<br />
      &lt;fileset file=&#8221;${maven.repo.local}/javax/activation/activation/1.1/activation-1.1.jar&#8221;/&gt;<br />
    &lt;/copy&gt;<br />
    &lt;copy todir=&#8221;${rails-app-dir}/WEB-INF/&#8221;&gt;<br />
      &lt;fileset file=&#8221;samples/scaffold/WEB-INF/web.xml&#8221;/&gt;<br />
    &lt;/copy&gt;<br />
    &lt;replace file=&#8221;${rails-app-dir}/WEB-INF/web.xml&#8221; token=&#8221;/usr/local/jruby&#8221; value=&#8221;${env.JRUBY_HOME}&#8221;/&gt;<br />
    &lt;jar jarfile=&#8221;${rails-app-dir}/${rails-app-name}.war&#8221; basedir=&#8221;${rails-app-dir}&#8221;/&gt;<br />
  &lt;/target&gt;<br />
Make sure JRUBY_HOME is set and run<br />
&#8216;ant -Drails-app-dir=${ror-app-dir} -Drails-app-name=${war-file-name} build-rails-war&#8217;<br />
${ror-app-dir}/${ror-app-name}.war should be ready for deployment !</p>
<p><code>jruby -S gem install -y rails warbler</code><br />
<code><br />
$JRUBY_HOME/bin/gem install activerecord-jdbc-adapter -y</code><br />
modify database.yml<br />
<code><br />
development:<br />
adapter: jdbc<br />
driver: com.mysql.jdbc.Driver<br />
url: jdbc:mysql://localhost/blabla_development<br />
username: root<br />
password: root<br />
</code><br />
Modify environment.rb<br />
<code><br />
require File.join(File.dirname(__FILE__), 'boot')<br />
if RUBY_PLATFORM =~ /java/<br />
require 'rubygems'<br />
RAILS_CONNECTION_ADAPTERS = %w(jdbc)<br />
end</code>I would recommend to read of <a href="http://blog.emptyway.com/">The empty Way</a><br />
<a href="http://wordpress.com/tag/jruby/">JRuby entries on WordPress</a></p>
<p>Rails::Initializer.run do |config|</p>
<p>This article is based on the following references:</p>
<ul>
<li><a href="http://wiki.jruby.org/wiki/JRuby_on_Rails">Wiki JRuby on Rails</a></li>
<li><a href="http://luposlip.blogspot.com/2007/07/solved-jror-goldspike-netweaver.html">Solved: JRoR, GoldSpike + NetWeaver</a></li>
<li><a href="http://blog.headius.com/2006/11/advanced-rails-deployment-with-jruby.html">Advanced Rails Deployment with JRuby</a></li>
<li><a href="http://blogs.sun.com/whacko/entry/deploying_a_ruby_on_rails"></a></li>
</ul>
<p>Kind regards</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2009/08/jruby_on_rails_nwds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

