<?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>#{茶男與藍牌} &#187; Ruby</title>
	<atom:link href="http://www.chentianwen.net/wordpress/category/it/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chentianwen.net/wordpress</link>
	<description>Life has to be exciting.</description>
	<lastBuildDate>Wed, 01 Feb 2012 01:34:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Make compass working with sass in rails3.1</title>
		<link>http://www.chentianwen.net/wordpress/2011/12/13/make-compass-working-with-sass-in-rails3-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=make-compass-working-with-sass-in-rails3-1</link>
		<comments>http://www.chentianwen.net/wordpress/2011/12/13/make-compass-working-with-sass-in-rails3-1/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 12:21:01 +0000</pubDate>
		<dc:creator>茶男</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Compass]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Sass]]></category>

		<guid isPermaLink="false">http://www.chentianwen.net/wordpress/?p=581</guid>
		<description><![CDATA[<p id="LC1">Add the following to your application.rb</p> class Application &#60; Rails::Application   config.sass.load_paths &#60;&#60; &#8220;#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets&#8221;   config.sass.load_paths &#60;&#60; &#8220;#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/blueprint/stylesheets&#8221; end]]></description>
		<wfw:commentRss>http://www.chentianwen.net/wordpress/2011/12/13/make-compass-working-with-sass-in-rails3-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>warning: toplevel constant XX referenced by YY::XX (review)</title>
		<link>http://www.chentianwen.net/wordpress/2011/11/01/warning-toplevel-constant-xx-referenced-by-yyxx/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=warning-toplevel-constant-xx-referenced-by-yyxx</link>
		<comments>http://www.chentianwen.net/wordpress/2011/11/01/warning-toplevel-constant-xx-referenced-by-yyxx/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 00:43:33 +0000</pubDate>
		<dc:creator>茶男</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.chentianwen.net/wordpress/?p=558</guid>
		<description><![CDATA[<p>When I try to move the Devise stuff into a module User::Devise and include it in class User, I got this warning &#8216;warning: toplevel constant Devise referenced by User::Devise&#8217;</p> <p>Please see the code before and after for a solution.</p> <p>Solution is to make User::Devise before you do the include for class User</p> <p>&#160;</p>]]></description>
		<wfw:commentRss>http://www.chentianwen.net/wordpress/2011/11/01/warning-toplevel-constant-xx-referenced-by-yyxx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discover ActiveRecord: cast an object to specified class</title>
		<link>http://www.chentianwen.net/wordpress/2011/10/28/discover-activerecord-cast-an-object-to-specified-class/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=discover-activerecord-cast-an-object-to-specified-class</link>
		<comments>http://www.chentianwen.net/wordpress/2011/10/28/discover-activerecord-cast-an-object-to-specified-class/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 05:22:06 +0000</pubDate>
		<dc:creator>茶男</dc:creator>
				<category><![CDATA[ActiveRecord]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.chentianwen.net/wordpress/?p=551</guid>
		<description><![CDATA[<p>Can&#8217;t find anything about casting an instance to specified class? Of cause, in Ruby, there is no such concept that you need to cast an instance in most of the cases. But how about you need to? Here is the answer:</p> <p>By using ActiveRecord::Persistence.becomes, you can easily cast it to specified class.</p> <p>For example:</p> <p>&#160;</p>]]></description>
		<wfw:commentRss>http://www.chentianwen.net/wordpress/2011/10/28/discover-activerecord-cast-an-object-to-specified-class/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>trick using question mark in rails model</title>
		<link>http://www.chentianwen.net/wordpress/2011/10/17/trick-using-question-mark-in-rails-model/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=trick-using-question-mark-in-rails-model</link>
		<comments>http://www.chentianwen.net/wordpress/2011/10/17/trick-using-question-mark-in-rails-model/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 04:54:25 +0000</pubDate>
		<dc:creator>茶男</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.chentianwen.net/wordpress/?p=530</guid>
		<description><![CDATA[p = Person.new p.first_name = 'Tian' p.last_name = nil p.first_name? # =&#62; true p.last_name? # =&#62; false]]></description>
		<wfw:commentRss>http://www.chentianwen.net/wordpress/2011/10/17/trick-using-question-mark-in-rails-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>alternative usage of question mark in ruby</title>
		<link>http://www.chentianwen.net/wordpress/2011/10/17/alternative-usage-of-question-mark-in-ruby/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=alternative-usage-of-question-mark-in-ruby</link>
		<comments>http://www.chentianwen.net/wordpress/2011/10/17/alternative-usage-of-question-mark-in-ruby/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 02:16:04 +0000</pubDate>
		<dc:creator>茶男</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.chentianwen.net/wordpress/?p=525</guid>
		<description><![CDATA[&#62;&#62; ?A =&#62; 65]]></description>
		<wfw:commentRss>http://www.chentianwen.net/wordpress/2011/10/17/alternative-usage-of-question-mark-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6 Ways to Run Shell Commands in Ruby</title>
		<link>http://www.chentianwen.net/wordpress/2011/09/22/6-ways-to-run-shell-commands-in-ruby/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=6-ways-to-run-shell-commands-in-ruby</link>
		<comments>http://www.chentianwen.net/wordpress/2011/09/22/6-ways-to-run-shell-commands-in-ruby/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 05:02:22 +0000</pubDate>
		<dc:creator>茶男</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.chentianwen.net/wordpress/?p=489</guid>
		<description><![CDATA[<p>from http://tech.natemurray.com/2007/03/ruby-shell-commands.html</p> <p>Often times we want to interact with the operating system or run shell commands from within Ruby. Ruby provides a number of ways for us to perform this task.</p> Exec <p>Kernel#exec (or simply exec) replaces the current process by running the given command For example:</p> $ irb &#62;&#62; exec 'echo "hello $HOSTNAME"' hello nate.local $ <p>Notice [...]]]></description>
		<wfw:commentRss>http://www.chentianwen.net/wordpress/2011/09/22/6-ways-to-run-shell-commands-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails: Global access to Rake DSL methods is deprecated</title>
		<link>http://www.chentianwen.net/wordpress/2011/09/16/rails-global-access-to-rake-dsl-methods-is-deprecated/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rails-global-access-to-rake-dsl-methods-is-deprecated</link>
		<comments>http://www.chentianwen.net/wordpress/2011/09/16/rails-global-access-to-rake-dsl-methods-is-deprecated/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 01:41:17 +0000</pubDate>
		<dc:creator>茶男</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Rake]]></category>

		<guid isPermaLink="false">http://www.chentianwen.net/wordpress/?p=483</guid>
		<description><![CDATA[<p>from http://benwoodall.com/2011/06/rails-global-access-to-rake-dsl-methods-is-deprecated/</p> So apparently the newest version of Rake (0.9+) breaks rails. You will get the error: WARNING: Global access to Rake DSL methods is deprecated. Please Include ... Rake::DSL into classes and modules which use the Rake DSL methods. The quick fix is to downgrade to Rake 0.8.7, but you can also add this little [...]]]></description>
		<wfw:commentRss>http://www.chentianwen.net/wordpress/2011/09/16/rails-global-access-to-rake-dsl-methods-is-deprecated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pre-defined Variables</title>
		<link>http://www.chentianwen.net/wordpress/2011/09/14/pre-defined-variables/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pre-defined-variables</link>
		<comments>http://www.chentianwen.net/wordpress/2011/09/14/pre-defined-variables/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 12:17:48 +0000</pubDate>
		<dc:creator>茶男</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.chentianwen.net/wordpress/?p=477</guid>
		<description><![CDATA[<p>&#160;</p> Name Aliases Description $! $ERROR_INFO The exception information message set by the last &#8216;raise&#8217; (last exception thrown). $@ $ERROR_POSITION Array of the backtrace of the last exception thrown. $&#38; $MATCH The string matched by the last successful pattern match in this scope. $` $PREMATCH The string to the left of the last successful match. [...]]]></description>
		<wfw:commentRss>http://www.chentianwen.net/wordpress/2011/09/14/pre-defined-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capistrano deploy a branch or current commit</title>
		<link>http://www.chentianwen.net/wordpress/2011/09/05/capistrano-deploy-a-branch-or-current-commit/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=capistrano-deploy-a-branch-or-current-commit</link>
		<comments>http://www.chentianwen.net/wordpress/2011/09/05/capistrano-deploy-a-branch-or-current-commit/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 04:55:13 +0000</pubDate>
		<dc:creator>茶男</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Branch]]></category>
		<category><![CDATA[Capistrano]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.chentianwen.net/wordpress/?p=472</guid>
		<description><![CDATA[<p>deploy a branch</p> set :branch, $1 if `git branch` =~ /\* (\S+)\s/m <p>deploy current commit</p> set :branch, $1 if `git rev-parse HEAD` =~ /(\S+)/]]></description>
		<wfw:commentRss>http://www.chentianwen.net/wordpress/2011/09/05/capistrano-deploy-a-branch-or-current-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Demystifying Irb&#8217;s Commands</title>
		<link>http://www.chentianwen.net/wordpress/2011/08/30/demystifying-irbs-commands/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=demystifying-irbs-commands</link>
		<comments>http://www.chentianwen.net/wordpress/2011/08/30/demystifying-irbs-commands/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 11:50:52 +0000</pubDate>
		<dc:creator>茶男</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[IRB]]></category>

		<guid isPermaLink="false">http://www.chentianwen.net/wordpress/?p=470</guid>
		<description><![CDATA[<p>from http://tagaholic.me/2009/05/11/demystifying-irb-commands.html</p> <p>Irb is one of the most commonly used standard ruby libraries, yet most don’t seem to know much about it. I’ve lost count of the number of blog posts that explain some irb “tricks” or “secret” config options. This is the first in a series that aims to make irb less magical and more [...]]]></description>
		<wfw:commentRss>http://www.chentianwen.net/wordpress/2011/08/30/demystifying-irbs-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

