<?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>uRaNGaTaNG &#187; Ruby, Rails &amp; Co.</title>
	<atom:link href="http://www.rngtng.com/category/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rngtng.com</link>
	<description>Featuring Ruby, Rails, Web development, Arduino, Processing, Nabaztag and more...</description>
	<lastBuildDate>Thu, 12 Jan 2012 10:08:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://www.rngtng.com/?pushpress=hub'/>
		<item>
		<title>HowTo: resque-web, resque scheduler and passenger</title>
		<link>http://www.rngtng.com/2011/07/29/howto-resque-web-resque-scheduler-and-passenger/</link>
		<comments>http://www.rngtng.com/2011/07/29/howto-resque-web-resque-scheduler-and-passenger/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 16:04:59 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Ruby, Rails & Co.]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[resque]]></category>
		<category><![CDATA[scheduler]]></category>

		<guid isPermaLink="false">http://www.rngtng.com/?p=562</guid>
		<description><![CDATA[Here's how you get resque-web and resque scheduler playing well with passenger:

Follow these instructions from resque readme (apache, ngnix) and check out current resque repo. Now update following two files:
1. Add gem "resque-scheduler","2.0.0.d" to Gemfile
2. Run bundle
3. Add require 'resque_scheduler' to config.ru

Restart you webserver and are ready to go - Happy scheduling!

Both file after ...]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how you get <a href="https://github.com/defunkt/resque">resque-web</a> and <a href="https://github.com/bvandenbos/resque-scheduler">resque scheduler</a> playing well with <a href="http://www.modrails.com/">passenger</a>:</p>
<p>Follow these instructions from resque readme (<a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#_deploying_a_rack_based_ruby_application">apache</a>, <a href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html#deploying_a_rack_app">ngnix</a>) and check out current resque repo. Now update following two files:<br />
1. Add <code>gem "resque-scheduler","2.0.0.d"</code> to Gemfile<br />
2. Run <code>bundle</code><br />
3. Add <code>require 'resque_scheduler'</code> to config.ru</p>
<p>Restart you webserver and are ready to go &#8211; Happy scheduling!</p>
<p>Both file after editing:<br />
<div id="gist-1101580" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c1">#!/usr/bin/env ruby</span></div><div class='line' id='LC2'><span class="nb">require</span> <span class="s1">&#39;logger&#39;</span></div><div class='line' id='LC3'><br/></div><div class='line' id='LC4'><span class="vg">$LOAD_PATH</span><span class="o">.</span><span class="n">unshift</span> <span class="o">::</span><span class="no">File</span><span class="o">.</span><span class="n">expand_path</span><span class="p">(</span><span class="o">::</span><span class="no">File</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="bp">__FILE__</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39;/lib&#39;</span><span class="p">)</span></div><div class='line' id='LC5'><span class="nb">require</span> <span class="s1">&#39;resque/server&#39;</span></div><div class='line' id='LC6'><br/></div><div class='line' id='LC7'><span class="c1"># Set the RESQUECONFIG env variable if you&#39;ve a `resque.rb` or similar</span></div><div class='line' id='LC8'><span class="c1"># config file you want loaded on boot.</span></div><div class='line' id='LC9'><span class="k">if</span> <span class="no">ENV</span><span class="o">[</span><span class="s1">&#39;RESQUECONFIG&#39;</span><span class="o">]</span> <span class="o">&amp;&amp;</span> <span class="o">::</span><span class="no">File</span><span class="o">.</span><span class="n">exists?</span><span class="p">(</span><span class="o">::</span><span class="no">File</span><span class="o">.</span><span class="n">expand_path</span><span class="p">(</span><span class="no">ENV</span><span class="o">[</span><span class="s1">&#39;RESQUECONFIG&#39;</span><span class="o">]</span><span class="p">))</span></div><div class='line' id='LC10'>&nbsp;&nbsp;<span class="nb">load</span> <span class="o">::</span><span class="no">File</span><span class="o">.</span><span class="n">expand_path</span><span class="p">(</span><span class="no">ENV</span><span class="o">[</span><span class="s1">&#39;RESQUECONFIG&#39;</span><span class="o">]</span><span class="p">)</span></div><div class='line' id='LC11'><span class="k">end</span></div><div class='line' id='LC12'><br/></div><div class='line' id='LC13'><span class="nb">require</span> <span class="s1">&#39;resque_scheduler&#39;</span></div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC15'><span class="n">use</span> <span class="no">Rack</span><span class="o">::</span><span class="no">ShowExceptions</span></div><div class='line' id='LC16'><span class="n">run</span> <span class="no">Resque</span><span class="o">::</span><span class="no">Server</span><span class="o">.</span><span class="n">new</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1101580/3e8f09f7d99bcd47e33fdf5ce09fb6834b77f338/config.ru" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1101580#file_config.ru" style="float:right;margin-right:10px;color:#666">config.ru</a>
            <a href="https://gist.github.com/1101580">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="n">source</span> <span class="ss">:rubygems</span></div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="n">gemspec</span></div><div class='line' id='LC4'><br/></div><div class='line' id='LC5'><span class="n">group</span> <span class="ss">:test</span> <span class="k">do</span></div><div class='line' id='LC6'>&nbsp;&nbsp;<span class="n">gem</span> <span class="s2">&quot;rake&quot;</span></div><div class='line' id='LC7'>&nbsp;&nbsp;<span class="n">gem</span> <span class="s2">&quot;resque-scheduler&quot;</span><span class="p">,</span><span class="s2">&quot;2.0.0.d&quot;</span></div><div class='line' id='LC8'>&nbsp;&nbsp;<span class="n">gem</span> <span class="s2">&quot;rack-test&quot;</span><span class="p">,</span> <span class="s2">&quot;~&gt; 0.5&quot;</span></div><div class='line' id='LC9'>&nbsp;&nbsp;<span class="n">gem</span> <span class="s2">&quot;mocha&quot;</span><span class="p">,</span> <span class="s2">&quot;~&gt; 0.9.7&quot;</span></div><div class='line' id='LC10'>&nbsp;&nbsp;<span class="n">gem</span> <span class="s2">&quot;leftright&quot;</span><span class="p">,</span> <span class="ss">:platforms</span> <span class="o">=&gt;</span> <span class="ss">:mri_18</span></div><div class='line' id='LC11'>&nbsp;&nbsp;<span class="n">gem</span> <span class="s2">&quot;yajl-ruby&quot;</span><span class="p">,</span> <span class="s2">&quot;~&gt;0.8.2&quot;</span><span class="p">,</span> <span class="ss">:platforms</span> <span class="o">=&gt;</span> <span class="ss">:mri</span></div><div class='line' id='LC12'>&nbsp;&nbsp;<span class="n">gem</span> <span class="s2">&quot;json&quot;</span><span class="p">,</span> <span class="s2">&quot;~&gt;1.5.3&quot;</span><span class="p">,</span> <span class="ss">:platforms</span> <span class="o">=&gt;</span> <span class="ss">:jruby</span></div><div class='line' id='LC13'><span class="k">end</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1101580/b684be9b2b93228c1accabb59a9dc4425edd367e/Gemfile" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1101580#file_gemfile" style="float:right;margin-right:10px;color:#666">Gemfile</a>
            <a href="https://gist.github.com/1101580">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>
</p>
<p class="wp-flattr-button"></p> <p><a href="http://www.rngtng.com/?flattrss_redirect&amp;id=562&amp;md5=930179f1ba8785c97e3136cf81a0053e" title="Flattr" target="_blank"><img src="http://www.rngtng.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2011/07/29/howto-resque-web-resque-scheduler-and-passenger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails 3.1 Hackfest &#8211; get rid of Javascript Runtime dependency in production</title>
		<link>http://www.rngtng.com/2011/07/25/rails-3-1-hackfest-get-rid-of-javascript-runtime-dependency-in-production/</link>
		<comments>http://www.rngtng.com/2011/07/25/rails-3-1-hackfest-get-rid-of-javascript-runtime-dependency-in-production/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 22:42:54 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Ruby, Rails & Co.]]></category>
		<category><![CDATA[hackfest]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://www.rngtng.com/?p=584</guid>
		<description><![CDATA[

This weekend was Rails 3.1 Hackfest. The rails community was called to test the upcoming version 3.1 to its limits, to find bugs and or flaws and get it polished for the final release. So I did:
I'm working with the rails 3.1 since it first release candidate, but never tried in production. So I ...]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><img class="aligncenter" src="http://pragdave.pragprog.com/photos/uncategorized/2007/05/20/rails_logo_heart.png" alt="" width="480" height="306" /></p>
<p>This weekend was <a href="http://weblog.rubyonrails.org/2011/7/14/rails-3-1-hackfest">Rails 3.1 Hackfest</a>. The rails community was called to test the upcoming version 3.1 to its limits, to find bugs and or flaws and get it polished for the final release. So I did:</p>
<p>I&#8217;m working with the rails 3.1 since it first release candidate, but never tried in production. So I made my task to finally test this, and bring my app in the wild &#8211; on my (not root) server. Rails 3.0 is running there smoothly so I didn&#8217;t expect any problems &#8211; wrong!<br />
Show stopper was the Javascript Runtime dependency on production. Reason was quickly found: <a href="http://jashkenas.github.com/coffee-script/">Coffee-Script</a> &#8211; ahrg! It depends on <a href="https://github.com/sstephenson/execjs">ExecJS</a>, which depends on a Javascript Runtime. Unfortunately, and that&#8217;s because I&#8217;m not on a root server, I got neither node.js, therubyraser, Mustang nor Johnson installed there.</p>
<p>I read <a href="https://moocode.com/posts/1-deploying-a-rails-3-1-application-to-production">this article</a>, which supposed to precompile the assets &#8211; didn&#8217;t help either and runtime is needed again.</p>
<p>In the End, the solution was as simple as obvious: just don&#8217;t use coffee-script in production <img src='http://www.rngtng.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I did, removed the coffee-script gem form my Gemfile &#8211; and tatatata: it works! Uhh! This took me quite a long time to get it right. Javascript Runtime dependecy no good for prodcution, and reading <a href="http://yehudakatz.com/2011/06/14/what-the-hell-is-happening-to-rails/">Mr. Katz</a> it&#8217;s looking good to get this fixed for the final release &#8211; uff! Happy so get tin final one soon! Yeah!</p>
<p>[cheesey image taken from <a href="http://pragdave.pragprog.com/pragdave/2007/05/rails_is_love.html">PragDave</a> - thx]</p>
<p class="wp-flattr-button"></p> <p><a href="http://www.rngtng.com/?flattrss_redirect&amp;id=584&amp;md5=2173b83f9cc579383a04ddebaabfe99a" title="Flattr" target="_blank"><img src="http://www.rngtng.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2011/07/25/rails-3-1-hackfest-get-rid-of-javascript-runtime-dependency-in-production/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo: ultra mega fast rails routes lookup</title>
		<link>http://www.rngtng.com/2011/03/16/howto-ultra-mega-fast-rails-routes-lookup/</link>
		<comments>http://www.rngtng.com/2011/03/16/howto-ultra-mega-fast-rails-routes-lookup/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 16:34:00 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Ruby, Rails & Co.]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[routes]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.rngtng.com/?p=538</guid>
		<description><![CDATA[

I was quite annoyed by the wasted time it took each time I grep the rails routes table. 
Wait, can't this be cached?  - Sure it can!
So I came up this nice little alias to cache the output once:

alias route='CF=tmp/routes_cache; ] &#38;&#38; rake routes &#62; $CF; cat $CF &#124; ...]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" src="http://static.guim.co.uk/sys-images/Guardian/Pix/pictures/2009/8/5/1249508265579/Frances-V150-TGV-fast-tra-001.jpg" alt="" /></p>
<p>I was quite annoyed by the wasted time it took each time I grep the rails routes table.<br />
<em>Wait, can&#8217;t this be cached?  &#8211; Sure it can!</em><br />
So I came up this nice little alias to cache the output once:<br />
<code><br />
alias route='CF=tmp/routes_cache; [[ ! -s $CF ]] &amp;&amp; rake routes &gt; $CF; cat $CF | grep '<br />
</code></p>
<p>now it&#8217;s ultra fast, try e.g.:<br />
<code><br />
$ route root<br />
</code><br />
bang!</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2011/03/16/howto-ultra-mega-fast-rails-routes-lookup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What? &#8211; irb extension gem to find your methods</title>
		<link>http://www.rngtng.com/2010/09/24/what-irb-extension-gem-to-find-your-methods/</link>
		<comments>http://www.rngtng.com/2010/09/24/what-irb-extension-gem-to-find-your-methods/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 11:35:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby, Rails & Co.]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[irb]]></category>
		<category><![CDATA[what?]]></category>
		<category><![CDATA[what_method]]></category>

		<guid isPermaLink="false">http://urangatang.wordpress.com/?p=10</guid>
		<description><![CDATA[
If Samuel just would have asked me, I got an answer:

Oldies, but Goldies: 'Methodfinder'  is a really nice extension for your ruby/rails irb and shipped with the 'what_methods' gem. I'm using quite a lot and can't go without it anymore (aka. I'm too stupid to remember all those method names ;-).

gem install what_methods

http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html

See ...]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://www.rngtng.com/2010/09/24/what-irb-extension-gem-to-find-your-methods/"><em>Click here to view the embedded video.</em></a></p><br />
If Samuel just would have asked me, I got an answer:</p>
<p>Oldies, but Goldies: &#8216;Methodfinder&#8217;  is a really nice extension for your ruby/rails irb and shipped with the &#8216;what_methods&#8217; gem. I&#8217;m using quite a lot and can&#8217;t go without it anymore (aka. I&#8217;m too stupid to remember all those method names <img src='http://www.rngtng.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p><code>gem install what_methods</code></p>
<p><a href="http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html" target="_blank">http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html</a></p>
<p>See more hints by Dr. Nic blog <a href="http://drnicwilliams.com/2006/10/12/my-irbrc-for-consoleirb/">here</a></p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2010/09/24/what-irb-extension-gem-to-find-your-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SoundCloud it is&#8230;.</title>
		<link>http://www.rngtng.com/2010/09/02/soundcloud-it-is/</link>
		<comments>http://www.rngtng.com/2010/09/02/soundcloud-it-is/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 16:49:51 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Happy Hacking]]></category>
		<category><![CDATA[Ruby, Rails & Co.]]></category>
		<category><![CDATA[berlin]]></category>
		<category><![CDATA[job+]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[me]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[soundcloud]]></category>

		<guid isPermaLink="false">http://www.rngtng.com/?p=428</guid>
		<description><![CDATA[

After having enjoyed a wonderful summer with lot of travels and being in more or less 'offline' mode, I'm back 'online' and I started my new Job at soundcloud.com.
It's like Fickr but for Music - upload your tracks and share them among the community and fans.
It's kick ass! ;-) Take a look around the ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.wechsellook.com/postFiles/489241ba-f3d7-4310-b457-8e7e2041003d.jpg" alt="" width="551" height="252" /></p>
<p>After having enjoyed a wonderful summer with lot of travels and being in more or less &#8216;offline&#8217; mode, I&#8217;m back &#8216;online&#8217; and I started my new Job at <a href="http://www.soundcloud.com">soundcloud.com</a>.</p>
<p style="text-align: center"><em>It&#8217;s like Fickr but for Music &#8211; upload your tracks and share them among the community and fans.</em></p>
<p>It&#8217;s kick ass! <img src='http://www.rngtng.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Take a look around the office, check this out: <a href="http://www.wechsellook.com/post/read/90" target="_blank">http://www.wechsellook.com/post/read/90</a></p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2010/09/02/soundcloud-it-is/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Oauth-CLI &#8211; test your Twitter and other OAuth APIs easily</title>
		<link>http://www.rngtng.com/2010/07/01/oauth-cli-test-your-twitter-and-other-oauth-apis-easily/</link>
		<comments>http://www.rngtng.com/2010/07/01/oauth-cli-test-your-twitter-and-other-oauth-apis-easily/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 11:36:10 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Ruby, Rails & Co.]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauthc]]></category>
		<category><![CDATA[qype]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.rngtng.com/?p=418</guid>
		<description><![CDATA[
By the time I was working at Qype, I often had to deal with OAuth APIs. Doing example request works to a certain point quite good with a Plugin the for Firefox. But when it comes to Authorized or POST Request you're stuck!

So I developed a tiny command line client, which allows you to ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.rngtng.com/files/2010/07/oauthc.gif" alt="" width="600" height="432" class="aligncenter size-full wp-image-422" /><br />
By the time I was working at Qype, I often had to deal with OAuth APIs. Doing example request works to a certain point quite good with a Plugin the for Firefox. But when it comes to Authorized or POST Request you&#8217;re stuck!</p>
<p>So I developed a tiny command line client, which allows you to send request easily. It comes as a gem and easily to install:</p>
<p><code>gem install oauth-cli</code></p>
<p>After installation, execute <strong>oauthc</strong>. You either make onetime calls, with giving all required data as parameter, or just go into interactive mode, to get a shell for multiple calls and history. For not stating all connection data over and over again, it comes with multiple profile support, a wizard to create those easily and presets for <strong>Twitter and Qype</strong>.</p>
<p>See this nifty example call:<br />
<code>oauthc -p twitter get statuses/friends.json</code></p>
<p>I hope you like it &#8211; Bug reports, suggestions, updates go to: </p>
<p><a href="http://github.com/rngtng/oauth-cli/issues" target="_blank">http://github.com/rngtng/oauth-cli/issues</a></p>
<p>See Readme:</p>
<p><a href="http://github.com/rngtng/oauth-cli/blob/master/README.rdoc" target="_blank">http://github.com/rngtng/oauth-cli/blob/master/README.rdoc</a></p>
<p>See Source:</p>
<p><a href="http://github.com/rngtng/oauth-cli" target="_blank">http://github.com/rngtng/oauth-cli</a></p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2010/07/01/oauth-cli-test-your-twitter-and-other-oauth-apis-easily/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If your ruby serial port doesn&#8217;t read what&#8217; you&#8217;re sending&#8230;</title>
		<link>http://www.rngtng.com/2009/11/27/if-your-ruby-serial-port-doesnt-read-what-youre-sending/</link>
		<comments>http://www.rngtng.com/2009/11/27/if-your-ruby-serial-port-doesnt-read-what-youre-sending/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 16:57:29 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Ruby, Rails & Co.]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[launchpad]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[Rails & Co.]]></category>
		<category><![CDATA[serial]]></category>
		<category><![CDATA[serialport]]></category>
		<category><![CDATA[uart]]></category>

		<guid isPermaLink="false">http://www.rngtng.com/?p=334</guid>
		<description><![CDATA[Some days ago I got my Novation launchpad an immediately started hacking with some Ruby and Arduino flavor. I wanted to port ccb23 Raindrops Project to launchpad. 

For that, I needed Serial communication within ruby. Thanks to ruby-serialport first steps went quite well. I could write OR read from and to Arduino easily. But ...]]></description>
			<content:encoded><![CDATA[<p>Some days ago I got my <a href="http://twitter.com/rngtng/status/5792203896">Novation</a> <a href="http://www.novationmusic.com/launchpad/">launchpad</a> an immediately started hacking with some <a href="http://github.com/thomasjachmann/launchpad">Ruby</a> and Arduino flavor. I wanted to port ccb23 <a href="http://vimeo.com/6916458">Raindrops Project</a> to launchpad. </p>
<p>For that, I needed Serial communication within ruby. Thanks to <a href="http://ruby-serialport.rubyforge.org/">ruby-serialport</a> first steps went quite well. I could write OR read from and to Arduino easily. But for some reasons, writing AND reading using the same instance didn&#8217;t work out. </p>
<p>I used a simple &#8216;send-input-back&#8217; sketch on the Arduino side. So every byte I&#8217;m sending is returned back. I checked with the Arduino IDE Serialmonitor and a simple Processing script &#8211; everything worked alright.  But using ruby it was different. Writing to serial port worked okay, but reading from it was just random. Sometimes I read the response, sometime I didn&#8217;t &#8211; really, really weird. Some headaches and a lot of time testing I finally found the solution: just open two instances of the serial port. One for sending, one for reading &#8211; and, surprise, surprise &#8211; it works perfect! Who would have guessed that!? Strange.. </p>
<pre class="brush: ruby; title: ; notranslate">
// To be completed
require 'serialport'
port_write = Serialport.new()
port_read = Serialport.new()
</pre>
<p>Ok, continuing hacking, more soon&#8230;</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2009/11/27/if-your-ruby-serial-port-doesnt-read-what-youre-sending/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby: a nice way to get name of current method you&#8217;re in:</title>
		<link>http://www.rngtng.com/2009/11/16/ruby-a-nice-way-to-get-name-of-current-method-youre-in/</link>
		<comments>http://www.rngtng.com/2009/11/16/ruby-a-nice-way-to-get-name-of-current-method-youre-in/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 16:39:52 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Ruby, Rails & Co.]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[Rails & Co.]]></category>

		<guid isPermaLink="false">http://www.rngtng.com/?p=318</guid>
		<description><![CDATA[This is a nice extension to get the name of the method you're currently in (Ruby &#60; 1.9)



for Ruby &#62;= 1.9 you can uses this:



]]></description>
			<content:encoded><![CDATA[<p>This is a nice extension to get the name of the method you&#8217;re currently in (Ruby &lt; 1.9)</p>
<pre class="brush: ruby; title: ; notranslate">
module Kernel
   private
   def this_method
     caller[0] =~ /`([^']*)'/ and $1
   end
end
</pre>
<p>for Ruby &gt;= 1.9 you can uses this:</p>
<pre class="brush: ruby; title: ; notranslate">
module Kernel
   private
   def this_method
     __method__
   end
end
</pre>
<p>[see <a href="http://stackoverflow.com/questions/199527/get-the-name-of-the-currently-executing-method-in-ruby">Stack Over Flow</a> as well]</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2009/11/16/ruby-a-nice-way-to-get-name-of-current-method-youre-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lot&#8217;s of Ruby and Rails Tricks</title>
		<link>http://www.rngtng.com/2009/11/12/lots-of-ruby-and-rails-tricks/</link>
		<comments>http://www.rngtng.com/2009/11/12/lots-of-ruby-and-rails-tricks/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 10:35:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby, Rails & Co.]]></category>
		<category><![CDATA[get started]]></category>
		<category><![CDATA[hint]]></category>
		<category><![CDATA[link tip]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Rails & Co.]]></category>

		<guid isPermaLink="false">http://urangatang.lustauffotos.com/?p=38</guid>
		<description><![CDATA[Quick, short post I always had in the queue:


Check this out, here some lists of good techniques to get started and to impove your Ruby and Rails code:

http://nettuts.com/articles/web-roundups/10-awesome-ruby-on-rails-techniques-to-get-you-started/

http://www.rubyinside.com/19-rails-tricks-most-rails-coders-dont-know-131.html

http://www.rubyinside.com/21-ruby-tricks-902.html

]]></description>
			<content:encoded><![CDATA[<p>Quick, short post I always had in the queue:</p>
<p style="text-align: center"><img class="aligncenter" src="http://www.designshak.com/wp-content/uploads/2009/08/bruce_on_rails.jpg" alt="" /></p>
<p>Check this out, here some lists of good techniques to get started and to impove your Ruby and Rails code:</p>
<p><a href="http://nettuts.com/articles/web-roundups/10-awesome-ruby-on-rails-techniques-to-get-you-started/" target="_blank">http://nettuts.com/articles/web-roundups/10-awesome-ruby-on-rails-techniques-to-get-you-started/</a></p>
<p><a href="http://www.rubyinside.com/19-rails-tricks-most-rails-coders-dont-know-131.html" target="_blank">http://www.rubyinside.com/19-rails-tricks-most-rails-coders-dont-know-131.html</a></p>
<p><a href="http://www.rubyinside.com/21-ruby-tricks-902.html" target="_blank">http://www.rubyinside.com/21-ruby-tricks-902.html</a></p>
<p>[Awsm picture taken from <a href="http://www.designshak.com/blog/ruby-on-rails">DesignShark</a>]</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2009/11/12/lots-of-ruby-and-rails-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails flag_shih_tzu Plugin with named_scope</title>
		<link>http://www.rngtng.com/2009/08/20/rails-flag_shih_tzu-plugin-with-named_scope/</link>
		<comments>http://www.rngtng.com/2009/08/20/rails-flag_shih_tzu-plugin-with-named_scope/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 17:02:36 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Ruby, Rails & Co.]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://www.rngtng.com/?p=200</guid>
		<description><![CDATA[When it comes to store a load of boolean data into your model you easily end up with lots of columns which blow up your table unnecessarily. The developers at Xing solved this problem with a nifty Rails Plugin called flag_shih_tzu. The trick is to store all boolean values combined as a bit vector, ...]]></description>
			<content:encoded><![CDATA[<p>When it comes to store a load of boolean data into your model you easily end up with lots of columns which blow up your table unnecessarily. The developers at <a href="http://blog.xing.com/category/tech-blog">Xing</a> solved this problem with a nifty Rails Plugin called <a href="http://github.com/xing/flag_shih_tzu/">flag_shih_tzu</a>. The trick is to store all boolean values combined as a bit vector, which allows you to put up to 32 values (4Byte) within a single Integer column. Automatic generated access methods allows you to deal with you model as your are used to. Wanna see an example? (Taken from plugin docs)</p>
<pre class="brush: ruby; title: ; notranslate">
class Spaceship &lt; ActiveRecord::Base
  include FlagShihTzu

  has_flags 1 =&gt; :warpdrive,
            2 =&gt; :shields

end

enterprise = Spaceship.new
enterprise.warpdrive = true
enterprise.shields = false
enterprise.save

enterprise.warpdrive? #=&gt; true
enterprise.shields? # =&gt; false
</pre>
<p>Nice, isn&#8217;t it?</p>
<p>Unfortunately named scopes where missing for selecting models easily. So another github fork, another fix, and here were are. Now this works as well:</p>
<pre class="brush: ruby; title: ; notranslate">
Spaceship.flagged(:warpdrive).not_flagged(:shields).all
</pre>
<p>Check it out here: <a href="http://github.com/rngtng/flag_shih_tzu/tree/master" target="_blank">http://github.com/rngtng/flag_shih_tzu/tree/master</a></p>
<p><strong>Update:</strong> replaced &#8216;routes&#8217; with &#8216;scopes&#8217; &#8211; I&#8217;m getting confused with that all the time, how come!? <img src='http://www.rngtng.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2009/08/20/rails-flag_shih_tzu-plugin-with-named_scope/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

