<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - cczona</title>
<link>http://snipplr.com/users/cczona/tags/ruby</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Fri, 21 Nov 2008 16:52:55 GMT</pubDate>
<item>
<title>(Other) port install ruby -> malloc error</title>
<link>http://snipplr.com/view/7208/port-install-ruby--malloc-error/</link>
<description><![CDATA[ <p>'port install ruby' sometimes results in malloc errors near the final phase (just after destroot completes).  It appears that macports may be out of memory while installing documentation.</p> ]]></description>
<pubDate>Thu, 10 Jul 2008 04:35:47 GMT</pubDate>
<guid>http://snipplr.com/view/7208/port-install-ruby--malloc-error/</guid>
</item>
<item>
<title>(Bash) Add paths to Ruby 'require'</title>
<link>http://snipplr.com/view/6192/add-paths-to-ruby-require/</link>
<description><![CDATA[ <p>Suppose you created a script chart.rb in /home/foo/ruby/mylib direcory. Now, you want to use this in the app.rb located in /home/foo/ruby/scripts. In ~/.bash_profile:</p> ]]></description>
<pubDate>Mon, 12 May 2008 17:52:58 GMT</pubDate>
<guid>http://snipplr.com/view/6192/add-paths-to-ruby-require/</guid>
</item>
<item>
<title>(Ruby) Irb power tricks with Wirble &amp;amp; Utility-Belt</title>
<link>http://snipplr.com/view/5597/irb-power-tricks-with-wirble--utilitybelt/</link>
<description><![CDATA[ <p>Note: most of these will be available to the shell and Rails' console too.</p> ]]></description>
<pubDate>Fri, 28 Mar 2008 12:24:12 GMT</pubDate>
<guid>http://snipplr.com/view/5597/irb-power-tricks-with-wirble--utilitybelt/</guid>
</item>
<item>
<title>(Rails) Rails link to an image instead of text</title>
<link>http://snipplr.com/view/5595/rails-link-to-an-image-instead-of-text/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 28 Mar 2008 11:49:22 GMT</pubDate>
<guid>http://snipplr.com/view/5595/rails-link-to-an-image-instead-of-text/</guid>
</item>
<item>
<title>(Ruby) Haml 'nesting within a tag' error</title>
<link>http://snipplr.com/view/5594/haml-nesting-within-a-tag-error/</link>
<description><![CDATA[ <p>"When using haml, an HTML tag is represented using %tagname, but in the case of an HTML tag with attributes, the representation is %tagname{:attribute => value}.

It turns out there must be no whitespace between %tagname and {:attribute => value}.  This was the source of a lot of errors when I was trying to write haml forms, since the error message was the cryptic: Illegal Nesting: Nesting within a tag that already has content is illegal."</p> ]]></description>
<pubDate>Fri, 28 Mar 2008 11:28:26 GMT</pubDate>
<guid>http://snipplr.com/view/5594/haml-nesting-within-a-tag-error/</guid>
</item>
<item>
<title>(Rails) Rendering partials in Rails 2.0</title>
<link>http://snipplr.com/view/5586/rendering-partials-in-rails-20/</link>
<description><![CDATA[ <p>"The new naming scheme for template (eg. .html.erb) does not seem to work for partials. When using :partial => 'form' a filename "_form.html.erb" is not recognized. "

Rails now requires the partial to be referenced by dotted format</p> ]]></description>
<pubDate>Fri, 28 Mar 2008 05:08:36 GMT</pubDate>
<guid>http://snipplr.com/view/5586/rendering-partials-in-rails-20/</guid>
</item>
<item>
<title>(Ruby) order/format of params in method definition</title>
<link>http://snipplr.com/view/5551/orderformat-of-params-in-method-definition/</link>
<description><![CDATA[ <p>See also p. 348  ("Invoking a Method") of Pickaxe 2nd edition</p> ]]></description>
<pubDate>Mon, 24 Mar 2008 22:41:16 GMT</pubDate>
<guid>http://snipplr.com/view/5551/orderformat-of-params-in-method-definition/</guid>
</item>
<item>
<title>(Ruby) What version of Ruby and Rails is this using?</title>
<link>http://snipplr.com/view/5545/what-version-of-ruby-and-rails-is-this-using/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 24 Mar 2008 14:25:44 GMT</pubDate>
<guid>http://snipplr.com/view/5545/what-version-of-ruby-and-rails-is-this-using/</guid>
</item>
<item>
<title>(Ruby) Ruby heredoc tricks</title>
<link>http://snipplr.com/view/5432/ruby-heredoc-tricks/</link>
<description><![CDATA[ <p>Following a</p> ]]></description>
<pubDate>Fri, 14 Mar 2008 19:31:08 GMT</pubDate>
<guid>http://snipplr.com/view/5432/ruby-heredoc-tricks/</guid>
</item>
<item>
<title>(Ruby) Use regex to match a Ruby substring, and reference it like an index</title>
<link>http://snipplr.com/view/5420/use-regex-to-match-a-ruby-substring-and-reference-it-like-an-index/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 13 Mar 2008 21:41:41 GMT</pubDate>
<guid>http://snipplr.com/view/5420/use-regex-to-match-a-ruby-substring-and-reference-it-like-an-index/</guid>
</item>
<item>
<title>(Ruby) to_str vs to_s</title>
<link>http://snipplr.com/view/5419/tostr-vs-tos/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 13 Mar 2008 21:25:21 GMT</pubDate>
<guid>http://snipplr.com/view/5419/tostr-vs-tos/</guid>
</item>
<item>
<title>(Ruby) optimize Ruby memory usage by avoiding string accumulation</title>
<link>http://snipplr.com/view/5418/optimize-ruby-memory-usage-by-avoiding-string-accumulation/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 13 Mar 2008 18:55:05 GMT</pubDate>
<guid>http://snipplr.com/view/5418/optimize-ruby-memory-usage-by-avoiding-string-accumulation/</guid>
</item>
<item>
<title>(Ruby) make Ruby strings behave like files</title>
<link>http://snipplr.com/view/5417/make-ruby-strings-behave-like-files/</link>
<description><![CDATA[ <p>This is handy for testing, when you need to simulate an open file or open URI.  Why, and the Pickaxe book, have better examples</p> ]]></description>
<pubDate>Thu, 13 Mar 2008 18:38:19 GMT</pubDate>
<guid>http://snipplr.com/view/5417/make-ruby-strings-behave-like-files/</guid>
</item>
<item>
<title>(Other) parse URI object, and fetch response from it, in one step</title>
<link>http://snipplr.com/view/5409/parse-uri-object-and-fetch-response-from-it-in-one-step/</link>
<description><![CDATA[ <p>URI objects can be opened directly by open-uri</p> ]]></description>
<pubDate>Thu, 13 Mar 2008 16:26:14 GMT</pubDate>
<guid>http://snipplr.com/view/5409/parse-uri-object-and-fetch-response-from-it-in-one-step/</guid>
</item>
<item>
<title>(Ruby) Execute arbitrary code with different level of error messaging</title>
<link>http://snipplr.com/view/5398/execute-arbitrary-code-with-different-level-of-error-messaging/</link>
<description><![CDATA[ <p>You can turn off warnings for a section of your code by setting $VERBOSE to nil. Even better is to codify this in a method.  Since this method takes a block as its parameter, you can now pass it arbitrary chunks of code to execute without warnings.</p> ]]></description>
<pubDate>Thu, 13 Mar 2008 03:27:01 GMT</pubDate>
<guid>http://snipplr.com/view/5398/execute-arbitrary-code-with-different-level-of-error-messaging/</guid>
</item>
<item>
<title>(Ruby) 'uninitialized constant Gem::GemRunner'</title>
<link>http://snipplr.com/view/5397/uninitialized-constant-gemgemrunner/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 13 Mar 2008 00:00:08 GMT</pubDate>
<guid>http://snipplr.com/view/5397/uninitialized-constant-gemgemrunner/</guid>
</item>
<item>
<title>(Ruby) CGI library gotcha</title>
<link>http://snipplr.com/view/5396/cgi-library-gotcha/</link>
<description><![CDATA[ <p>Beware of requiring 'CGI'.  There's trouble in them thar hills/</p> ]]></description>
<pubDate>Wed, 12 Mar 2008 23:58:07 GMT</pubDate>
<guid>http://snipplr.com/view/5396/cgi-library-gotcha/</guid>
</item>
</channel>
</rss>