<?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>Den Of Ubiquity &#187; Software Development</title>
	<atom:link href="http://www.denofubiquity.com/category/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.denofubiquity.com</link>
	<description>Buzzword-enriched Software Development Content</description>
	<lastBuildDate>Sun, 27 Sep 2009 20:10:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Barbler: Integrating JRuby Warbler into Apache Builder</title>
		<link>http://www.denofubiquity.com/ruby/barbler/</link>
		<comments>http://www.denofubiquity.com/ruby/barbler/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 21:54:14 +0000</pubDate>
		<dc:creator>ijonas</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[buildr]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[oss]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[war]]></category>
		<category><![CDATA[warbler]]></category>

		<guid isPermaLink="false">http://www.denofubiquity.com/?p=319</guid>
		<description><![CDATA[After having used Apache Builder for a week and extracted our Warbler-code into a bonafide extension, I&#8217;m sharing it with the community under the fetching name Barbler.
Barbler integrates itself between the build and packaging stages of the Apache Builder lifecycle and makes calls into Warbler to automate WAR-file creation. Now Warbler does a really good [...]]]></description>
			<content:encoded><![CDATA[<p>After having used Apache Builder for a week and extracted our Warbler-code into a bonafide extension, I&#8217;m sharing it with the community under the fetching name <strong>Barbler</strong>.</p>
<p>Barbler integrates itself between the build and packaging stages of the Apache Builder lifecycle and makes calls into Warbler to automate WAR-file creation. Now Warbler does a really good job for packaging standalone Rails apps. Unfortunately I needed something more integrated into our application build process, that pulls in our Spring Framework-based Java code, Scala code, and Rails application and produces a single WAR-file containing all dependent libraries, Rails code, XML deployment descriptors and Java class files. Apache Builder does everything other than the Rails-packaging. Barbler steps to provide that missing step.</p>
<p>Create a barbler.rb file in your project folder, which also contains your buildfile and copy the following contents into it:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># Barbler </span>
<span style="color:#008000; font-style:italic;"># is an Apache Builder extension to integrate the JRuby Warbler gem.</span>
<span style="color:#008000; font-style:italic;"># For tips on how to use Barbler checkout http://www.denofubiquity.com/ruby/barbler/</span>
<span style="color:#008000; font-style:italic;"># </span>
<span style="color:#008000; font-style:italic;"># This code is licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)</span>
<span style="color:#008000; font-style:italic;"># Please distribute Barbler code with this code intact.</span>
<span style="color:#008000; font-style:italic;"># (c) Ijonas Kisselbach 2009</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'warbler'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">module</span> Barbler
  <span style="color:#9966CC; font-weight:bold;">include</span> Extension
&nbsp;
  first_time <span style="color:#9966CC; font-weight:bold;">do</span>
    <span style="color:#008000; font-style:italic;"># Define task not specific to any projet.</span>
    desc <span style="color:#996600;">'Warbles Rails sourcecode tree into a staging folder'</span>
    Project.<span style="color:#9900CC;">local_task</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'warble'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'build'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>name<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#996600;">&quot;Warbling #{name}&quot;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>   
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  before_define <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>project<span style="color:#006600; font-weight:bold;">|</span>    
    project.<span style="color:#9900CC;">task</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'warble'</span><span style="color:#006600; font-weight:bold;">=&gt;</span>project.<span style="color:#9900CC;">task</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'build'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    project.<span style="color:#9900CC;">group</span> <span style="color:#006600; font-weight:bold;">||</span>= project.<span style="color:#9900CC;">parent</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> project.<span style="color:#9900CC;">parent</span>.<span style="color:#9900CC;">group</span> <span style="color:#006600; font-weight:bold;">||</span> project.<span style="color:#9900CC;">name</span>
    project.<span style="color:#9900CC;">version</span> <span style="color:#006600; font-weight:bold;">||</span>= project.<span style="color:#9900CC;">parent</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> project.<span style="color:#9900CC;">parent</span>.<span style="color:#9900CC;">version</span>    
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># To use this method in your project:</span>
  <span style="color:#008000; font-style:italic;">#   warble(:rails =&gt; path_to(:rails), :tasks =&gt; [:app, :public])</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> warble<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">*</span>args<span style="color:#006600; font-weight:bold;">&#41;</span>
    options = args.<span style="color:#9900CC;">pop</span>
    rails_path = options<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:rails</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    warble_tasks = options<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:tasks</span><span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
    <span style="color:#008000; font-style:italic;"># Define the warble task for this particular project.</span>
    <span style="color:#6666ff; font-weight:bold;">Rake::Task</span>.<span style="color:#9900CC;">define_task</span> <span style="color:#996600;">'warble'</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>task<span style="color:#006600; font-weight:bold;">|</span>
      <span style="color:#008000; font-style:italic;"># get all the important components from the Rails GUI into the staging directory</span>
      <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Warbling #{rails_path}&quot;</span>
      <span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">chdir</span><span style="color:#006600; font-weight:bold;">&#40;</span>rails_path<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
        warble_cfg = <span style="color:#CC0066; font-weight:bold;">eval</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;config/warble.rb&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">|</span>f<span style="color:#006600; font-weight:bold;">|</span> f.<span style="color:#9900CC;">read</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#6666ff; font-weight:bold;">Warbler::Task</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:war</span>, warble_cfg<span style="color:#006600; font-weight:bold;">&#41;</span>
        warble_tasks.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">|</span>task<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#6666ff; font-weight:bold;">Rake::Task</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;war:#{task}&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">invoke</span><span style="color:#006600; font-weight:bold;">&#125;</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#6666ff; font-weight:bold;">Buildr::Project</span>
  <span style="color:#9966CC; font-weight:bold;">include</span> Barbler
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Add the folllowing line to the top of your buildfile:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">warble<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:rails</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> path_to<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:rails</span><span style="color:#006600; font-weight:bold;">&#41;</span>, <span style="color:#ff3333; font-weight:bold;">:tasks</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:app</span>, <span style="color:#ff3333; font-weight:bold;">:public</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>You can then define your warble task using the following line</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">warble<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:rails</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> path_to<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:rails</span><span style="color:#006600; font-weight:bold;">&#41;</span>, <span style="color:#ff3333; font-weight:bold;">:tasks</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:app</span>, <span style="color:#ff3333; font-weight:bold;">:public</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p> whereby the first parameter is a path string to where your Rails code is located. You may locate your code in src/main/rails in which case you&#8217;d use</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">warble<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:rails</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> path_to<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:source</span>, <span style="color:#ff3333; font-weight:bold;">:main</span>, <span style="color:#ff3333; font-weight:bold;">:rails</span><span style="color:#006600; font-weight:bold;">&#41;</span>, <span style="color:#ff3333; font-weight:bold;">:tasks</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:app</span>, <span style="color:#ff3333; font-weight:bold;">:public</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>The second parameter is the list of Warbler tasks that you&#8217;d like to have executed. See the Warbler documentation for more help, or check out the Warbler source code &#8211; it&#8217;s very readable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.denofubiquity.com/ruby/barbler/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Integrating Warbler and Buildr into Scala, JRuby, Java and Rails bliss</title>
		<link>http://www.denofubiquity.com/ruby/integrating-warbler-and-buildr-into-scala-jruby-java-rails-bliss/</link>
		<comments>http://www.denofubiquity.com/ruby/integrating-warbler-and-buildr-into-scala-jruby-java-rails-bliss/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 14:24:25 +0000</pubDate>
		<dc:creator>ijonas</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[apache buildr]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[buildr]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[jruby warbler scala java build apache buildr maven ant]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[warbler]]></category>

		<guid isPermaLink="false">http://www.denofubiquity.com/?p=297</guid>
		<description><![CDATA[At Vamosa we&#8217;re big fans of the Java Virtual Machine. It allows us to use the right tool for the job and deliver a high-quality consistent product for our end-users, whilst still getting the most of our developers. For years we were a .NET and Java shop. Our GUI developers would work in Visual Studio [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://www.vamosa.com">Vamosa</a> we&#8217;re big fans of the Java Virtual Machine. It allows us to use the right tool for the job and deliver a high-quality consistent product for our end-users, whilst still getting the most of our developers. For years we were a .NET and Java shop. Our GUI developers would work in Visual Studio writing a C# application that via SOAP webservices would talk to the Java-backend. In June 2008 we decided to abandon our .NET Desktop GUI and redevelop and expand its functionality, delivered to the end-user&#8217;s browser using HTML+CSS+JavaScript from our Java-backend.</p>
<p>We spend 7months hacking away trying to get Google Web Toolkit to behave before abandoning ship a month ago and switching to Rails. We already had some success building a MRI-based RubyOnRails application called <a href="http://www.vamosa.com/vamosa-check-and-fix-a315">Vamosa Check and Fix</a>. Our GUI developer pool was loving the ease of web development that comes with Rails, and really hated the total lack of productivity from GWT (worthy of a separate post).</p>
<p>Meanwhile I was experimenting with Scala &#8211; IMO the Java language reinvented for the 21st century. So there we were steaming ahead with JRubyOnRails, old-skool Java Spring-based code, and sexy-new Scala code. Three languages, one set of JVM byte code. So how do you build and package all this code ???</p>
<p>Your options are:</p>
<ul>
<li> Apache Maven &#8211; horrible for legacy projects that don&#8217;t build according to Maven doctrine.</li>
<li> Apache Ant + Ivy &#8211; might be an option to you.</li>
<li> Apache Buildr &#8211; JRuby-based build system</li>
</ul>
<p>For us, Apache Buildr had the best fit because its a DSL based-on Rake, which happily runs on JRuby. It provided the dependency management that kept us coming back to Maven (and quickly running away again). It&#8217;s JRuby/Rake-based allowing for tight integration with Warbler, the JRubyOnRails WAR-packaging gem. And lastly there&#8217;s not a shred of XML in sight. Its a DSL, so the buildfile has a nice declarative feel to it, yet can be modified quickly using some standard Ruby-syntax to provide branching and looping. All the other build systems use XML, and then try and retrofit branching and looping, eg. using  elements.</p>
<p>Today we have all our source code in the following folder structure:</p>
<pre>project
src
|-- main
|   |-- java
|   |-- resources
|   |-- scala
|   `-- webapp
`-- test
|-- java
|-- resources
`-- scala

rails
|-- app
|-- config
|-- db
|-- doc
|-- lib
|-- log
|-- nbproject
|-- public
|-- script
|-- test
|-- tmp
`-- vendor</pre>
<p>and our Apache Buildr buildfile in the root of the project tree looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'buildr'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'buildr/scala'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'warbler'</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># define the version of the Vamosa product</span>
VERSION_NUMBER = <span style="color:#996600;">'3.0.0'</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># define repositories from which artifacts can be downloaded</span>
repositories.<span style="color:#9900CC;">remote</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'http://www.ibiblio.org/maven2/'</span>
repositories.<span style="color:#9900CC;">remote</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'http://scala-tools.org/repo-releases'</span>  <span style="color:#008000; font-style:italic;"># define artifacts that are not available from remote repositories  artifact(&quot;javax.jms:jms:jar:1.1&quot;).from(file(&quot;libs/javax.jms.jar&quot;))  # define the artifacts that the project depends on  SCALA         = group('scala-library', 'scala-compiler', 'axiom-dom', :under=&amp;gt;'org.scala-lang', :version=&amp;gt;'2.7.5')</span>
SCALATEST     = <span style="color:#006600; font-weight:bold;">&#91;</span> <span style="color:#996600;">'org.scala-tools.testing:specs:jar:1.5.0'</span>,<span style="color:#996600;">'org.scalatest:scalatest:jar:0.9.5'</span><span style="color:#006600; font-weight:bold;">&#93;</span>
XUNIT         = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;junit:junit:jar:4.4&quot;</span>, <span style="color:#996600;">&quot;org.dbunit:dbunit:jar:2.2.3&quot;</span>, <span style="color:#996600;">&quot;org.mockito:mockito-all:jar:1.7&quot;</span> <span style="color:#006600; font-weight:bold;">&#93;</span>
JDBC_DRIVERS  = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;mysql:mysql-connector-java:jar:5.1.6&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
HIBERNATE     = <span style="color:#006600; font-weight:bold;">&#91;</span> <span style="color:#996600;">&quot;org.hibernate:hibernate-core:jar:3.3.2.GA&quot;</span>,
  <span style="color:#996600;">&quot;org.hibernate:hibernate-annotations:jar:3.4.0.GA&quot;</span>,
  <span style="color:#996600;">&quot;org.hibernate:hibernate-commons-annotations:jar:3.3.0.ga&quot;</span>,
  <span style="color:#996600;">&quot;org.hibernate:hibernate-search:jar:3.1.0.GA&quot;</span>,
  <span style="color:#996600;">&quot;org.hibernate:hibernate-ehcache:jar:3.3.2.GA&quot;</span>,
  <span style="color:#996600;">&quot;org.hibernate:jtidy-r8:jar:20060801&quot;</span>,
  <span style="color:#996600;">'c3p0:c3p0:jar:0.9.1.2'</span>,
  <span style="color:#996600;">'commons-collections:commons-collections:jar:3.2.1'</span>,
  <span style="color:#996600;">'commons-lang:commons-lang:jar:2.4'</span>,
  <span style="color:#996600;">'net.sf.ehcache:ehcache:jar:1.6.2'</span>,
<span style="color:#996600;">'javax.persistence:persistence-api:jar:1.0'</span><span style="color:#006600; font-weight:bold;">&#93;</span>
<span style="color:#008000; font-style:italic;"># DELETED FURTHER ARTIFACTS FOR SAKE OF BREVITY...</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># now lets do some work</span>
platforms = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;mysql&quot;</span>, <span style="color:#996600;">&quot;oracle&quot;</span>, <span style="color:#996600;">&quot;mssql&quot;</span>, <span style="color:#996600;">&quot;db2&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
platform = <span style="color:#996600;">&quot;mysql&quot;</span>
desc <span style="color:#996600;">'Enterprise Content Governance Platform'</span>
define <span style="color:#996600;">'ContentMigrator'</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  project.<span style="color:#9900CC;">version</span> = VERSION_NUMBER
  project.<span style="color:#9900CC;">group</span> = <span style="color:#996600;">'com.vamosa'</span>
  manifest<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Copyright'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'Vamosa Ltd. (C) 2003-2009'</span>
  compile.<span style="color:#9900CC;">options</span>.<span style="color:#9900CC;">target</span> = <span style="color:#996600;">'1.5'</span>
&nbsp;
  compile.<span style="color:#9900CC;">with</span> HIBERNATE, SPRING, COMMONS, LOGGING, CONTENT_PARSER, QUARTZ, J2EE_API, SCRIPTING, SOAP, JFREE_CHART, JAVASSIST, LUCENE, XALAN
  test.<span style="color:#9900CC;">with</span> XUNIT, SCALATEST
  test.<span style="color:#9900CC;">using</span> <span style="color:#ff3333; font-weight:bold;">:scalatest</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># get all the important components from the Rails GUI into the staging directory</span>
  <span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">chdir</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;rails&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Changed current directory to: #{Dir.pwd}&quot;</span>
    warble_cfg = <span style="color:#CC0066; font-weight:bold;">eval</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;config/warble.rb&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">|</span>f<span style="color:#006600; font-weight:bold;">|</span> f.<span style="color:#9900CC;">read</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#6666ff; font-weight:bold;">Warbler::Task</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:war</span>, warble_cfg<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#6666ff; font-weight:bold;">Rake::Task</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'war:app'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">invoke</span>
    <span style="color:#6666ff; font-weight:bold;">Rake::Task</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'war:public'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">invoke</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Changed current directory to: #{Dir.pwd}&quot;</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># package it up</span>
  package<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:war</span>, <span style="color:#ff3333; font-weight:bold;">:file</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; _<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;target/#{id}-#{VERSION_NUMBER}-#{platform}.war&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">tap</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>task<span style="color:#006600; font-weight:bold;">|</span>
    task.<span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#996600;">'war/*'</span>
    task.<span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#996600;">&quot;src/main/resources/#{platform}.session-factory.xml&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:as</span>=<span style="color:#006600; font-weight:bold;">&amp;</span>gt;<span style="color:#996600;">'WEB-INF/session-factory.xml'</span>
    task.<span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#996600;">'src/main/resources/jboss.jms-context.xml'</span>, <span style="color:#ff3333; font-weight:bold;">:as</span>=<span style="color:#006600; font-weight:bold;">&amp;</span>gt;<span style="color:#996600;">'WEB-INF/jms-context.xml'</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>The key things we like about this setup are:</p>
<ol>
<li> Easily handling dependency artifacts like the Sun API jars locally. For example we store javax.jms.jar in our Git source repo, in the projects libs/ folder and then point to it using artifact(&#8221;javax.jms:jms:jar:1.1&#8243;).from(file(&#8221;libs/javax.jms.jar&#8221;)).</li>
<li> Integrate Warbler tasks and cherry-pick the ones you want to run, such as in our case just war:app &amp; war:public but e.g. not war:xml because our web.xml is stored in src/main/webapp/WEB-INF instead.</li>
<li> Its Ruby so we can use loops &amp; branching such as:</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">%</span>w<span style="color:#006600; font-weight:bold;">&#40;</span>mssql mysql oracle db2<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>platform<span style="color:#006600; font-weight:bold;">|</span>
  package<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:war</span>, <span style="color:#ff3333; font-weight:bold;">:file</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; _<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;target/#{id}-#{VERSION_NUMBER}-#{platform}.war&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">tap</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>task<span style="color:#006600; font-weight:bold;">|</span>
    task.<span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#996600;">'war/*'</span>
    task.<span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#996600;">&quot;src/main/resources/#{platform}.session-factory.xml&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:as</span>=<span style="color:#006600; font-weight:bold;">&amp;</span>gt;<span style="color:#996600;">'WEB-INF/session-factory.xml'</span>
    task.<span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#996600;">'src/main/resources/jboss.jms-context.xml'</span>, <span style="color:#ff3333; font-weight:bold;">:as</span>=<span style="color:#006600; font-weight:bold;">&amp;</span>gt;<span style="color:#996600;">'WEB-INF/jms-context.xml'</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Apache Buildr isn&#8217;t perfect. There are still some weird annoyances around resolving transitive dependencies, i.e. when hibernate.jar in turn depends on commons-logging.jar. But if you find yourself missing commons-logging.jar its easily added.<br />
If something doesn&#8217;t work they way you think it ought to, you can easily dig into Buildr&#8217;s very readable Ruby code, something I couldn&#8217;t do with either Maven or Ant, and either customise it or find a quick workaround. You don&#8217;t have this black-box barrier between your buildscript and its output.</p>
<p>UPDATE: A nicer way of integrating Warbler and Buildr can be achieved using my Buildr extension, <a href="http://www.denofubiquity.com/ruby/barbler/">Barbler</a>. <a href="http://www.vamosa.com"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.denofubiquity.com/ruby/integrating-warbler-and-buildr-into-scala-jruby-java-rails-bliss/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JRuby-based Chat Server using Terracotta</title>
		<link>http://www.denofubiquity.com/ruby/jruby-based-chat-server-using-terracotta/</link>
		<comments>http://www.denofubiquity.com/ruby/jruby-based-chat-server-using-terracotta/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 05:59:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[clustering]]></category>
		<category><![CDATA[dso]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[terracotta]]></category>

		<guid isPermaLink="false">http://www.denofubiquity.com/?p=261</guid>
		<description><![CDATA[Two technologies are currently capturing my imagination, JRuby and Terracotta. JRuby is simply for my purposes the most effective language to tackle most of my computing challenges. Terracotta allows me to take those problems and solve them on large clusters of cheap servers in clouds such as those provided by Amazon EC2.
Getting started with JRuby+Terracotta [...]]]></description>
			<content:encoded><![CDATA[<p>Two technologies are currently capturing my imagination, <a href="http://kenai.com/projects/jruby/pages/Home">JRuby</a> and <a href="http://www.terracotta.org/">Terracotta</a>. JRuby is simply for my purposes the most effective language to tackle most of my computing challenges. Terracotta allows me to take those problems and solve them on large clusters of cheap servers in clouds such as those provided by Amazon EC2.</p>
<p>Getting started with JRuby+Terracotta requires a bit of trial and error as its not as well documented as good old Java+Terracotta. The only post you’re likely to find is one by Jonas Boner (see below). During subsequent revisions of both Terracotta as well as JRuby, the example had stopped working. These files bring that example update to date for JRuby 1.3.1 and Terracotta 3.0.1.</p>
<p>You can download the revised source code from <a href="http://github.com/ijonas/terracotta-jruby-chat/tree/master">my github account</a>. You will need installs of both JRuby and Terracotta with JRUBY_HOME and TC_HOME pointing to the base folders of both products respectively, e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">JRUBY_HOME</span>=<span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>java<span style="color: #000000; font-weight: bold;">/</span>jruby-1.3.1
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">TC_HOME</span>=<span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>java<span style="color: #000000; font-weight: bold;">/</span>terracotta-3.0.1</pre></div></div>

<p>Once these environment variables have been setup you can start a Terracotta server, followed launching multiple clients by typing:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>chat.sh</pre></div></div>

<p><strong>Background</strong></p>
<p>The key to fixing the example was fixing the java.lang.NoClassDefFoundError: com/tc/object/event/DmiManager, caused by the references to com.tc.object.bytecode.Manager in the terracotta.rb file:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">WRITE_LOCK = com.<span style="color:#9900CC;">tc</span>.<span style="color:#9900CC;">object</span>.<span style="color:#9900CC;">bytecode</span>.<span style="color:#6666ff; font-weight:bold;">Manager::LOCK_TYPE_WRITE</span>
READ_LOCK = com.<span style="color:#9900CC;">tc</span>.<span style="color:#9900CC;">object</span>.<span style="color:#9900CC;">bytecode</span>.<span style="color:#6666ff; font-weight:bold;">Manager::LOCK_TYPE_READ</span>
CONCURRENT_LOCK = com.<span style="color:#9900CC;">tc</span>.<span style="color:#9900CC;">object</span>.<span style="color:#9900CC;">bytecode</span>.<span style="color:#6666ff; font-weight:bold;">Manager::LOCK_TYPE_CONCURRENT</span></pre></div></div>

<p>Replacing the above fragment with:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">WRITE_LOCK = <span style="color:#006666;">2</span>
READ_LOCK = <span style="color:#006666;">1</span>
CONCURRENT_LOCK = <span style="color:#006666;">4</span></pre></div></div>

<p>and the whole example springs to life. My next problem to solve is that of Rubifying the Workmanager examples from chapter 11 of the &#8220;Definitive Guide to Terracotta&#8221; book.</p>
<p><strong>Useful Links</strong></p>
<ul>
<li><a href="http://jonasboner.com/2007/02/05/clustering-jruby-with-open-terracotta.html">Clustering JRuby with Terracotta</a></li>
<li><a href="http://weblambdazero.blogspot.com/2009/03/incoming-revolution-clojure-terracotta.html">Incoming Revolution: Clojure + Terracotta</a></li>
<li><a href="https://github.com/ijonas/">My github pages</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.denofubiquity.com/ruby/jruby-based-chat-server-using-terracotta/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>TechMeetup Glasgow #2</title>
		<link>http://www.denofubiquity.com/media-technology/techmeetup-glasgow-2/</link>
		<comments>http://www.denofubiquity.com/media-technology/techmeetup-glasgow-2/#comments</comments>
		<pubDate>Tue, 26 May 2009 05:16:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Media & Technology]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.denofubiquity.com/?p=231</guid>
		<description><![CDATA[TechMeetup Glasgow #2 is taking place on June 3rd.
The first TechMeetup exceeded our expectations. Three great speakers created some vigorous debates. When we asked you to &#8220;bring yourself, your experiences, and your opinions&#8221;, you certainly heeded our call.
We also got some great feedback and with that in mind we&#8217;re making some small changes. We&#8217;re going [...]]]></description>
			<content:encoded><![CDATA[<div><strong>TechMeetup Glasgow #2 is taking place on June 3rd.</strong></p>
<p>The first TechMeetup exceeded our expectations. Three great speakers created some vigorous debates. When we asked you to &#8220;bring yourself, your experiences, and your opinions&#8221;, you certainly heeded our call.</p>
<p>We also got some great feedback and with that in mind we&#8217;re making some small changes. We&#8217;re going to have one less speaker, allowing for more debate and more informal chat in between speaker presentations. We&#8217;ll also have more bottles of water available.</p>
<p><strong></strong></p>
<p><img class="alignright size-full wp-image-223" style="margin: 10px;" title="TechMeetup" src="http://www.denofubiquity.com/wp-content/uploads/2009/04/logo.gif" alt="TechMeetup" width="177" height="165" />This month&#8217;s speaker&#8217;s topics are as follows:</p>
<p><strong>Dave Sapien - New challenges in UI</strong>. A look at new technologies, the User Interfaces that control them and what challenges we can face with new thinking.</p>
<p><strong>John Gallagher - Smarter than the Average Application. </strong>Users aren&#8217;t stupid and lazy, but much modern software is. That&#8217;s John&#8217;s opinion. He&#8217;ll be telling us why and the AI techniques he&#8217;s using to make Lapsus, his time tracker, smarter than the average application.</p>
<p>Like last month, we&#8217;re holding this month&#8217;s meetup in room M329 of James Weir Building at Strathclyde Uni. So bring yourself, your experiences, and your opinions. We&#8217;ll bring the drinks, the pizza, and the speakers.</p>
<p>See you then &amp; there,</p>
<p>Sam, Ijonas &amp; Heidi.</p>
<address></address>
<address></address>
<address style="padding-left: 30px;">Event: TechMeetup Glasgow<br />
Date &amp; Time: 3rd June 2009 &#8211; 7pm (the pizza is delivered then)<br />
Directions: (lift to 3rd floor) Room M329, James Weir Building, Strathclyde Campus, 75 Montrose Street, Glasgow.</address>
<address style="padding-left: 30px;">Here&#8217;s the <a id="a1ol" title="Google Streetview" href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=james+weir+building,+glasgow&amp;sll=55.877982,-4.288263&amp;sspn=0.015744,0.043216&amp;ie=UTF8&amp;ll=55.861766,-4.245186&amp;spn=0.007875,0.021608&amp;z=16&amp;iwloc=A&amp;layer=c&amp;cbll=55.861857,-4.245153&amp;panoid=l0DtlqmN9fAn-UhQ99_mAA&amp;cbp=12,323.17145145811696,,0,-12.33862959285007">Google Streetview</a><br />
And here&#8217;s the <a id="zqo:" title="Google Maps view" href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=james+weir+building,+glasgow&amp;sll=55.861766,-4.245186&amp;sspn=0.007875,0.021608&amp;ie=UTF8&amp;ll=55.861874,-4.245679&amp;spn=0.007586,0.021608&amp;z=16&amp;iwloc=A">Google Maps view</a>.</address>
<address style="padding-left: 30px;">And here&#8217;s the  <a href="http://www.denofubiquity.com/wp-content/uploads/2009/05/techmeetup-glasgow-2.ics">iCal Entry</a> to stick in your calendar.</address>
<address style="padding-left: 30px;"></address>
<address style="padding-left: 30px;"></address>
<address style="padding-left: 30px;"><strong>Contact:</strong></address>
<address style="padding-left: 30px;"><a id="q151" title="o.s.collins@gmail.com" href="mailto:o.s.collins@gmail.com">o.s.collins@gmail.com</a></address>
<address style="padding-left: 30px;"><a id="plfv" title="ijonas.kisselbach@gmail.com" href="mailto:ijonas.kisselbach@gmail.com">ijonas.kisselbach@gmail.com</a></address>
<address style="padding-left: 30px;"><a id="ov13" title="heidi@sauceandvinegar.com" href="mailto:heidi@sauceandvinegar.com">heidi@sauceandvinegar.com</a></address>
<address style="padding-left: 30px;">or twitter: <a id="si4g" title="@techmeetup" href="http://twitter.com/techmeetup">@techmeetup</a></address>
<address style="padding-left: 30px;"></address>
<address>Visit our site <a id="xdgt" title="http://www.techmeetup.co.uk" href="http://www.techmeetup.co.uk/">http://www.techmeetup.co.uk</a> for a backgrounder on TechMeetup including past talks.</address>
<address></address>
<address>
</address>
<address><span style="font-style: normal;"><strong>And a big thanks to <a href="http://www.innovationcentre.org/hillington/">Hillington Innovation</a> who are sponsoring TechMeetup<br />
Glasgow.</strong></span></address>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.denofubiquity.com/media-technology/techmeetup-glasgow-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Announcing TechMeetup Glasgow</title>
		<link>http://www.denofubiquity.com/media-technology/announcing-techmeetup-glasgow/</link>
		<comments>http://www.denofubiquity.com/media-technology/announcing-techmeetup-glasgow/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 18:02:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Media & Technology]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[glasgow]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[Strathclyde University]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[techmeetup]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.denofubiquity.com/?p=218</guid>
		<description><![CDATA[On the 22nd April, Tech Meetup Glasgow will start and it'd be great to have you along.  Three excellent speakers are lined up, covering a variety of topics - from running a ticketing startup, to an introduction to developing for Android. Kick-off is at 7pm in Room M329 of the James Weir building on Stratchlyde University's campus.   

]]></description>
			<content:encoded><![CDATA[<p><strong>Tech Meetup is coming to Glasgow on April 22nd.</strong></p>
<p><img class="alignright size-full wp-image-223" style="margin: 10px;" title="TechMeetup" src="http://www.denofubiquity.com/wp-content/uploads/2009/04/logo.gif" alt="TechMeetup" width="177" height="165" />There are a ton of events for entrepreneurs to meet investors and bankers and VC’s but let’s face it, we’re tech, so let’s talk about tech. No name badges, no business models, just the growth of our eco-system and the advance of our tech – be it web apps, software, mobile apps, hardware, games… There’s an overlap across many of these and it’s always interesting to hear what people are hacking together, know about or have worked on before.</p>
<p>TechMeetup is just that &#8211; a space for everyone to meet up, talk about some of the cool stuff we’re doing, or get help on our projects from others.  It&#8217;s been running in Edinburgh for several months, with a good turn out, nice folks and great speakers – held together with the magic of pizza and beer.</p>
<p>On the 22nd April, Tech Meetup Glasgow will start and it&#8217;d be great to have you along.  Three excellent speakers are lined up, covering a variety of topics &#8211; from running a ticketing startup, to an introduction to developing for Android. Kick-off is at 7pm in Room M329 of the James Weir building on Stratchlyde University&#8217;s campus.</p>
<p>With your help and feedback, we are going to work hard to make this functional for everyone around us – a monthly event to allow you to share news, demo the technologies and projects that excite you, meet people with complimentary skillsets that may want to help out, and generally get to know others in the tech community.</p>
<p>So if that sounds good to you, be great to see you there.  Bring yourself, your experiences and your opinions with you.</p>
<p>Sam, Ijonas &amp; Heidi.</p>
<p>Lastly, visit our site <a id="xdgt" title="http://www.techmeetup.co.uk" href="http://www.techmeetup.co.uk/">http://www.techmeetup.co.uk</a> for a backgrounder on TechMeetup including past talks.</p>
<address> </address>
<address> </address>
<address style="padding-left: 30px;">Event: TechMeetup Glasgow<br />
Date &amp; Time: 22nd April 2009 &#8211; 7pm (the pizza is delivered then)<br />
Directions: (lift to 3rd floor) Room M329, James Weir Building, Strathclyde Campus, 75 Montrose Street, Glasgow.</address>
<address style="padding-left: 30px;">Here&#8217;s the <a id="a1ol" title="Google Streetview" href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=james+weir+building,+glasgow&amp;sll=55.877982,-4.288263&amp;sspn=0.015744,0.043216&amp;ie=UTF8&amp;ll=55.861766,-4.245186&amp;spn=0.007875,0.021608&amp;z=16&amp;iwloc=A&amp;layer=c&amp;cbll=55.861857,-4.245153&amp;panoid=l0DtlqmN9fAn-UhQ99_mAA&amp;cbp=12,323.17145145811696,,0,-12.33862959285007">Google Streetview</a><br />
And here&#8217;s the <a id="zqo:" title="Google Maps view" href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=james+weir+building,+glasgow&amp;sll=55.861766,-4.245186&amp;sspn=0.007875,0.021608&amp;ie=UTF8&amp;ll=55.861874,-4.245679&amp;spn=0.007586,0.021608&amp;z=16&amp;iwloc=A">Google Maps view</a>.</address>
<address style="padding-left: 30px;">And here&#8217;s the <a title="TechMeetup Glasgow iCal Entry" href="http://www.denofubiquity.com/wp-content/uploads/2009/04/techmeetup-glasgow.ics">iCal entry</a> to stick in your calendar.<br />
</address>
<address style="padding-left: 30px;"> </address>
<address style="padding-left: 30px;"> </address>
<address style="padding-left: 30px;"><strong>Contact:</strong></address>
<address style="padding-left: 30px;"><a id="q151" title="o.s.collins@gmail.com" href="mailto:o.s.collins@gmail.com">o.s.collins@gmail.com</a></address>
<address style="padding-left: 30px;"><a id="plfv" title="ijonas.kisselbach@gmail.com" href="mailto:ijonas.kisselbach@gmail.com">ijonas.kisselbach@gmail.com</a></address>
<address style="padding-left: 30px;"><a id="ov13" title="heidi@sauceandvinegar.com" href="mailto:heidi@sauceandvinegar.com">heidi@sauceandvinegar.com</a></address>
<address style="padding-left: 30px;">or twitter: <a id="si4g" title="@techmeetup" href="http://twitter.com/techmeetup">@techmeetup</a></address>
]]></content:encoded>
			<wfw:commentRss>http://www.denofubiquity.com/media-technology/announcing-techmeetup-glasgow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bootstrapping a &#8216;deploy&#8217; user with Capistrano on EC2</title>
		<link>http://www.denofubiquity.com/ruby/bootstrapping-a-deploy-user-with-capistrano-on-ec2/</link>
		<comments>http://www.denofubiquity.com/ruby/bootstrapping-a-deploy-user-with-capistrano-on-ec2/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 08:38:17 +0000</pubDate>
		<dc:creator>ijonas</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Capistrano]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[RubyOnRails]]></category>

		<guid isPermaLink="false">http://www.denofubiquity.com/?p=173</guid>
		<description><![CDATA[Amazon&#8217;s EC2 is rightly so the best thing since sliced bread. All of our hosted services at Vamosa run off EC2. Getting our Ubuntu instances provisioned these days is easily achieved using Capistrano, but when we were still get familiar with &#8216;cap&#8217; it wasn&#8217;t always the case.  
Amazon EC2 uses private/public keys files for [...]]]></description>
			<content:encoded><![CDATA[<p>Amazon&#8217;s EC2 is rightly so the best thing since sliced bread. All of our hosted services at Vamosa run off EC2. Getting our Ubuntu instances provisioned these days is easily achieved using Capistrano, but when we were still get familiar with &#8216;cap&#8217; it wasn&#8217;t always the case.  </p>
<p>Amazon EC2 uses private/public keys files for root user authentication but you want to use those credentials as infrequently as possible. As RubyOnRails users, we are used to setting up a <code>deploy</code> user which we use to run Apache 2 and Phusion Passenger under. We use that same deploy user to connect to our github repositories and pull in code updates. All pretty much standard stuff.</p>
<p>When we using off-the-shelf Ubuntu 8.0.4 AMIs we couldn&#8217;t find any nice Capistrano recipes to setup that initial <code>deploy</code> user and enabling key-based login to that <code>deploy</code> user using our own personal keys.</p>
<p>The following recipe does just that:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;">  desc <span style="color:#996600;">&quot;uploads id_rsa.pub to the EC2 instance's deploy users authorized_keys2 file&quot;</span>
  task <span style="color:#ff3333; font-weight:bold;">:bootstrap_deploy_user</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    <span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">&quot;ssh -i #{aws_private_key_path} root@#{domain} <span style="color:#000099;">\&quot;</span>groupadd admin<span style="color:#000099;">\&quot;</span>&quot;</span>
    <span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">&quot;ssh -i #{aws_private_key_path} root@#{domain} <span style="color:#000099;">\&quot;</span>useradd -d /home/#{user} -s /bin/bash -m #{user}<span style="color:#000099;">\&quot;</span>&quot;</span>
    <span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">&quot;ssh -i #{aws_private_key_path} root@#{domain} <span style="color:#000099;">\&quot;</span>echo #{user}:#{password} | chpasswd<span style="color:#000099;">\&quot;</span>&quot;</span>
    <span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">&quot;ssh -i #{aws_private_key_path} root@#{domain} <span style="color:#000099;">\&quot;</span>usermod -a -G admin deploy<span style="color:#000099;">\&quot;</span>&quot;</span>
    <span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">&quot;ssh -i #{aws_private_key_path} root@#{domain} <span style="color:#000099;">\&quot;</span>mkdir /home/#{user}/.ssh<span style="color:#000099;">\&quot;</span>&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">for</span> key <span style="color:#9966CC; font-weight:bold;">in</span> ssh_options<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:keys</span><span style="color:#006600; font-weight:bold;">&#93;</span>
      <span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">&quot;cat  #{key}.pub | ssh -i #{aws_private_key_path} root@#{domain} <span style="color:#000099;">\&quot;</span>cat &amp;gt;&amp;gt; /home/#{user}/.ssh/authorized_keys2<span style="color:#000099;">\&quot;</span>&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">&quot;ssh -i #{aws_private_key_path} root@#{domain} <span style="color:#000099;">\&quot;</span>chown -R #{user}:#{user} /home/#{user}/.ssh<span style="color:#000099;">\&quot;</span>&quot;</span>
    <span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">&quot;scp -i #{aws_private_key_path} config/deploy_sudoers root@#{domain}:/etc/sudoers&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>You&#8217;ll need to setup Capistrano variables as you can see to make this work. My .caprc file contains the following definition:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">set <span style="color:#ff3333; font-weight:bold;">:aws_private_key_path</span>, <span style="color:#996600;">&quot;/Users/ijonas/.ec2/ec2keypair.pem&quot;</span></pre></div></div>

<p>Our config/deploy.rb contains the following variables:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">set <span style="color:#ff3333; font-weight:bold;">:use_sudo</span>, <span style="color:#0000FF; font-weight:bold;">false</span>
set <span style="color:#ff3333; font-weight:bold;">:user</span>, <span style="color:#996600;">'deploy'</span>
set <span style="color:#ff3333; font-weight:bold;">:password</span>, <span style="color:#996600;">'xxxxx'</span>
set <span style="color:#ff3333; font-weight:bold;">:application</span>, <span style="color:#996600;">&quot;yyyyy.vamosa.com&quot;</span>
set <span style="color:#ff3333; font-weight:bold;">:domain</span>, <span style="color:#996600;">&quot;yyyyy.vamosa.com&quot;</span>
set <span style="color:#ff3333; font-weight:bold;">:deploy_to</span>, <span style="color:#996600;">&quot;/var/www/apps/#{application}&quot;</span></pre></div></div>

<p>The approach is a little bit &#8216;hackish&#8217; but it works for EC2, and keeps your Capistrano setup as close as possible to the best-practice.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.denofubiquity.com/ruby/bootstrapping-a-deploy-user-with-capistrano-on-ec2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running MySQL and RubyOnRails on Windows</title>
		<link>http://www.denofubiquity.com/ruby/running-mysql-and-rubyonrails-on-windows/</link>
		<comments>http://www.denofubiquity.com/ruby/running-mysql-and-rubyonrails-on-windows/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 07:09:30 +0000</pubDate>
		<dc:creator>ijonas</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[RubyOnRails]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.denofubiquity.com/?p=165</guid>
		<description><![CDATA[If you&#8217;re trying to get RubyOnRails connected to MySQL on Windows Vista as we have done recently at Vamosa, then keep in mind that the current latest versions of MySQL and the MySQL gem are incompatible with each other.
At the time of writing, the current versions of MySQL is 5.1 and the MySQL gem is [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" style="margin-left: 10px; margin-right: 10px; border: 0px initial initial;" title="RubyOnRails Logo" src="http://www.denofubiquity.com/wp-content/uploads/2009/03/rails.jpg" border="0" alt="rails.jpg" width="150" height="150" align="right" />If you&#8217;re trying to get RubyOnRails connected to MySQL on Windows Vista as we have done recently at <a href="http://www.vamosa.com">Vamosa</a>, then keep in mind that the current latest versions of MySQL and the MySQL gem are incompatible with each other.</p>
<p>At the time of writing, the current versions of MySQL is 5.1 and the MySQL gem is currently at version 2.7.3.</p>
<p>We were unable to get this combination to work together and ended up reverting to MySQL 5.0 and MySQL gem 2.7.1.</p>
<p><code>gem install -v "2.7.1" mysql</code></p>
<p>I don&#8217;t think you&#8217;re missing anything substantial from either MySQL 5.1 or the 2.7.3 gem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.denofubiquity.com/ruby/running-mysql-and-rubyonrails-on-windows/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CouchDB Presentation at Railscamp UK</title>
		<link>http://www.denofubiquity.com/software-development/couchdb-presentation-at-railscamp-uk/</link>
		<comments>http://www.denofubiquity.com/software-development/couchdb-presentation-at-railscamp-uk/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 21:29:27 +0000</pubDate>
		<dc:creator>ijonas</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[addressability]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[documents]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[horizontal scaling]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://ijonas.wordpress.com/?p=108</guid>
		<description><![CDATA[I&#8217;ve been playing around with and kicking the tyres of CouchDB for a couple of weeks and I&#8217;m truly excited about the project. If I was to use tags to describe CouchDB I&#8217;d use the following:
apache, opensource, documents, metadata, database, json, javascript, REST, addressability, horizontal scaling, erlang.
So I found myself at Railscamp UK on the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with and kicking the tyres of CouchDB for a couple of weeks and I&#8217;m truly excited about the project. If I was to use tags to describe CouchDB I&#8217;d use the following:</p>
<p><code>apache, opensource, documents, metadata, database, json, javascript, REST, addressability, horizontal scaling, erlang.</code></p>
<p>So I found myself at Railscamp UK on the weekend without a ruby+rails topic to really talk about during the presentations part of the camp. I&#8217;m still a noob wrt. Rails, you see. Realising that CouchDB is relevant to most web developers because most developers deal with document-based content at some point and that Ruby, Rails, and Erlang are kindda like the current bratpack (<a href="http://en.wikipedia.org/wiki/John_Hughes_(film_director)">in a John Hughes-sense</a>) of computer languages, I thought it would be a great little topic for a 15-minute presentation.</p>
<p>So I thought I share the slides and some of the code I hacked up on the weekend. First of all the slides&#8230;</p>
<p style="text-align:center;"><a href="http://www.scribd.com/doc/4916889/CouchDB-Railscamp-UK"><img class="aligncenter size-medium wp-image-113" src="http://ijonas.files.wordpress.com/2008/08/couchdb_slides.png?w=300" alt="" width="300" height="225" /></a></p>
<p style="text-align:center;"><a href="http://www.scribd.com/doc/4916889/CouchDB-Railscamp-UK" target="_blank">(click me)</a></p>
<p>You can play about with some sample code that was expanded upon after the presentation. Here&#8217;s a little helper class to interface into CouchDB using JSON and HTTP:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'httparty'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'json/pure'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'find'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> CouchHack
  <span style="color:#9966CC; font-weight:bold;">include</span> HTTParty
  base_uri <span style="color:#996600;">'http://127.0.0.1:5984'</span>
  <span style="color:#CC0066; font-weight:bold;">format</span> <span style="color:#ff3333; font-weight:bold;">:json</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> update<span style="color:#006600; font-weight:bold;">&#40;</span> path, document <span style="color:#006600; font-weight:bold;">&#41;</span>
    options = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:body</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> JSON.<span style="color:#9900CC;">generate</span><span style="color:#006600; font-weight:bold;">&#40;</span>document<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
    <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9966CC; font-weight:bold;">class</span>.<span style="color:#9900CC;">put</span><span style="color:#006600; font-weight:bold;">&#40;</span>path, options <span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> get<span style="color:#006600; font-weight:bold;">&#40;</span>path<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9966CC; font-weight:bold;">class</span>.<span style="color:#9900CC;">get</span><span style="color:#006600; font-weight:bold;">&#40;</span>path<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> create<span style="color:#006600; font-weight:bold;">&#40;</span>db_path, document <span style="color:#006600; font-weight:bold;">&#41;</span>
    options = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:body</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> JSON.<span style="color:#9900CC;">generate</span><span style="color:#006600; font-weight:bold;">&#40;</span>document<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
    <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9966CC; font-weight:bold;">class</span>.<span style="color:#9900CC;">post</span><span style="color:#006600; font-weight:bold;">&#40;</span>db_path, options <span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> define_view<span style="color:#006600; font-weight:bold;">&#40;</span>db_path, design_doc_name, views <span style="color:#006600; font-weight:bold;">&#41;</span>
    document = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;views&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> views <span style="color:#006600; font-weight:bold;">&#125;</span>
    options = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:body</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> JSON.<span style="color:#9900CC;">generate</span><span style="color:#006600; font-weight:bold;">&#40;</span>document<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
    <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9966CC; font-weight:bold;">class</span>.<span style="color:#9900CC;">put</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;#{db_path}/_design/#{design_doc_name}&quot;</span>, options<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Once that&#8217;s in place you can use the CouchHack class by defining a view like so:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">ch = CouchHack.<span style="color:#9900CC;">new</span>
gem_views = <span style="color:#006600; font-weight:bold;">&#123;</span>
  <span style="color:#996600;">&quot;small_gems&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span>
    <span style="color:#006600; font-weight:bold;">&#123;</span>
      <span style="color:#996600;">&quot;map&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;function(doc) { if (doc.length &lt; 3000) emit(doc.path, doc) }&quot;</span>,
    <span style="color:#006600; font-weight:bold;">&#125;</span>,
  <span style="color:#996600;">&quot;large_gems&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span>
    <span style="color:#006600; font-weight:bold;">&#123;</span>
      <span style="color:#996600;">&quot;map&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;function(doc) { if (doc.length &gt; 3000) emit(doc.path, doc) }&quot;</span>,
    <span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
ch.<span style="color:#9900CC;">define_view</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;/railscamp&quot;</span>, <span style="color:#996600;">&quot;gems&quot;</span>, gem_views<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>This design document, as is its known in CouchDB parleance, defines two views (think &#8216;baked queries&#8217;), to return a list of small gems &#8211; those less than 3000 bytes &#8211; and a list of large gems &#8211; those larger than 3000 bytes.</p>
<p>So where do these gems come from and how do they end up in CouchDB ? That&#8217;s what the next and last little fragment of Ruby code does.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC00FF; font-weight:bold;">Find</span>.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'/Library/Ruby/Gems/1.8/gems/'</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>f<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">file</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>f<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">and</span> f.<span style="color:#9900CC;">ends_with</span>?<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'.rb'</span> <span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">begin</span>
      gem_contents = <span style="color:#CC00FF; font-weight:bold;">IO</span>.<span style="color:#9900CC;">read</span><span style="color:#006600; font-weight:bold;">&#40;</span>f<span style="color:#006600; font-weight:bold;">&#41;</span>
      gem_document = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;path&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> f, <span style="color:#996600;">&quot;length&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> gem_contents.<span style="color:#9900CC;">length</span>, <span style="color:#996600;">&quot;content&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> gem_contents <span style="color:#006600; font-weight:bold;">&#125;</span>
      ch.<span style="color:#9900CC;">create</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#996600;">&quot;/railscamp&quot;</span>, gem_document <span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#CC00FF; font-weight:bold;">Exception</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> bang
      <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Skipping #{f}&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>So what happens is that the last little fragment traverses the filesystem starting at /Library/Ruby/Gems/1.8/gems/ and looks for *.rb files. When it finds one it POSTs that whole document including the file length to CouchDB, where it becomes part of the resultset of one of the pre-defined views. These views can be accessed through the following two URLs (assuming the &#8216;railscamp&#8217; DB was used).</p>
<ul>
<li><a href="http://localhost:5984/railscamp/_view/gems/large_gems">http://localhost:5984/railscamp/_view/gems/large_gems</a></li>
<li><a href="http://localhost:5984/railscamp/_view/gems/small_gems">http://localhost:5984/railscamp/_view/gems/small_gems</a></li>
</ul>
<p>Feel free to post comments and ask questions.</p>
<p>Enjoy.</p>
<p>P.S. and if you get a chance to go to a *camp conference, GO! They&#8217;re an amazing format and you&#8217;ll learn soooo much!.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.denofubiquity.com/software-development/couchdb-presentation-at-railscamp-uk/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Quick and dirty RubyAndRails</title>
		<link>http://www.denofubiquity.com/software-development/quick-and-dirty-rubyandrails/</link>
		<comments>http://www.denofubiquity.com/software-development/quick-and-dirty-rubyandrails/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 18:21:44 +0000</pubDate>
		<dc:creator>ijonas</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[metaprogramming]]></category>
		<category><![CDATA[OO]]></category>
		<category><![CDATA[PeepCode]]></category>
		<category><![CDATA[pragmatic bookshelf]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[railscasts]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyOnRails]]></category>
		<category><![CDATA[screencasts]]></category>

		<guid isPermaLink="false">http://ijonas.wordpress.com/?p=101</guid>
		<description><![CDATA[First of all, an admission&#8230; My name is Ijonas, I used to be a Java programmer. I&#8217;ve been clean for a year and a half. So much for my &#8220;Java Anonymous&#8221; meeting.
In that period I&#8217;ve been experimenting and pondering about Ruby and of course RubyOnRails. During such ponderings I&#8217;ve pondered why so many experienced Java [...]]]></description>
			<content:encoded><![CDATA[<p>First of all, an admission&#8230; My name is Ijonas, I used to be a Java programmer. I&#8217;ve been clean for a year and a half. So much for my &#8220;Java Anonymous&#8221; meeting.</p>
<p>In that period I&#8217;ve <img class="alignleft" style="margin:20px;" src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Ruby_cristal.jpg/430px-Ruby_cristal.jpg" alt="Ruby Crystal" width="141" height="197" />been experimenting and pondering about <a href="http://ruby-lang.org/">Ruby</a> and of course <a href="http://rubyonrails.com/">RubyOnRails</a>. During such ponderings I&#8217;ve pondered why so many experienced Java programmers are jumping ship onto duck-typed languaged such as Ruby and <a href="http://python.org">Python</a> (of which I&#8217;m a massive fan).</p>
<p>I&#8217;m going to write a bunch of posts about Ruby and the impact on solving certain class of computing science problems, that I believe are now more readily or more elegantly solvable &#8211; hence my interest in the Ruby language.</p>
<p>But first I thought I&#8217;d share with you, what I think is possibly the easiest, quickest, and dirtiest way of getting a taste of Ruby and Rails.</p>
<p>First of all&#8230; tooling.</p>
<ul>
<li>If you&#8217;re on Mac OS X, buy a copy of <a href="http://macromates.com/">TextMate</a> and <a href="http://rubyonrails.com/down">download Rails 2.1</a>.</li>
<li>If you&#8217;re on Linux, download <a href="http://www.netbeans.org/features/ruby/index.html">NetBeans IDE for Ruby on Rails</a>, and download 2.1.</li>
<li>If you&#8217;re on Windows, get InstantRails, followed by <a href="http://www.netbeans.org/features/ruby/index.html">NetBeans</a> again&#8230; if you have to. But I would recommend getting an Ubuntu VM with Ruby 1.8.6, MySQL 5, Rails 2.1 and <a href="http://www.netbeans.org/features/ruby/index.html">NetBeans IDE</a> installed.</li>
</ul>
<p>Now&#8230; I wouldn&#8217;t bother buying any books until later&#8230;  I started off with books, but I find screencasts far better in conveying relevant &amp; concise information.</p>
<p>With that in mind I recommend you purchase the following screencasts:</p>
<ul>
<li><a href="http://peepcode.com/products/rails-from-scratch-part-i">Rails from Scratch &#8211; Part I</a></li>
<li><a href="http://peepcode.com/products/rails-from-scratch-part-ii">Rails from Scratch &#8211; Part II</a></li>
</ul>
<p>Both are from <a href="http://peepcode.com/">PeepCode</a>, last about an hour, and cost $9 each. Well worth it. I recommend starting with Rails as opposed to &#8220;Pure Ruby&#8221;, because that way you get to see some of Ruby&#8217;s magic applied in the familiar setting of building a webapp. Coming from Java, it&#8217;ll be quiet a refreshing experience &#8211; no more xml deployment descriptors.</p>
<p>Having watched both screencasts, you can start building Rails websites with some competence. However, you&#8217;ll run into quiet a few &#8220;How do I do that ?&#8221; questions early on, such as &#8220;How do I authenicate visitors to my site?&#8221;. And before you head off to Amazon or your local bookstore to buy a Rails Cookbook&#8230; I recommend you take a look at <a href="http://railscasts.com">Railscasts</a>, which is a free (donations welcome) video podcast providing really helpful solutions to common probems.</p>
<p>Next&#8230; you may want to take a look at how Ruby works underneath the covers and how some of its magic manifests itself in such advancements as domain-specific languages (DSL).</p>
<p>Having spent many years programming Java and C#, I found that the recent advancements in test-driven development, mock objects, continuous integration are all worthy pursuits but often these advancements fought with the friction caused by stronly typed languages, i.e. all that test code I was writing was pretty verbose and clunky. Ruby&#8217;s take on the aforementioned pursuits and approaches, is positively refreshing and enjoyable.</p>
<p>If you&#8217;ve ever questioned why the hell you should write a unit test before the implementation itself, take a look at <a href="http://rspec.info/">RSpec</a>. RSpec is another DSL, like Rails is a DSL, this time to facilitate the writing of specification, i.e. the expected behaviour of a software programme. First you describe how your app should behave, then you write the behaviour&#8230; It takes a few moments to get your head around why you would want to do so&#8230; but then the penny drops&#8230; and once again its magical! For a great intro into RSpec I can recommend another Peepcode screencast:</p>
<ul>
<li><a href="http://peepcode.com/products/rspec-basics">RSpec Basics</a></li>
</ul>
<p>Now if you&#8217;re anything like me&#8230; Java programmer or C# programmer&#8230; many years writing Enterprise applications&#8230; lots of XML&#8230; You probably know most of what there is to know about OO programming. Classes, interfaces, and object instances are your staple day-in day-out building blocks. You know about inner classes and anonymous methods but only use those if the moon is particularly blue.</p>
<p>Ruby&#8217;s take on &#8220;OO&#8221; borrows from many different OO languages and to fully appreciate some of the magic and how to cast your own Ruby spells, you need to look at Ruby&#8217;s object-oriented basics. To that end, I recommend downloading all five episodes (2.5 hours) of:</p>
<ul>
<li><a href="http://www.pragprog.com/screencasts/v-dtrubyom/the-ruby-object-model-and-metaprogramming">Ruby Object Model and Metaprogramming</a></li>
</ul>
<p>from the guys at Pragmantic Bookshelf, which will set you back a grant total of $25.</p>
<p>Consuming all this information will take some time&#8230; If you&#8217;ve got a &#8220;day job&#8221; that needs to pay the bills&#8230; you&#8217;ll probably take a week or two to really sift through and appreciate what amounts to a couple of days of screencasts.</p>
<p>All the screencasts I&#8217;ve mentioned are of the highest quality and provide amazing value for money&#8230; Far more so than the books I&#8217;ve purchased.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.denofubiquity.com/software-development/quick-and-dirty-rubyandrails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Vamosa job opening for a Java/.Net Team Leader</title>
		<link>http://www.denofubiquity.com/media-technology/vamosa-job-opening-for-a-javanet-team-leader/</link>
		<comments>http://www.denofubiquity.com/media-technology/vamosa-job-opening-for-a-javanet-team-leader/#comments</comments>
		<pubDate>Mon, 19 May 2008 07:23:40 +0000</pubDate>
		<dc:creator>ijonas</dc:creator>
				<category><![CDATA[Media & Technology]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[employment]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[Scotland]]></category>
		<category><![CDATA[vamosa]]></category>

		<guid isPermaLink="false">http://ijonas.wordpress.com/?p=98</guid>
		<description><![CDATA[Hi folks,
I&#8217;m the CTO for Vamosa, a software company headquartered in Glasgow, with an rapidly expanding office in Boston (across the pond). We&#8217;re a 30-man strong company with a small development team in Glasgow that needs expansion. Our software allows clients to migrate and transform huge websites, from one content management system to another.
The software [...]]]></description>
			<content:encoded><![CDATA[<div class="comText">Hi folks,</div>
<p>I&#8217;m the CTO for Vamosa, a software company headquartered in Glasgow, with an rapidly expanding office in Boston (across the pond). We&#8217;re a 30-man strong company with a small development team in Glasgow that needs expansion. Our software allows clients to migrate and transform huge websites, from one content management system to another.</p>
<p>The software is built on both J2EE and .NET, using the usual suspects in componentry: Spring, xUnit, Hibernate, etc. etc. Woven through all of this is a big helping of both Jython and IronPython.</p>
<p>I&#8217;m looking for an opinionated, technology-obsessed, fun-loving, and inspiring team-leader, who knows his way around the Java and .NET spaces.</p>
<p>Working at Vamosa, you&#8217;ll occupy a fundemental role at Vamosa. We&#8217;re a product company, and you&#8217;ll be in charge of the products development. So we want you to bring ideas, be opinionated, tell us where we&#8217;re going wrong, but also be amazed by some of the stuff we&#8217;ve already done, because we think we pretty clever.</p>
<p>So if you are that person, contact me through email at <a href="mailto:ijonas.kisselbach@vamosa.com."></a><a href="mailto:ijonas.kisselbach@vamosa.com.">ijonas.kisselbach@vamosa.com.</a></p>
<p>Cheers,<br />
Ijonas.</p>
<p>P.S. Please, no agencies!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.denofubiquity.com/media-technology/vamosa-job-opening-for-a-javanet-team-leader/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
