<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Mentalized</title>
		<link>http://mentalized.net/journal/</link>
		<description>The online journal of Jakob Skjerning, a freelance web application developer</description>
		<language>en-us</language>		
		<copyright>Copyright 2012, Jakob Skjerning</copyright>
		<lastBuildDate>Mon, 13 Feb 2012 20:49:43 +0100</lastBuildDate>
		<generator>Movable Type (http://www.movabletype.org/?v=5.04)</generator>
		<ttl>600</ttl>		
		
		
		<item>
			<title>Fact-checking the 40%</title>
			<description><![CDATA[<p>Last week I riffed on an <a href="http://www.onemorelevel.com/html-5-vs-flash-games/">infographic</a> which <a href="http://mentalized.net/journal/2012/02/05/flash_is_not_the_99/">erroneously claimed</a> that Flash is &#8220;supported on 99% of web browsers&#8221;.</p>

<p>They compared that number to 40%, which is supposedly the amount of web browsers that &#8220;HTML5 is supported by&#8221;.</p>

<p>Oh really, now?</p>
]]><![CDATA[<h2>What is &#8220;support&#8221;?</h2>

<p>First of all, the phrase &#8220;support HTML5&#8221; is terrible - what does that even mean? To the best of my knowledge there isn&#8217;t any browser (of the big ones) that doesn&#8217;t support at least some part of HTML5 in some way. Yes, even IE6.</p>

<p>The problem is, HTML5 is a complex thing composed of many different parts. Some browsers support some parts better than others - some, not so much.</p>

<h2>It&#8217;s all about games</h2>

<p>So let&#8217;s focus.</p>

<p>The infographic purports that Flash is better than HTML5 for games. The <a href="http://en.wikipedia.org/wiki/Canvas_element">HTML5 canvas</a> is what you&#8217;d use for drawing 2D shapes and whatnot for games, so I am going out on limb here and guess that what they&#8217;re looking at is support for <code>canvas</code>. </p>

<p>Thankfully, it&#8217;s fairly easy to get statistics on the market penetration for browsers supporting the HTML5 canvas element. <a href="http://caniuse.com">caniuse.com</a> has a <a href="http://caniuse.com/#feat=canvas">nifty table showing exactly that</a>.</p>

<p>According to that table, 69% of browsers support the canvas element.</p>

<h2>40 != 69 &amp;&amp; 99 != 96 &amp;&amp; 69 &lt; 96</h2>

<p>The claimed 40% is a long shot from the actual 69%. Sure, it&#8217;s way less than the <a href="http://mentalized.net/journal/2012/02/05/flash_is_not_the_99/">96%</a> potential market penetration Flash can achieve.</p>

<p>As I wrote in my last post, I don&#8217;t really care whether Flash is better than HTML5 for whatever you want to use it for. All the more power to you - as long as you don&#8217;t claim to be making websites with Flash.</p>

<p>But I do care about people being mislead with <del>made up</del>poorly  researched numbers and claims. Unfortunately, the infographic from <a href="http://www.onemorelevel.com/html-5-vs-flash-games/">OneMoreLevel.com</a> seems to have plenty of those.</p>
]]></description>
			<link>http://mentalized.net/journal/2012/02/13/fact-checking_the_40/</link>
			<guid isPermaLink="false">2134@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2012/02/13/fact-checking_the_40/#comments</comments>
			<pubDate>Mon, 13 Feb 2012 20:49:43 +0100</pubDate>
			<category>Technology</category>
		</item>
		
		<item>
			<title>Flash is not the 99%</title>
			<description><![CDATA[<p>An &#8220;<a href="http://www.onemorelevel.com/html-5-vs-flash-games/" title="HTML5 vs Flash games infographic">infographic</a>&#8221; showing some data points in the epic HTML5 vs Flash battle has recently made its rounds on Twitter and other sites.</p>

<p>I don&#8217;t care much for whether Flash is the bees knees for games, but I do care about people misleading people with data. And some of the data points depicted in the graphic didn&#8217;t quite sit right with me, so here&#8217;s an attempt at figuring at least one of them out.</p>

<blockquote>
  <p>Flash is supported by 99% of web browsers</p>
</blockquote>
]]><![CDATA[<h2>They literally mean 0%</h2>

<p>Taken literally, the statement that 99% of web browsers support Flash is flat out wrong. Fact is no browser supports Flash - at least not natively.</p>

<p>So that 99% figure should really be a flat 0%&#8230;</p>

<h2>1 in 5 is 20%</h2>

<p>Okay, fine, most browsers do support a method of displaying Flash content, namely the Flash Player plugin which is available as an optional download. However, only one of the major browsers - Chrome - actually <a href="http://en.wikipedia.org/wiki/Adobe_Flash_Player" title="Wikipedia: Adobe Flash Player">ships with the plugin installed</a>. </p>

<p>If we accept third party extensions as part of what a browser supports, the correct number here then becomes 20% - ie 1 of the 5 major browsers (Internet Explorer, Firefox, Chrome, Safari, and Opera) support Flash out of the box.</p>

<h2>25% market share</h2>

<p>There&#8217;s still some way before we reach 99%, though. And honestly, using the number of browsers as a base is pointless (but it serves as a nice illustration that statistics should rarely be taken at face value). It is more interesting to look at browser market shares in this case.</p>

<p>According to the <a href="http://en.wikipedia.org/wiki/Usage_share_of_web_browsers" title="Wikipedia: Usage share of web browsers">numbers from W3Counter</a>, Chromes market share was 24.6% in January 2012. This in turn means the market share of browsers able to display Flash content out of the box is roughly 25%.</p>

<p>Still not quite 99%.</p>

<h2>They do statistics differently in Flashland</h2>

<p>Let&#8217;s assume their wording is not entirely accurate. What they probably really meant to say is that 99% of internet requests come from a web browser that has Flash Player installed. Really, that&#8217;s the interesting figure if you plan on putting out Flash content.</p>

<p>However, that statements doesn&#8217;t seem quite right either.</p>

<p>Primarily because <a href="http://www.apple.com/hotnews/thoughts-on-flash/" title="Steve Jobs' Thoughts on Flash">iOS famously doesn&#8217;t support Flash</a>. In other words, no iPad, iPhone, or iPod Touch is able to display Flash content - at least not as part of the browser experience.</p>

<p>According to the <a href="http://www.w3counter.com/globalstats.php?year=2012&amp;month=1" title="W3Counter: January 2012">numbers from W3Counter</a>, iOS devices accounted for 4.5% of internet traffic in January 2012. Thus, there is no chance that the market share of Flash-supporting browsers can be higher than 95.5%.</p>

<h2>96%, and that&#8217;s my final offer</h2>

<p>So there we have it, this must be the number they&#8217;re thinking of. If we assume that every internet user actually installs the optional Flash Player - and I suspect this is a stretch, but I am not sure where to get reliable numbers on this - 96% of all internet traffic could come from a browser that is able to display Flash content.</p>

<p>That&#8217;s a huge, potential user base. </p>

<p>However, seeing that the 99% figure of the infographic is incorrect, I wonder which of the other numbers are misleading as well.</p>

<p>For example, if we extend the above definition to the HTML5 column, I am fairly sure that the number of internet requests coming from a browser able to display HTML5 content is vastly higher than 40% - but that&#8217;s a topic for another post.</p>
]]></description>
			<link>http://mentalized.net/journal/2012/02/05/flash_is_not_the_99/</link>
			<guid isPermaLink="false">2133@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2012/02/05/flash_is_not_the_99/#comments</comments>
			<pubDate>Sun, 05 Feb 2012 14:17:23 +0100</pubDate>
			<category>Technology</category>
		</item>
		
		<item>
			<title>Ruby SSL certificate verification errors</title>
			<description><![CDATA[<p>On a client project, we had recently installed <a href="https://github.com/technicalpickles/capistrano-campfire">capistrano-campfire</a> to get notifications in our <a href="http://campfirenow.com/">Campfire</a> chatroom whenever a deployment takes place.</p>

<p>Unfortunately I kept getting</p>

<pre><code>SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
</code></pre>

<p>when I tried deploying. There&#8217;s nothing quite like starting the year with SSL issues&#8230;</p>

<p>According to <a href="http://martinottenwaelter.fr/2010/12/ruby19-and-the-ssl-error/">this article</a> the problem</p>

<blockquote>
  <p>&#8230; comes from the fact that the new Ruby 1.9 installation doesn&#8217;t find the certification authority certificates (CA Certs) used to verify the authenticity of secured web servers.</p>
</blockquote>

<p>I my case, I was using Ruby 1.8 (well, <a href="http://www.rubyenterpriseedition.com/">REE</a>) on OS X Snow Leopard, but the problem - and solution - was the same nevertheless.</p>
]]><![CDATA[<h2>The cURL way</h2>

<p>The super easy solution is found on <a href="http://stackoverflow.com/questions/5711190/how-to-get-rid-of-opensslsslsslerror">Stack Overflow</a> (as always):</p>

<pre><code>sudo curl http://curl.haxx.se/ca/cacert.pem -o /opt/local/etc/openssl/cert.pem
</code></pre>

<p>This installs <a href="http://curl.haxx.se/ca/">Mozillas CS Root Certificates Bundle</a> at /opt/local/etc/openssl/cert.pem, where the certificates can be found by Rubys HTTP library without any extra configuration.</p>

<h2>Using MacPorts</h2>

<p>As an alternative to the above, you can use MacPorts to get the bundles (as mentioned in <a href="http://martinottenwaelter.fr/2010/12/ruby19-and-the-ssl-error/">this article</a>):</p>

<pre><code>$ sudo port install curl-ca-bundle
</code></pre>

<p>This installs the certificates bundle in /opt/local/etc/openssl/cert.pem.</p>

<p>You can then configure Ruby to use them:</p>

<pre><code>https.ca_file = '/opt/local/share/curl/curl-ca-bundle.crt'
</code></pre>

<p>or if that isn&#8217;t feasible, simply link them up from the default location:</p>

<pre><code>$ sudo ln -s /opt/local/share/curl/curl-ca-bundle.crt /opt/local/etc/openssl/cert.pem
</code></pre>
]]></description>
			<link>http://mentalized.net/journal/2012/01/02/ruby_ssl_certificate_verification_errors/</link>
			<guid isPermaLink="false">2131@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2012/01/02/ruby_ssl_certificate_verification_errors/#comments</comments>
			<pubDate>Mon, 02 Jan 2012 09:52:24 +0100</pubDate>
			<category>Programming</category>
		</item>
		
		<item>
			<title>Dear Open Source Software</title>
			<description><![CDATA[<p>Dear Open Source Software</p>

<p>I don&#8217;t think I have ever written you before, but there is something I wanted to get off my chest.</p>

<p>I just wanted to let you know, that you rock! Just the other day, you saved my customer a bunch of money - and made me look like a hero.</p>

<p>Okay, I realize you only did so because I had done part of the work already. And I am probably giving you credit for something you didn&#8217;t really do, but thanks to you a team of strangers had implemented features I needed and given them back to me.</p>

<p>Also, the way you enable people I have never heard about to take something I have created and transform into something they can use, is mind boggling.</p>

<p>Thanks.</p>

<p>Yours, Jakob</p>

<p>PS: I know, I know&#8230; I don&#8217;t contribute often enough, and I will some day, I promise. Soon.</p>
]]>
</description>
			<link>http://mentalized.net/journal/2011/12/18/dear_open_source_software/</link>
			<guid isPermaLink="false">2127@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2011/12/18/dear_open_source_software/#comments</comments>
			<pubDate>Sun, 18 Dec 2011 15:56:46 +0100</pubDate>
			<category>Software</category>
		</item>
		
		<item>
			<title>Challenge the deadline</title>
			<description><![CDATA[<p>There are basically two kinds of deadlines: Real, and Arbitrary.</p>

<p>Real deadlines are those necessitated by some external, unchangeable event. For example legislation, the company running out of money, the CEO having to get up in front of the world press and announce the product, or a marketing campaign kicking off.</p>
]]><![CDATA[<h2>Arbitrary deadlines</h2>

<p>And then there are the much more common deadlines; The Arbitrary Deadline. They are recognizable by their basis in nothing at all - other than a decision that it would be nice to have X done by this or that date.</p>

<p>They are often employed in a naive attempt to speed up production. The thinking seems to be &#8220;give the wizkids a tight deadline, and they&#8217;ll really dig in and program the heck out of this&#8221;.</p>

<h2>Deadlines don&#8217;t change anything</h2>

<p>But here&#8217;s the thing about deadlines; they don&#8217;t make things any easier or faster to implement. No matter the deadline, you still have the same amount of work to do.</p>

<p>If your deadline is fixed, something else has to give; either quality or number of features. The Project Triangle sayeth so. </p>

<p>Give up on features and the product might not be what you imagined. Give up quality and <a href="http://mentalized.net/journal/2010/10/04/avoiding_the_big_rewrite/">you&#8217;ll pay for it later</a> - with interests.</p>

<p>I have yet to meet an arbitrary deadline that couldn&#8217;t be budged in the face of realities. Challenge the deadline before you lose your sleep over it.</p>
]]></description>
			<link>http://mentalized.net/journal/2011/11/30/challenge_the_deadline/</link>
			<guid isPermaLink="false">2129@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2011/11/30/challenge_the_deadline/#comments</comments>
			<pubDate>Wed, 30 Nov 2011 09:06:49 +0100</pubDate>
			<category>Business</category>
		</item>
		
		<item>
			<title>How to export CSV data from PostgreSQL</title>
			<description><![CDATA[<p>Just because I can never remember how to do this:</p>

<pre><code class="shell">psql my_database -c &quot;COPY (SELECT stuff FROM my_table) TO STDOUT CSV&quot; &gt; my_file.csv</code></pre>

<p>Works in at least PostgreSQL 8.4.</p>]]></description>
			<link>http://mentalized.net/journal/2011/11/07/how_to_export_csv_data_from_postgresql/</link>
			<guid isPermaLink="false">2128@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2011/11/07/how_to_export_csv_data_from_postgresql/#comments</comments>
			<pubDate>Mon, 07 Nov 2011 10:53:52 +0100</pubDate>
			<category>Technology</category>
		</item>
		
		<item>
			<title>Routing requests to local development environment</title>
			<description><![CDATA[<p>Some third party systems needs to send requests to your web application in order to work.</p>

<p><a href="http://facebook.com">Facebook</a> fetches the actual application, <a href="http://chargify.com/">Chargify</a> notifies you of subscription changes, payment gateways tell you the transaction has been accepted.</p>

<p>That&#8217;s fine in production where you have a public facing webserver running, but when you&#8217;re developing locally you have to jump through a few hoops.</p>
]]><![CDATA[<h2>Reverse SSH tunnel</h2>

<p>The common approach is to setup a <a href="http://www.howtoforge.com/reverse-ssh-tunneling">SSH tunnel</a> on a remote server and use that as endpoint for the third party service. This is pretty standard business and can be handled by a service like <a href="https://showoff.io/">Showoff</a>. Personally I just use basic SSH:</p>

<pre><code>ssh -vN koppen@example.com -R 3000:localhost:3000
</code></pre>

<p>As long as the above is running, all requests to port 3000 on example.com is received on localhost:3000.</p>

<p>If you&#8217;re developing Facebook apps, you can stop here. However, some third party services like <a href="http://chargify.com/">Chargify</a> and <a href="http://quickpay.net" title="Danish payment gateway">Quickpay</a> refuse to use anything but port 80 (and 443) for their communication. </p>

<p>While it is possible to setup the tunnel on port 80 remotely, my servers tend to already occupy port 80, so that&#8217;s a no go.</p>

<h2>Proxy passing</h2>

<p>The next piece of the puzzle then becomes routing to the SSH tunnel at port 3000 from port 80.</p>

<p>Since my development server is already running <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html">Apache</a>, this is painfully easy. I just created a new site, using <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html">mod_proxy</a> to forward requests to the given port:</p>

<pre><code>&lt;VirtualHost *:80&gt;
  ServerName tunnel.example.com
  ProxyPass / http://0.0.0.0:3000/ retry=0
&lt;/VirtualHost&gt;
</code></pre>

<p>(The retry=0 option to ProxyPass prevents the endpoint from being marked as bad for a period of time if it receives a request without my tunnel being active)</p>

<p>With this in place, any request to tunnel.example.com is passed to 0.0.0.0:3000 on the same server, where the SSH tunnel receives it and passes it to my local development server.</p>

<p>Success! And the best part is, this totally makes me feel like I am <a href="http://www.introversion.co.uk/uplink/screenshots/uplink4.gif">bouncing connections around in Uplink</a>.</p>
]]></description>
			<link>http://mentalized.net/journal/2011/10/19/routing_requests_to_local_development_environment/</link>
			<guid isPermaLink="false">2125@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2011/10/19/routing_requests_to_local_development_environment/#comments</comments>
			<pubDate>Wed, 19 Oct 2011 09:58:33 +0100</pubDate>
			<category>Software</category>
		</item>
		
		<item>
			<title>Import MTS video clips to iMovie</title>
			<description><![CDATA[<p>My parents have a digital camcorder. A week long vacation with said camcorder, my parents, and their only grandchild produces a fair amount of raw footage. Before we headed back home after the vacation I wisely snapped up all the footage from their camera hoping to eventually run it through iMovie.</p>

<p>Turns out their camcorder stores its clips in MTS/<a href="http://en.wikipedia.org/wiki/AVCHD">AVCHD</a> format, and I didn&#8217;t grab all the fluff^Wnecessary files. As a result iMovie &#8216;11 cannot import the MTS video clips.</p>
]]><![CDATA[<p>I spent the better part of last night trying to figure out how to convert the MTS into something iMovie would import. While there are commercial tools that appear to do what I needed, I was sure I could get the same result using freely available tools. And sure enough <a href="http://ffmpeg.org">ffmpeg</a> - the swiss army knife of open source video handling - gets the job done.</p>

<p>After reading a bunch of threads and forum posts I finally found these settings to convert from MTS to MOV files that I could import into iMovie &#8216;11 without significant loss of quality:</p>

<pre><code>ffmpeg -i input.mts -b 185M output.mov
</code></pre>

<p>That -b flag took me forever to find and I finally spotted it in <a href="http://vimeo.com/groups/cinelerra/forumthread:3721">this thread</a>.</p>

<p>I am not a video buff, so I am sure the above can be optimized, but it worked, and I am posting it here primarily so I know I can find it again.</p>
]]></description>
			<link>http://mentalized.net/journal/2011/09/12/import_mts_video_clips_to_imovie/</link>
			<guid isPermaLink="false">2124@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2011/09/12/import_mts_video_clips_to_imovie/#comments</comments>
			<pubDate>Mon, 12 Sep 2011 09:43:45 +0100</pubDate>
			<category>Technology</category>
		</item>
		
		<item>
			<title>Digging into Objective-C (again)</title>
			<description><![CDATA[<p>While the concept of writing native Mac apps in Ruby definitely appeals to me, I must say the experience isn&#8217;t quite as easy as I was looking for.</p>

<p>After writing <a href="http://mentalized.net/journal/2011/08/15/running_macruby_and_hotcocoa_on_snow_leopard/">my last post</a> I realized that what I had thought to be the path of least resistance, wasn&#8217;t. And while I knew I&#8217;d run into resistance with XCode and Objective-C as well, at least I&#8217;d be doing things the &#8220;proper&#8221; way and learning new stuff.</p>

<p>So I fired up XCode once again and set out to write a Mac application. The following is a bunch of notes and stray thoughts I scribbled down during those first hours - my first (well, fourth) impressions of developing iApps coming from Ruby.</p>
]]><![CDATA[<h2>XCode</h2>

<ul>
<li>Oh dear God, so many windows. I can see why Mac/iOS developers like to have multiple 30 inch screens.</li>
<li>Inline error messages are kind of awesome.</li>
</ul>

<h2>The language</h2>

<ul>
<li>Oh yeah, I remember why I&#8217;ve tried figuring this out on more than one occasion.</li>
<li>Oh no, semicolons.</li>
<li>Is there something like <a href="http://tryruby.org/">TryRuby</a> for Objective-C? I think it would be easier getting started not having to worry about XCode and Interface Builder and outlets and other blah.</li>
</ul>

<h2>Interface Builder</h2>

<ul>
<li>Not sure if I should hate it or love it.</li>
<li>When I rename a file via Interface Builder why doesn&#8217;t it change the import statements or other references. I thought this was what an IDE should be doing.</li>
<li>Finding good, up to date introductory articles is hard, and it seems Interface Builder changes quite a bit between versions making it hard to transfer instructions from another version.</li>
</ul>

<h2>Files and structure</h2>

<ul>
<li>I miss something like Rails to force a structure on me. Where to I put this or that file? What&#8217;s my main application file called? ApplicationDelegate? AppController? Where do I put other things, what should I name them? Arg, best practice me, please!</li>
<li>Seriously, do all files simply go in the same directory?</li>
<li>Using git with XCode isn&#8217;t exactly a joy. Closing all files because git has changed them is annoying to say the least.</li>
</ul>

<h2>Debugging output</h2>

<ul>
<li>I miss a consistent, robust way to log debug output. <code>Object.to_s</code> and <code>.inspect</code> of Ruby are awesome. <code>NSLog()</code> isn&#8217;t quite flexible enough, ie <code>NSLog(@"%@")</code> fails for certain types (integers).</li>
<li>A visual debugger is nice, I remember that from my Delphi days.</li>
</ul>

<h2>Installing frameworks</h2>

<ul>
<li>Download, run something, then copy something into a project, then add build phases, then import it. Damn, I miss <a href="http://rubygems.org">gems</a>.</li>
</ul>

<p>I am sure I&#8217;ll laugh at the above as I get more experience. But this serves a nice reminder that starting anything new is a fragile situation and we should make sure newbies are welcomed and aided into our communities.</p>
]]></description>
			<link>http://mentalized.net/journal/2011/09/08/digging_into_objective-c_again/</link>
			<guid isPermaLink="false">2123@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2011/09/08/digging_into_objective-c_again/#comments</comments>
			<pubDate>Thu, 08 Sep 2011 09:03:00 +0100</pubDate>
			<category>Programming</category>
		</item>
		
		<item>
			<title>Running MacRuby and HotCocoa on Snow Leopard</title>
			<description><![CDATA[<p>I spent some time over the weekend playing around with <a href="http://macruby.org">MacRuby</a> and <a href="http://www.macruby.org/trac/wiki/HotCocoa">HotCocoa</a>, trying to put together a simple Mac application.</p>

<p>Getting MacRuby and HotCocoa running on Snow Leopard wasn&#8217;t entirely as easy as it should have been, though. Here are some of the hoops I jumped through.</p>
]]><![CDATA[<h2>MacRuby via RVM</h2>

<p>I like <a href="http://rvm.beginrescueend.com">RVM</a> (go <a href="https://twitter.com/#!/wayneeseguin">Wayne</a>!) so I installed MacRuby that way. Fortunately - for me - that was only a matter of</p>

<pre><code>rvm install macruby
</code></pre>

<h2>BridgeSupport via downloaded installer</h2>

<p>Supposedly this is only necessary if you&#8217;re still on Snow Leopard, but you need <a href="http://bridgesupport.macosforge.org/trac/wiki">BridgeSupport</a>.</p>

<p>You can grab it from <a href="http://www.macruby.org/files/">the MacRuby site</a> - at the time of writing Preview 3 is the most recent version. After downloading it, unzip it and run the installer.</p>

<h2>HotCocoa via Bundler</h2>

<p><a href="http://www.macruby.org/trac/wiki/HotCocoa">HotCocoa</a> is a Ruby-style interface to Cocoa, basically a way to create your user interface. Unfortunately, it seems the project is in a state of limbo and the official gem isn&#8217;t the one you want.</p>

<p>There is an active fork on <a href="https://github.com/ferrous26/hotcocoa">GitHub</a> that supports 64 bit architectures and actually works, so we want that.</p>

<p>After messing about with this for a while, struggling with making sure I got it installed as part of RVMs gems, not the system gems, and usable via <code>rake</code>, instead of <code>macrake</code> and what have you, I ended up using <a href="http://gembundler.com/">Bundler</a> for bringing in the forked gem.</p>

<pre><code># Gemfile
gem 'rake'
gem 'hotcocoa', :git =&gt; 'https://github.com/ferrous26/hotcocoa.git'
</code></pre>

<p>Note that rake is also added to the Gemfile. Without it I was getting a bunch of seemingly unrelated errors, but this worked in the end. Just remember to do</p>

<pre><code>bundle exec rake run
</code></pre>

<p>to run your application. Without it, you&#8217;ll be running RVMs macrake and you didn&#8217;t install the HotCocoa fork under that.</p>

<h2>App away</h2>

<p>With the above out of the way, I was able to happily code my way to a working Mac app using Ruby. That is pretty sweet.</p>

<p>I&#8217;ve not been able to really get along with Objective-C yet, so I&#8217;m hoping MacRuby can be a gateway drug for me.</p>
]]></description>
			<link>http://mentalized.net/journal/2011/08/15/running_macruby_and_hotcocoa_on_snow_leopard/</link>
			<guid isPermaLink="false">2121@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2011/08/15/running_macruby_and_hotcocoa_on_snow_leopard/#comments</comments>
			<pubDate>Mon, 15 Aug 2011 09:03:10 +0100</pubDate>
			<category>Technology</category>
		</item>
			
	</channel>
</rss>
