<?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>fiveclouds &#187; rails</title>
	<atom:link href="http://www.fiveclouds.com/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fiveclouds.com</link>
	<description>collaboration, creativity and the next big thing</description>
	<lastBuildDate>Tue, 25 May 2010 11:06:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Mixing Maven and Warbler</title>
		<link>http://www.fiveclouds.com/2008/10/19/mixing-maven-and-warbler/</link>
		<comments>http://www.fiveclouds.com/2008/10/19/mixing-maven-and-warbler/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 23:01:46 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[warbler]]></category>

		<guid isPermaLink="false">http://www.fiveclouds.com/?p=81</guid>
		<description><![CDATA[<p>I have recently been working on mixing together a Ruby on Rails application with an Enterprise app.   Initially I was looking into doing it with Goldspike, however after picking up that it was going out of fashion and being replaced with Warbler I decided to use that.   I couldn&#8217;t find any clear documentation on setting up Warbler with Maven (while Goldspike came with a plugin) &#8211; so I decided to try and pull it together so that I could incorporate the Rails app into a larger Java product.</p>
<p>First of all I wanted to put my Rails application&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I have recently been working on mixing together a Ruby on Rails application with an Enterprise app.   Initially I was looking into doing it with Goldspike, however after picking up that it was going out of fashion and being replaced with Warbler I decided to use that.   I couldn&#8217;t find any clear documentation on setting up Warbler with Maven (while Goldspike came with a plugin) &#8211; so I decided to try and pull it together so that I could incorporate the Rails app into a larger Java product.</p>
<p>First of all I wanted to put my Rails application into a Maven like directory structure so I created /src/main/rails and put the app in there,  then I knocked up a pretty standard POM for a WAR file.  Next up I wanted to Warble the project so I first up I installed the gem.</p>
<pre class="brush: xml;">pdodds:(svn)trunk[trunk:4184]/src/main/rails$ sudo gem install warbler
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed warbler-0.9.11
1 gem installed
Installing ri documentation for warbler-0.9.11...
Installing RDoc documentation for warbler-0.9.11...
pdodds:(svn)trunk[trunk:4184]/src/main/rails$
</pre>
<p>Then I pluginize the Warble so that it will be available in my project using <code>warble pluginize</code>.</p>
<p>Next up I wanted to get my Maven pom sorted out &#8211; the quickest way I could find to get Warble integrated was through the jruby-rake-plugin.  Adding the following plugin to my pom.xml ensures that the gems that I need are installed by the jruby plugin and then warble can be called in the compile phase.</p>
<pre class="brush: xml;">&lt;plugin&gt;
	&lt;groupId&gt;org.jruby.plugins&lt;/groupId&gt;
	&lt;artifactId&gt;jruby-rake-plugin&lt;/artifactId&gt;
	&lt;version&gt;1.1.4&lt;/version&gt;
	&lt;executions&gt;
		&lt;execution&gt;
			&lt;id&gt;install-gems&lt;/id&gt;
			&lt;phase&gt;process-resources&lt;/phase&gt;
				&lt;goals&gt;
					&lt;goal&gt;install-gems&lt;/goal&gt;
				&lt;/goals&gt;
				&lt;configuration&gt;
					&lt;gems&gt;warbler,rails&lt;/gems&gt;
				&lt;/configuration&gt;
		&lt;/execution&gt;
		&lt;execution&gt;
				&lt;id&gt;build-war&lt;/id&gt;
				&lt;phase&gt;compile&lt;/phase&gt;
				&lt;goals&gt;
					&lt;goal&gt;rake&lt;/goal&gt;
				&lt;/goals&gt;
				&lt;configuration&gt;
					&lt;launchDirectory&gt;${basedir}/src/main/rails
					&lt;/launchDirectory&gt;
			    	        &lt;args&gt;war:clean war&lt;/args&gt;
				&lt;/configuration&gt;
	           &lt;/execution&gt;
	&lt;/executions&gt;
&lt;/plugin&gt;
</pre>
<p>In the first instance of the execution of the jruby plugin we pull down and install the gems that we are going to use,  in the second we actually call the Warble goals in the project to create the WAR file.</p>
<p>In order to quickly integrate this process with the standard WAR building in Maven we need to configure the Maven WAR plugin,  you could also change the Warble output but in the end I found this way worked when I wanted to use the Jetty plugin.</p>
<pre class="brush: xml;">&lt;plugin&gt;
	&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
	&lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
	&lt;configuration&gt;
		&lt;webappDirectory&gt;${basedir}/src/main/rails/tmp&lt;/webappDirectory&gt;
        &lt;/configuration&gt;
&lt;/plugin&gt;</pre>
<p>While this is pretty brief hopefully it helps others get going and I&#8217;m very open to alternate or better ways to achieve the same goal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiveclouds.com/2008/10/19/mixing-maven-and-warbler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PaaS growing all the time</title>
		<link>http://www.fiveclouds.com/2008/04/14/paas-growing-all-the-time/</link>
		<comments>http://www.fiveclouds.com/2008/04/14/paas-growing-all-the-time/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 02:49:34 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[enterprise2.0]]></category>
		<category><![CDATA[exist]]></category>
		<category><![CDATA[paas]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://www.fiveclouds.com/?p=36</guid>
		<description><![CDATA[<p>Well these are certainly the days of Platform As A Service (PAAS), and imagine we are just really seeing the beginning of the compute cloud.  Though the definition of what is really a Platform is probably up for <a href="http://blogs.zdnet.com/Hinchcliffe/?p=166">grabs</a>, and Google are in the game <a href="http://tinyurl.com/5bzgom">now</a>.   Though what is really exciting is the speed at with which we are seeing adoption and effect are now reflection of an <a href="http://bexhuff.com/2007/12/enterprise-2-0-the-death-of-slow-business-process">Enterprise 2.0</a> world (maybe this is now Adoption 2.0 &#8211; a new world where we can see adoption of a technology realtime).  </p>
<p>The really exciting thing here&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Well these are certainly the days of Platform As A Service (PAAS), and imagine we are just really seeing the beginning of the compute cloud.  Though the definition of what is really a Platform is probably up for <a href="http://blogs.zdnet.com/Hinchcliffe/?p=166">grabs</a>, and Google are in the game <a href="http://tinyurl.com/5bzgom">now</a>.   Though what is really exciting is the speed at with which we are seeing adoption and effect are now reflection of an <a href="http://bexhuff.com/2007/12/enterprise-2-0-the-death-of-slow-business-process">Enterprise 2.0</a> world (maybe this is now Adoption 2.0 &#8211; a new world where we can see adoption of a technology realtime).  </p>
<p>The really exciting thing here is the number of players (<a href="http://www.fiveclouds.com/wp-admin/www.mor.ph">Morph</a>, <a href="http://www.bungeelabs.com/">Bungee</a>, <a href="http://heroku.com/">Heroku</a>, <a href="http://www.rightscale.com/">RightScale</a>) since the more the minds converge the more we see the benefits broaden.  At Exist we have been using Morph as a platform for our clients,  it allows us to immediately deploy client sites and then collaborate in a kinda UAT environment which is both easy and quick.  This kind of Infrastructure-on-demand is really a huge benefit &#8211; the virtual nature plays so easily in the hands of a collaboration based development company.</p>
<p>What is also important is it fits with out Web 2.0 tooling &#8211; as a company we actually choose the environment with the client (it can be anything from <a href="http://www.basecamphq.com/">BaseCamp</a> or <a href="http://www.atlassian.com/software/jira/">JIRA</a> and our dev teams are up on lots of tools).  The approach is always agile and that usually means a number of environments &#8211; Suddenly we are switching up from lots of servers to leveraging the cloud where it is a real blessing.  Real-time development without the hassle of deployment and administration,  giving our sys-admins the chance to work on strategic plans rather than operational needs.</p>
<p>With Morph getting ready to IPO in the Philippines it will be an exciting time to Rails developers looking to push products to market faster than ever.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiveclouds.com/2008/04/14/paas-growing-all-the-time/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Learning a little Ruby every day</title>
		<link>http://www.fiveclouds.com/2008/04/09/learning-a-little-ruby-every-day/</link>
		<comments>http://www.fiveclouds.com/2008/04/09/learning-a-little-ruby-every-day/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 21:05:06 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[haml]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.fiveclouds.com/?p=35</guid>
		<description><![CDATA[<p>While I still have a lot going one I have been trying to get more time to pick up on Ruby and Rails.  I have to admit coming from a long history of statically typed languages it has taken a bit of time,  and losing the code completion of the Eclipse IDE that I have been using for Java development for so long took its toll.  Still I have to admit I&#8217;m enjoying the language more every day.</p>
<p>Some of the nice components I&#8217;ve seen included the ability to sum calculated values from arrays where the method is accessing the&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>While I still have a lot going one I have been trying to get more time to pick up on Ruby and Rails.  I have to admit coming from a long history of statically typed languages it has taken a bit of time,  and losing the code completion of the Eclipse IDE that I have been using for Java development for so long took its toll.  Still I have to admit I&#8217;m enjoying the language more every day.</p>
<p>Some of the nice components I&#8217;ve seen included the ability to sum calculated values from arrays where the method is accessing the ActiveRecord fields on the same object.</p>
<pre><code class="ruby">
def sum_invoices
 invoices.to_a.sum(&#038;:invoice_total)
end
</code></pre>
<p>Also I have been working with <a href="http://haml.hamptoncatlin.com/">HAML</a> after being introduced to it by one of the team and while it does take me back a little to all those Java templating languages and I now see how useful it is in pushing people toward using CSS.</p>
<p>Other nice little features I have been picking up on include using <a href="http://manuals.rubyonrails.com/read/chapter/26">ruby in fixtures</a> which includes being able to create large number amounts of test data.  As I get more into it the rewarding part the pace of my development appears to be picking up :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiveclouds.com/2008/04/09/learning-a-little-ruby-every-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching Languages</title>
		<link>http://www.fiveclouds.com/2008/03/28/switching-languages/</link>
		<comments>http://www.fiveclouds.com/2008/03/28/switching-languages/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 09:44:59 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.fiveclouds.com/2008/03/28/switching-languages/</guid>
		<description><![CDATA[<p>In the past few months I have spent a lot of time discussing the state of language adoption these days. &#160; Much of my time in the past was spent in the financial services in a world of C++, Java and .Net (probably in those proportions &#8211; mixed in with a lot of database-centric stuff and legacy languages i.e. COBOL). &#160; Back in 2003 I was heavily involved in bringing more open source into the mix &#8211; it was heavily in the Java world. &#160;Working with large investment banks it was an interesting journey pushing through the barriers to get&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>In the past few months I have spent a lot of time discussing the state of language adoption these days. &nbsp; Much of my time in the past was spent in the financial services in a world of C++, Java and .Net (probably in those proportions &#8211; mixed in with a lot of database-centric stuff and legacy languages i.e. COBOL). &nbsp; Back in 2003 I was heavily involved in bringing more open source into the mix &#8211; it was heavily in the Java world. &nbsp;Working with large investment banks it was an interesting journey pushing through the barriers to get products like JBoss into production and to allow the big savings. &nbsp; Back in 2005 I was hacking stuff with early additions of <a href="http://groovy.codehaus.org/">Groovy</a>, &nbsp;the idea was to use scripting languages to allow business people to build a DSL that would allow them to define rules without getting stuck into XML (there was a lot of that going around). &nbsp;While that work didn&#8217;t get into production it did get me thinking more about DSL&#8217;s and of course led me to Ruby. &nbsp;While I started working with Rails back then I was ultimately pulled away into the SOA world again with <a href="http://servicemix.apache.org">ServiceMix</a> &#8211; and then into the Maven space with DevZuz &#8211; and also more into Eclipse et al.</p>
<p>Now at <a href="http://www.exist.com">Exist</a> I have been given the chance to look across more technologies again and so it is back to Ruby. &nbsp; A lot has changed with a huge number of advances in Behaviour Driven Development with Rails 2.0 coming out. &nbsp;I have to admit there is a lot to pick up again, &nbsp;and I&#8217;m taking time to catch up with it all again. &nbsp;Though as I start to enter the Ruby world it is nice to see a lot of really nice tools out there to make the work of creating rich solutions easier and easier. &nbsp;Lately for me it has been working with <a href="http://newgem.rubyforge.org/">newgem</a> and <a href="http://rspec.info/">rspec</a>, &nbsp;to start to allow some definition around a component layer for a pet project.</p>
<p>Also I got a chance to hang out with the growing Ruby on Rails scene in Manila which was fun &#8211; if you are out here for a while its worth catching up with <a href="http://groups.google.com/group/ruby-phil">them</a>. &nbsp; I&#8217;m sure in the next few months I&#8217;ll be seeing more and more of Ruby and Rails, and probably a bit of <a href="http://merbivore.com/">Merb</a> and ActiveResource too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiveclouds.com/2008/03/28/switching-languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prototyping with ActiveScaffold</title>
		<link>http://www.fiveclouds.com/2008/03/06/prototyping-with-activescaffold/</link>
		<comments>http://www.fiveclouds.com/2008/03/06/prototyping-with-activescaffold/#comments</comments>
		<pubDate>Thu, 06 Mar 2008 01:14:57 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.fiveclouds.com/2008/03/06/prototyping-with-activescaffold/</guid>
		<description><![CDATA[<p><img alt="Rails Code" align="left" hspace="5" src="http://www.fiveclouds.com/wp-content/uploads/2008/03/picture-3.png" /></p>
<p>There are many times when I need to put together an idea really quickly and lately I have been trying to use Ruby on Rails more, &#160;in the past couple of months I&#8217;ve been trying to make that more of a thing.</p>
<p>Lately I needed to mock up a few screens for basic data entry and I decided to put something together using rails. &#160;It was an easy start with a few migrations (Rails 2.0 style) to get a schema in place &#8211; then I considered a UI. &#160;Originally I thought about scaffold, but I was never a big&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p><img alt="Rails Code" align="left" hspace="5" src="http://www.fiveclouds.com/wp-content/uploads/2008/03/picture-3.png" /></p>
<p>There are many times when I need to put together an idea really quickly and lately I have been trying to use Ruby on Rails more, &nbsp;in the past couple of months I&#8217;ve been trying to make that more of a thing.</p>
<p>Lately I needed to mock up a few screens for basic data entry and I decided to put something together using rails. &nbsp;It was an easy start with a few migrations (Rails 2.0 style) to get a schema in place &#8211; then I considered a UI. &nbsp;Originally I thought about scaffold, but I was never a big fan of generating lots of code that I would probably leave lying around. &nbsp;I wanted something that would give me a shell of functionality (in this case to allow some basic CRUD operations) but not litter the application with code that I would probably want to remove later. &nbsp;Enter <a href="http://www.activescaffold.com">ActiveScaffold</a>.</p>
<p>It only took a couple of hours to get a &nbsp;a five controllers in place to allow me to manage most of the data, &nbsp;was it bullet-proof ? err.. no &#8211; but then again it was functional and&nbsp;step in the right direction. &nbsp;Take a look at the <a href="http://demo.activescaffold.com/users">demos</a>, &nbsp;they are worth a look, and when you get a chance have a look throwing it in to see what it can do :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiveclouds.com/2008/03/06/prototyping-with-activescaffold/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
