<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;DEIHSHw-cCp7ImA9WhRRFE4.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292</id><updated>2011-11-27T15:28:59.258-08:00</updated><category term="职场" /><category term="ruby textmate tips" /><category term="ruby" /><category term="Life" /><category term="mysql" /><category term="AppEngine Python" /><category term="rails" /><category term="工作" /><category term="mac" /><category term="thinking" /><title>Coder,肖德时的个人BLOG</title><subtitle type="html">mysql,Linux,HighPerformance,ruby on Rails</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>89</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/coderchina" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="coderchina" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUIHR3Y7fyp7ImA9WhZTF0w.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-5120610521287110092</id><published>2011-03-21T07:25:00.001-07:00</published><updated>2011-03-21T07:25:36.807-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-21T07:25:36.807-07:00</app:edited><title>快速构建GIT仓库方法</title><content type="html">&lt;p&gt;老手请直接过滤，谢谢&lt;br&gt;&lt;/p&gt;&lt;p&gt;Create remote repository:&lt;/p&gt; &lt;p&gt;&lt;code&gt;ssh &lt;a href="mailto:mpapis@niczsoft.com" target="_blank"&gt;mpapis@niczsoft.com&lt;/a&gt; -C &amp;quot;git init --bare repos/library3.git&amp;quot;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Create local repository:&lt;/p&gt; &lt;p&gt;&lt;code&gt;git init&lt;br&gt; git add .&lt;br&gt; git commit -m &amp;quot;initial commit&amp;quot;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Tell local repository to synchronize with remote repository:&lt;/p&gt; &lt;p&gt;&lt;code&gt;git remote add origin mpapis@niczsoft.com:repos/library3.git&lt;br&gt; git config branch.master.remote origin&lt;br&gt; git config branch.master.merge refs/heads/master&lt;br&gt; git push&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;参考这个：&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;a href="http://niczsoft.com/2011/03/fastest-way-to-get-git-server-v2/" target="_blank"&gt;http://niczsoft.com/2011/03/fastest-way-to-get-git-server-v2/&lt;/a&gt;&lt;br&gt;&lt;/code&gt;&lt;/p&gt; &lt;br&gt;-- &lt;br&gt;Deshi Xiao&lt;br&gt; Twitter: xds2000&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com" target="_blank"&gt;gmail.com&lt;/a&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-5120610521287110092?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/5120610521287110092/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2011/03/git.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/5120610521287110092?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/5120610521287110092?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2011/03/git.html" title="快速构建GIT仓库方法" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUcMRHYyfCp7ImA9Wx9bGEU.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-6308136888060418161</id><published>2011-02-28T00:51:00.001-08:00</published><updated>2011-02-28T00:51:25.894-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-28T00:51:25.894-08:00</app:edited><title>能让我把git库同步到svn的步骤，内幕版</title><content type="html">把git同步到svn的想法有好久了，就是没成功。那叫一个不爽。&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;今天从GL挖来惊喜：&lt;/div&gt;&lt;div&gt;&lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;a href="http://code.google.com/p/remote-testbed/wiki/SvnSynchronization"&gt;http://code.google.com/p/remote-testbed/wiki/SvnSynchronization&lt;/a&gt;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;步骤：&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;1. cd &amp;nbsp;$git-workdir&lt;/div&gt;&lt;div&gt;$git-workdir就是你本地的git目录，注意branch要在master，我只同步到trunck.说白了只同步，不使用SVN&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;2.&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;git svn init &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;--&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;username&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;$username https&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;:&lt;/span&gt;&lt;span class="com" style="color: rgb(136, 0, 0); "&gt;//&lt;a href="http://remote-testbed.googlecode.com/svn/trunk/"&gt;remote-testbed.googlecode.com/svn/trunk/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;$git-workdir&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;3.&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "&gt;git svn fetch&lt;/span&gt;&lt;/div&gt;&lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; "&gt;&lt;pre class="prettyprint" style="font-size: 12px; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(204, 204, 204); "&gt; &lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;r11 &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="lit" style="color: rgb(0, 102, 102); "&gt;37275f86ebaa13616554dc5ddbeb1112d6e897f3&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;(&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;git&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;-&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;svn&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;)&lt;/span&gt;&lt;/pre&gt; &lt;/span&gt;&lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;div&gt;我这里还出worning,没办法等。。。。&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;4.&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;git branch svn&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;/&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;master master&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;5.在当前目录跑这个叫本就可以。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; white-space: normal; "&gt;&lt;pre class="prettyprint" style="font-size: 12px; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(204, 204, 204); "&gt; &lt;span class="com" style="color: rgb(136, 0, 0); "&gt;#!/bin/sh&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt;&lt;br&gt;HEAD&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;=&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;$(git symbolic-ref HEAD)&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;||&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;exit&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="lit" style="color: rgb(0, 102, 102); "&gt;1&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt; &lt;br&gt;&lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;die&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;()&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt;&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;{&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;git-svn-update: $*&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;exit&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="lit" style="color: rgb(0, 102, 102); "&gt;1&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt; &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;}&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt;&lt;br&gt;git svn fetch &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;||&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;die&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;failed to fetch SVN changes&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt; git branch &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;-&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;f svn&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;/&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;tmp master &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;||&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;die&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;failed to update/create temporary working branch&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt; git rebase &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;--&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;onto git&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;-&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;svn svn&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;/&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;master svn&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;/&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;tmp &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;||&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;die&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;failed to rebase on top of git svn branch&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt; git svn dcommit &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;||&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="kwd" style="color: rgb(0, 0, 136); "&gt;die&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt; &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;failed to update SVN repository&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt; git branch &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;-&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;f svn&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;/&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;master master&lt;br&gt; git checkout &lt;/span&gt;&lt;span class="str" style="color: rgb(0, 136, 0); "&gt;&amp;quot;${HEAD#refs/heads/}&amp;quot;&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;&lt;br&gt;git branch &lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;-&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;D svn&lt;/span&gt;&lt;span class="pun" style="color: rgb(102, 102, 0); "&gt;/&lt;/span&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;tmp&lt;/span&gt;&lt;/pre&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "&gt;&lt;span class="pln" style="color: rgb(0, 0, 0); "&gt;6.done.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;div&gt; &lt;br clear="all"&gt;&lt;br&gt;-- &lt;br&gt;Deshi Xiao&lt;br&gt;Twitter: xds2000&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com" target="_blank"&gt;gmail.com&lt;/a&gt;&lt;br&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-6308136888060418161?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/6308136888060418161/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2011/02/gitsvn.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/6308136888060418161?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/6308136888060418161?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2011/02/gitsvn.html" title="能让我把git库同步到svn的步骤，内幕版" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkcCQ34yeip7ImA9Wx9QEkw.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-8343714334660355129</id><published>2010-12-24T10:06:00.000-08:00</published><updated>2010-12-24T10:07:42.092-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-24T10:07:42.092-08:00</app:edited><title>authlogic with rails3,遇到问题，找到方法，解决之路</title><content type="html">authlogic是认证gem，是当前最普遍使用的一款工具包，对rails3集成还不是很完美。（特对rails3.0.3+ruby1.9.2p0）&lt;br clear="all"&gt;这里特意把相关的参考资料索引在这里，方便你来使用：&lt;br&gt;&lt;br&gt;&lt;a href="http://asciicasts.com/episodes/160-authlogic"&gt;http://asciicasts.com/episodes/160-authlogic&lt;/a&gt;&lt;br&gt; 这里思路和代码都比较完整。&lt;br&gt;&lt;br&gt;&lt;a href="https://github.com/binarylogic/authlogic"&gt;https://github.com/binarylogic/authlogic&lt;/a&gt;&lt;br&gt;authlogic的codebase&lt;br&gt;&lt;br&gt;&lt;a href="http://www.dixis.com/?p=352"&gt;http://www.dixis.com/?p=352&lt;/a&gt;&lt;br&gt;这个提到了使用rails3_generators&lt;br&gt; &lt;br&gt;&lt;a href="http://techoctave.com/c7/posts/37-authlogic-and-rails-3-0-solution"&gt;http://techoctave.com/c7/posts/37-authlogic-and-rails-3-0-solution&lt;/a&gt;&lt;br&gt;这个提到了问题的根源和解决方法&lt;br&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-8343714334660355129?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/8343714334660355129/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/12/authlogic-with-rails3.html#comment-form" title="1 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/8343714334660355129?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/8343714334660355129?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/12/authlogic-with-rails3.html" title="authlogic with rails3,遇到问题，找到方法，解决之路" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;D0cFRns7eCp7ImA9Wx9SFk0.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-7879751137628462926</id><published>2010-12-05T19:10:00.001-08:00</published><updated>2010-12-05T19:10:17.500-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-05T19:10:17.500-08:00</app:edited><title>Git使用过程中遇到的问题及解决方法</title><content type="html">1、在github上fork过的项目创建branch&lt;div&gt;参考[1]&lt;br&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;2、使用less看的log不是彩色的，使用less -R log/development.log就可以。&lt;br&gt;参考[2]&lt;br&gt;&lt;br&gt;[1] &lt;a href="http://www.zorched.net/2008/04/14/start-a-new-branch-on-your-remote-git-repository/" target="_blank"&gt;http://www.zorched.net/2008/04/14/start-a-new-branch-on-your-remote-git-repository/&lt;/a&gt;&lt;br clear="all"&gt;  [2] &lt;a href="http://www.sanityinc.com/articles/view-rails-logs-with-less"&gt;http://www.sanityinc.com/articles/view-rails-logs-with-less&lt;/a&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com" target="_blank"&gt;gmail.com&lt;/a&gt;&lt;br&gt;  &lt;/div&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-7879751137628462926?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/7879751137628462926/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/12/git.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/7879751137628462926?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/7879751137628462926?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/12/git.html" title="Git使用过程中遇到的问题及解决方法" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0MCQXo8cSp7ImA9Wx9TFE0.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-2669189494565234256</id><published>2010-11-21T05:36:00.000-08:00</published><updated>2010-11-21T21:57:40.479-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-21T21:57:40.479-08:00</app:edited><title>rails3 Nested Forms blah blah</title><content type="html">&lt;p class="mobile-photo"&gt;&lt;a href="http://2.bp.blogspot.com/_EvAlXkwLm0g/TOkgfTdR5nI/AAAAAAAAASQ/3LCPgyG-Ecw/s1600/project-nestform-720999.png"&gt;&lt;img src="http://2.bp.blogspot.com/_EvAlXkwLm0g/TOkgfTdR5nI/AAAAAAAAASQ/3LCPgyG-Ecw/s320/project-nestform-720999.png" alt="" id="BLOGGER_PHOTO_ID_5541996538627221106" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;Rails3 UJS and nested form, I have searched more sample like,eg: &lt;a href="http://stackoverflow.com/questions/2678009/how-to-add-and-remove-nested-model-fields-dynamically-using-haml-and-formtastic"&gt;this&lt;/a&gt;.&lt;br /&gt;I found all reference's source is Ryan Bates nested form exmaple,based in github.  but in rails3,i came crome this view [1]. it's all sucks.&lt;br /&gt;the cause reason is the hidden temple default value is false.when sumit action,the hidden values will not discard,and continue update this params.&lt;br /&gt;i see the log,i think maybe some validation is wrong. oh,i found the original accepts_nested_attributes_for is&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;reject_if =&amp;gt; lamda {|a| a.values.all?(&amp;amp;:blank?)}&lt;/span&gt;&lt;br /&gt;this is blocker question.&lt;br /&gt;i change the evalution assert to :&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;reject_if =&amp;gt; proc {|a| a[:name].blank? }&lt;/span&gt;&lt;br /&gt;attention,the:name is task's attribute name.&lt;br /&gt;this is indicate original code is not working on rails3.&lt;br /&gt;this is all.done.for your convinent test,i have attached my sample deme.have a try.&lt;br /&gt;&lt;br /&gt;1.see attached project-nestform.png&lt;br /&gt;2.&lt;a href="http://www.box.net/shared/22r265zxm4"&gt;nestform4rails3.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;--&lt;br /&gt;tommy xiao&lt;br /&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com/"&gt;gmail.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-2669189494565234256?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/2669189494565234256/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/11/rails3-nested-forms-blah-blah.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/2669189494565234256?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/2669189494565234256?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/11/rails3-nested-forms-blah-blah.html" title="rails3 Nested Forms blah blah" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_EvAlXkwLm0g/TOkgfTdR5nI/AAAAAAAAASQ/3LCPgyG-Ecw/s72-c/project-nestform-720999.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEIFQXs4eip7ImA9Wx5aGUo.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-3590933691093035299</id><published>2010-11-16T21:41:00.001-08:00</published><updated>2010-11-16T21:41:50.532-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-16T21:41:50.532-08:00</app:edited><title>FYI, What mean is unprocessable_entity</title><content type="html">Source:&lt;br&gt;&lt;a href="http://www.rornoob.com/a/where-is-unprocessable-entity/"&gt;http://www.rornoob.com/a/where-is-unprocessable-entity/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Answer:&lt;br&gt;&lt;a href="http://www.codyfauser.com/2008/7/4/rails-http-status-code-to-symbol-mapping"&gt;http://www.codyfauser.com/2008/7/4/rails-http-status-code-to-symbol-mapping&lt;/a&gt;&lt;br&gt; &lt;br clear="all"&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-3590933691093035299?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/3590933691093035299/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/11/fyi-what-mean-is-unprocessableentity.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/3590933691093035299?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/3590933691093035299?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/11/fyi-what-mean-is-unprocessableentity.html" title="FYI, What mean is unprocessable_entity" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0EBQXo6fip7ImA9Wx5UFEs.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-818333009573394260</id><published>2010-10-18T22:20:00.001-07:00</published><updated>2010-10-18T22:20:50.416-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-18T22:20:50.416-07:00</app:edited><title>SSH With PublicKey issue:SSH Error: Permission denied (publickey,gssapi-with-mic) resolve way.</title><content type="html">今天给一个服务器加public key认证。出错：&lt;br&gt;&lt;span class="navbar"&gt;&lt;strong&gt;Permission denied (publickey,gssapi-with-mic) &lt;br&gt;&lt;span style="font-weight: normal;"&gt;sshd_config配置是以前的备份，不会有错，就是过不去。网上一大堆出招的，但均无效果。&lt;/span&gt;&lt;br style="font-weight: normal;"&gt;&lt;span style="font-weight: normal;"&gt;回到问题报错提示，这个应该是权限，但哪里呢？&lt;/span&gt;&lt;br style="font-weight: normal;"&gt; 最后还是&lt;a href="http://www.webhostingtalk.com/showthread.php?t=571666"&gt;这里给了提示&lt;/a&gt;&lt;br&gt;&lt;/strong&gt;&lt;/span&gt;make sure that the *right* permissions are set up&lt;br&gt; &lt;br&gt; drwx------ 2 virender virender 4096 May  7 04:51 .ssh&lt;br&gt; -rw------- 1 virender virender 393 May  7 03:41 .ssh/authorized_key&lt;br&gt;&lt;br&gt;还有不少人&lt;a href="http://linux.chinaunix.net/bbs/viewthread.php?tid=887373"&gt;遇到我这个问题&lt;/a&gt;，但都没人解决.&lt;br&gt;&lt;br&gt;其实就是.ssh目录权限如果太大，sshd是不让使用公钥认证的。&lt;br&gt;所以，在你配置完之后，这样处理：&lt;br&gt; $ &lt;kbd&gt;chmod go-w ~/&lt;/kbd&gt;&lt;br&gt;$ &lt;kbd&gt;chmod 700 ~/.ssh&lt;/kbd&gt;&lt;br&gt;$ &lt;kbd&gt;chmod go-rwx ~/.ssh/*&lt;br&gt;&lt;/kbd&gt;OpenSSH may also refuse to support public key authentication if the file permissions are too open. &lt;br&gt;OpenSSH在文件权限属性太开放，还是会拒绝支持公钥认证。&lt;br&gt; &lt;br&gt;Done.&lt;br&gt;&lt;kbd&gt;&lt;br clear="all"&gt;&lt;/kbd&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-818333009573394260?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/818333009573394260/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/10/ssh-with-publickey-issuessh-error.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/818333009573394260?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/818333009573394260?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/10/ssh-with-publickey-issuessh-error.html" title="SSH With PublicKey issue:SSH Error: Permission denied (publickey,gssapi-with-mic) resolve way." /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkEMQnY8eCp7ImA9Wx5VGU4.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-8489539662378137164</id><published>2010-10-12T19:57:00.000-07:00</published><updated>2010-10-12T19:58:03.870-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-12T19:58:03.870-07:00</app:edited><title>OpenOffice 3.2.1 On Fedora 13 Installation log</title><content type="html">在Fedora 13上，安装OpenOffice 3.2.1总是不顺利，Shit!记录下来&lt;br&gt;&lt;br&gt;想删除：&lt;br&gt;&lt;code&gt;rpm -qa | grep ooo &amp;gt; rmlist&lt;br&gt;rpm -qa | grep openoffice &amp;gt;&amp;gt; rmlist&lt;br&gt;rpm -e `cat rmlist`&lt;br&gt;&lt;br&gt;想安装：&lt;br&gt;dxiao ~/Downloads/src $ tar zxvf OOo_3.2.1_Linux_x86_install-rpm-wJRE_en-US.tar.gz &lt;br&gt; dxiao ~/Downloads/src $ cd OOO320_m18_native_packed-1_en-US.9502/&lt;br&gt;dxiao ~/Downloads/src/OOO320_m18_native_packed-1_en-US.9502 $ sudo ./setup&lt;br&gt;Done!&lt;br&gt;&lt;br&gt;&lt;br clear="all"&gt;&lt;/code&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-8489539662378137164?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/8489539662378137164/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/10/openoffice-321-on-fedora-13.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/8489539662378137164?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/8489539662378137164?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/10/openoffice-321-on-fedora-13.html" title="OpenOffice 3.2.1 On Fedora 13 Installation log" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CE8FRXc5fCp7ImA9Wx5VFk4.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-2516980511212040772</id><published>2010-10-09T07:00:00.001-07:00</published><updated>2010-10-09T07:00:14.924-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-09T07:00:14.924-07:00</app:edited><title>遇到的Rails3 动向记录</title><content type="html">&lt;h2&gt;&lt;a href="https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5613-adding-j-parameter-for-rails-new-command" target="_blank"&gt;1.adding &amp;quot;-j&amp;quot; parameter for &amp;quot;rails new&amp;quot; command        &lt;/a&gt;&lt;/h2&gt;  这个patch意在把jquery集成，改进集成的复杂度。+1, Rails Core Team还在review中，激烈啊&lt;br&gt; &lt;br&gt;2.rails3下想使用thin，gem install thin,然后加到Gemfile，使用rails s thin启动。&lt;br&gt;&lt;br&gt;3.读到Santiago Pastorino的&lt;a href="http://www.rubyinside.com/how-santiago-pastorino-went-from-ruby-newbie-to-rails-core-in-2-years-3865.html"&gt;rails学习过程&lt;/a&gt;，心得和上一博文中得到的经验一样，从lighthouse入手。当然最重要的还是坚持。&lt;br&gt; &lt;br&gt;4.&lt;a href="http://blog.phusion.nl/2010/10/01/phusion-passenger-3-0-0-rc-1-released/"&gt;Phusion Passenger 3.0.0 RC1发布啦&lt;/a&gt;,老用户可以测试一把。&lt;br&gt;&lt;br&gt;5.学东西例子最重要，把别人的代码拉下来跑一跑，理解起来快多了。当然这种方式适合进阶，新手莫入。&lt;font size="2"&gt;&lt;a href="http://github.com/nu7hatch/rails3-ujs-example"&gt;Rails 3 example of jQuery UJS&lt;/a&gt;&lt;/font&gt;&lt;br&gt; &lt;br&gt;&lt;br clear="all"&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com" target="_blank"&gt;gmail.com&lt;/a&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-2516980511212040772?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/2516980511212040772/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/10/rails3.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/2516980511212040772?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/2516980511212040772?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/10/rails3.html" title="遇到的Rails3 动向记录" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUUGR3k7eCp7ImA9Wx5VFUU.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-7685825828067420710</id><published>2010-10-08T18:20:00.001-07:00</published><updated>2010-10-08T18:20:26.700-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-08T18:20:26.700-07:00</app:edited><title>Rails3 Contribute workaround</title><content type="html">1.是要看这个地址：&lt;br&gt;&lt;a href="http://guides.rubyonrails.org/contribute.html" target="_blank"&gt;http://guides.rubyonrails.org/contribute.html&lt;/a&gt;&lt;br&gt;这里详细介绍了review Rails代码需要的过程。&lt;br&gt;&lt;br&gt;2.订阅maillist: Rails-core，如果你有gmail，可以使用标签+过滤很方便的管理邮件列表。&lt;br&gt; &lt;br&gt;&lt;a href="http://3.xn--github-or3j.com"&gt;3.到github.com&lt;/a&gt; Fork一个rails工程，然后在本地：&lt;br&gt;cd rails&lt;br&gt;bundle install&lt;br&gt;更新一下本地依赖包。&lt;br&gt;&lt;br&gt;4.关注Rails-core邮件列表的每一个帖子。把别人的patch下载后在本地测试。把测试结果可以贴到lighthouse，这就是你社区贡献的开始。虽然没大牛写程序那么直接，但等你熟悉代码后也是可以贡献patch的。&lt;br&gt; &lt;br clear="all"&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt; E-mail: xiaods(AT)&lt;a href="http://gmail.com" target="_blank"&gt;gmail.com&lt;/a&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-7685825828067420710?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/7685825828067420710/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/10/rails3-contribute-workaround.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/7685825828067420710?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/7685825828067420710?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/10/rails3-contribute-workaround.html" title="Rails3 Contribute workaround" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEIDQn48cCp7ImA9Wx5XFk0.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-838883685674114877</id><published>2010-09-15T20:09:00.001-07:00</published><updated>2010-09-15T20:09:33.078-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-15T20:09:33.078-07:00</app:edited><title>JasperETL遇到org.eclipse.swt.SWTError: XPCOM error -2147467259说明</title><content type="html">我下载的JasperETL-All-r35442-V3.2.3，起来后想import demo发现报如下错误：&lt;br&gt;[xds2000@localhost jasperetl]$ org.eclipse.swt.SWTError: XPCOM error -2147467259&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.swt.browser.Mozilla.error(Mozilla.java:1597)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:285)&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.swt.browser.Browser.&amp;lt;init&amp;gt;(Browser.java:118)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.talend.repository.ui.actions.importproject.ImportDemoProjectPage.createDescriptionIn(Unknown Source)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.talend.repository.ui.actions.importproject.ImportDemoProjectPage.createControl(Unknown Source)&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:170)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:669)&lt;br&gt;...略&lt;br&gt;&lt;br&gt;原因大家说的都不清楚。我这里调查了一下，原因是JasperETL使用的Eclipse 是3.4版本的。现在eclipse 3.4 line已经不再维护了，你可想而知多么的烂。&lt;br&gt; 开源软件的烂就是磨练我的意志。。。:-)&lt;br clear="all"&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-838883685674114877?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/838883685674114877/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/09/jasperetlorgeclipseswtswterror-xpcom.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/838883685674114877?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/838883685674114877?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/09/jasperetlorgeclipseswtswterror-xpcom.html" title="JasperETL遇到org.eclipse.swt.SWTError: XPCOM error -2147467259说明" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEYNQ3gyfyp7ImA9Wx5XFU4.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-2820465356123022745</id><published>2010-09-14T23:29:00.001-07:00</published><updated>2010-09-14T23:29:52.697-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-14T23:29:52.697-07:00</app:edited><title>开源就是南泥湾－解决JasperETLv3.2.3不能正常启动问题。</title><content type="html">下载JasperETL-All-r35442-V3.2.3安装包。解压到本地。&lt;br&gt;cd JasperETL-All-r35442-V3.2.3&lt;br&gt;chown +x JasperETL-linux-gtk-x86&lt;br&gt;./JasperETL-linux-gtk-x86&lt;br clear="all"&gt;抱如下错误：&lt;br&gt;ERROR: Exception during Initialization&lt;br&gt;java.lang.NullPointerException&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; at org.talend.designer.codegen.config.JetBean.getUri(Unknown Source)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.talend.designer.codegen.config.JetBean.getTemplateFullUri(Unknown Source)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.talend.designer.codegen.model.CodeGeneratorEmittersPoolFactory.initializeEmittersPool(Unknown Source)&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; at org.talend.designer.codegen.model.CodeGeneratorEmittersPoolFactory.access$7(Unknown Source)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.talend.designer.codegen.model.CodeGeneratorEmittersPoolFactory$JobRunnable.doRun(Unknown Source)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.talend.designer.codegen.model.CodeGeneratorEmittersPoolFactory$JobRunnable.run(Unknown Source)&lt;br&gt; log4j:ERROR Plugin: org.talend.libraries not found in TOSAppender.&lt;br&gt;Exception in thread &amp;quot;Code generation background thread&amp;quot; java.lang.IllegalStateException: Workspace is closed.&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.core.resources.ResourcesPlugin.getWorkspace(ResourcesPlugin.java:339)&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; at org.talend.designer.codegen.model.CodeGeneratorEmittersPoolFactory$JobRunnable.doRun(Unknown Source)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.talend.designer.codegen.model.CodeGeneratorEmittersPoolFactory$JobRunnable.run(Unknown Source)&lt;br&gt;&lt;br&gt; 问题的关键就是xulrunner版本在捣鬼。先确认eclipse里xulrunner的版本：&lt;br&gt;在菜单[help]-&amp;gt;[about eclipse]&lt;br&gt;再点击弹出面板中的installation Details按钮，然后显示的eclipse所有插件列表。&lt;br&gt;找到xulrunner插件为：&amp;nbsp; XULRunner&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.9.1.2_v201003050540R&amp;nbsp;&amp;nbsp;&amp;nbsp; org.jboss.tools.xulrunner.feature.feature.group&lt;br&gt; 然后在系统中确认你的nulrunner版本是否和此插件一致。&lt;br&gt;如果不一致，就会抱错。解决方法是指定xulrunner版本&lt;br&gt;&lt;br&gt;下载包：&lt;br&gt;&lt;a href="http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/"&gt;http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/&lt;/a&gt;&lt;br&gt; 选择你需要的版本。&lt;br&gt;如1.9.1runtimes&lt;br&gt;&lt;a href="http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.9.1.11/runtimes/"&gt;http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.9.1.11/runtimes/&lt;/a&gt;&lt;br&gt;解压放在/usr/local/lib/xulrunner&lt;br&gt; 然后在JasperETL启动配置文件：类如JasperETL-linux-gtk-x86.ini加上一行就可以解决你的问题。&lt;br&gt;-Dorg.eclipse.swt.browser.XULRunnerPath=&lt;span style="color: rgb(255, 0, 0);"&gt;/usr/local/lib/xulrunner/&lt;/span&gt;&lt;br&gt;&lt;br&gt;Done!&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-2820465356123022745?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/2820465356123022745/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/09/jasperetlv323.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/2820465356123022745?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/2820465356123022745?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/09/jasperetlv323.html" title="开源就是南泥湾－解决JasperETLv3.2.3不能正常启动问题。" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEAERHg6eSp7ImA9Wx5SFU4.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-8332547818525871700</id><published>2010-08-11T07:25:00.001-07:00</published><updated>2010-08-11T07:25:05.611-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-11T07:25:05.611-07:00</app:edited><title>读gem sourcecode or doc的工具</title><content type="html">阅读别人的代码，估计是最好的学习方式了。但遥想之前，不管是java获得C++，要求阅读者具备的积累都不是"一天"就能搞定的。&lt;br&gt;Ruby语法简单，有点不优雅，但让我能快速学习上手。&lt;br&gt;tip:&lt;br&gt;&lt;pre&gt;&lt;code&gt;gem install open_gem&lt;br&gt;&lt;br&gt;安装此插件后，&lt;br&gt;&lt;/code&gt;  gem open rails  就可以读原码。&lt;br&gt;gem read rails 就可以看文档。&lt;br&gt;&lt;br&gt;当然操作系统也要提个好的，fedora是我的推荐。&lt;br&gt; &lt;/pre&gt;&lt;br clear="all"&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-8332547818525871700?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/8332547818525871700/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/08/gem-sourcecode-or-doc.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/8332547818525871700?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/8332547818525871700?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/08/gem-sourcecode-or-doc.html" title="读gem sourcecode or doc的工具" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEIDQ307cCp7ImA9Wx5SFE0.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-8848083322857095937</id><published>2010-08-09T19:16:00.001-07:00</published><updated>2010-08-09T19:16:12.308-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-09T19:16:12.308-07:00</app:edited><title>git pull config question</title><content type="html">I think this very useful for git user, just notice this url&lt;br&gt;&lt;p&gt;Under &lt;code&gt;[branch &amp;quot;master&amp;quot;]&lt;/code&gt;, try adding:&lt;/p&gt;  &lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pun"&gt;[&lt;/span&gt;&lt;span class="pln"&gt;branch &lt;/span&gt;&lt;span class="str"&gt;&amp;quot;master&amp;quot;&lt;/span&gt;&lt;span class="pun"&gt;]&lt;/span&gt;&lt;span class="pln"&gt;&lt;br&gt;    remote &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; origin&lt;br&gt;     merge &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; refs&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;heads&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;master&lt;br&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;p&gt;This tells Git 2 things:&lt;/p&gt;  &lt;ol&gt;&lt;li&gt;When you&amp;#39;re on the master branch, the default remote is origin.&lt;/li&gt;&lt;li&gt;When using &lt;code&gt;git pull&lt;/code&gt; on the master branch, with no  remote and branch specified, use the default remote (origin) and merge  in the changes from the master branch.&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;&lt;br&gt;ref:&lt;br&gt;&lt;a href="http://stackoverflow.com/questions/658885/how-do-you-get-git-to-always-pull-from-a-specific-branch"&gt;http://stackoverflow.com/questions/658885/how-do-you-get-git-to-always-pull-from-a-specific-branch&lt;/a&gt;&lt;br clear="all"&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-8848083322857095937?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/8848083322857095937/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/08/git-pull-config-question.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/8848083322857095937?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/8848083322857095937?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/08/git-pull-config-question.html" title="git pull config question" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUQBRnY7fip7ImA9Wx5SE04.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-726865614073545860</id><published>2010-08-09T00:01:00.000-07:00</published><updated>2010-08-09T00:02:37.806-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-09T00:02:37.806-07:00</app:edited><title>WEB基本功，HTML优化</title><content type="html">今天看了一篇文章，HTML优化，很实用。&lt;br&gt;&lt;a href="http://perfectionkills.com/optimizing-html/"&gt;http://perfectionkills.com/optimizing-html/&lt;/a&gt;&lt;br&gt;中文版也不缺乏：&lt;br&gt;&lt;a href="http://younglab.blog.51cto.com/416652/294670"&gt;http://younglab.blog.51cto.com/416652/294670&lt;/a&gt;&lt;br clear="all"&gt; &lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-726865614073545860?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/726865614073545860/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/08/webhtml.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/726865614073545860?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/726865614073545860?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/08/webhtml.html" title="WEB基本功，HTML优化" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ak8MRX05fSp7ImA9Wx5TGEQ.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-1964338182150565425</id><published>2010-08-03T22:14:00.001-07:00</published><updated>2010-08-03T22:14:44.325-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-03T22:14:44.325-07:00</app:edited><title>Rails3使用jquery rjs，可能需要注意的地方。mark</title><content type="html">这里假设你使用rails3, jquery rails.js&lt;br&gt;&lt;br&gt;你想实现ajax loading效果，却发现rails的tag里只使用:remote =&amp;gt; true&lt;br&gt;并没有rails2里使用的loading函数。&lt;br&gt;我看了rails.js，看到&lt;br&gt;&lt;p&gt;The &lt;span class="caps"&gt;UJS&lt;/span&gt; drivers trigger six events on every &lt;span class="caps"&gt;AJAX&lt;/span&gt; call:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;code&gt;ajax:before&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;ajax:loading&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;ajax:success&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;ajax:failure&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;ajax:complete&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;ajax:after&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;但是怎么使用是个问题。&lt;br&gt; 看了这个ticket，就知道并不是所有人了解：&lt;br&gt;&lt;a href="https://rails.lighthouseapp.com/projects/8994/tickets/4486-new-ujs-helpers-do-not-have-a-way-to-render-a-loading-text-icon"&gt;https://rails.lighthouseapp.com/projects/8994/tickets/4486-new-ujs-helpers-do-not-have-a-way-to-render-a-loading-text-icon&lt;/a&gt;&lt;br&gt; his can easily be accomplished each driver has a custom callback that fires before the request is sent, here is an example using the jQuery driver. &lt;pre&gt;&lt;code class="javascript"&gt;  $&lt;span class="brackets"&gt;(&lt;/span&gt;&lt;span class="string"&gt;&amp;#39;#new_resource&amp;#39;&lt;/span&gt;&lt;span class="brackets"&gt;)&lt;/span&gt;.live&lt;span class="brackets"&gt;(&lt;/span&gt;&lt;span class="string"&gt;&amp;#39;ajax:loading&amp;#39;&lt;/span&gt;, &lt;span class="keywords"&gt;function&lt;/span&gt;&lt;span class="brackets"&gt;(&lt;/span&gt;&lt;span class="brackets"&gt;)&lt;/span&gt; {&lt;br&gt;     &lt;span class="comment"&gt;// code to display loading div&lt;br&gt;&lt;/span&gt;  }&lt;span class="brackets"&gt;)&lt;/span&gt;;&lt;/code&gt;&lt;br&gt;&lt;/pre&gt;&lt;br&gt;refs:&lt;br&gt;&lt;a href="https://rails.lighthouseapp.com/projects/8994/tickets/4486-new-ujs-helpers-do-not-have-a-way-to-render-a-loading-text-icon"&gt;https://rails.lighthouseapp.com/projects/8994/tickets/4486-new-ujs-helpers-do-not-have-a-way-to-render-a-loading-text-icon&lt;/a&gt;&lt;br&gt; &lt;a href="http://www.slideshare.net/adamlogic/jquery-and-rails-sitting-in-a-tree"&gt;http://www.slideshare.net/adamlogic/jquery-and-rails-sitting-in-a-tree&lt;/a&gt;&lt;br&gt;&lt;a href="http://code.alexreisner.com/articles/link-to-remote-with-ujs.html"&gt;http://code.alexreisner.com/articles/link-to-remote-with-ujs.html&lt;/a&gt;&lt;br clear="all"&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-1964338182150565425?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/1964338182150565425/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/08/rails3jquery-rjsmark.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/1964338182150565425?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/1964338182150565425?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/08/rails3jquery-rjsmark.html" title="Rails3使用jquery rjs，可能需要注意的地方。mark" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0QNSHs_fyp7ImA9Wx5TEEs.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-7854973050793488840</id><published>2010-07-24T00:24:00.001-07:00</published><updated>2010-07-25T07:49:59.547-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-25T07:49:59.547-07:00</app:edited><title>Rails3beta4使用Ajax的一些参考</title><content type="html">&lt;div&gt;update: prototype更新有点误解，现在已经更正。&lt;br /&gt;&lt;br /&gt;Rails3Beta4的Ajax参考文档目前不是很多,因为版本更新很快,参考的内容很多都已经过期.完整可参考的文档少之又少.经过近期项目的经验,我想总结一下:&lt;/div&gt; &lt;div&gt;1, Rails3Beta4已经快接进RC,想使用ajax,直接在link_to,form_tag,form_for加上remote=&amp;gt; true,就能产生ajax request, Controller里加不加respond_to都会去找rjs,或js.erb&lt;span style="color: rgb(204, 204, 204);"&gt;.两个后缀没有什么差别,关键在于使用js.erb感觉和.html.erb统一了后缀名而以.&lt;span style="color: rgb(255, 0, 0);"&gt;(今天跑个demo，才知道使用js.rjs就可以调用prototype了，方法可以在&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods&lt;span style="color: rgb(255, 0, 0);"&gt;里找到。你可以使用railsapi.com生成的文档查看到&lt;/span&gt; &lt;/span&gt;                      &lt;span style="color: rgb(204, 204, 204);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;2.我在使用form_tag里加上select_tag,想使用select_tag的onchange加上submit事件来请求form_tag中的ajax,不能成功.感觉是我的思路的问题,直接使用select_tag没有remote属性,不过直接使用ujs的onchange事件里加上ajax就能控制.通过这样的体会,你会发现使用UJS确实比Rails之前的RJS更简单,更方便,实现的效果和原来的是一样的.一样可以调用contorller里的方法及js.erb.&lt;/div&gt;  &lt;div&gt; &lt;/div&gt; &lt;div&gt;JQuery的UJS调用参考文档多,所以大家才想办法在Rails里去掉prototype使用jquery.不然如果直接prototype,&lt;span style="color: rgb(204, 204, 204);"&gt;怎么使用还需要去看prototype,有点让新人不知手措.&lt;span style="color: rgb(255, 0, 0);"&gt;(教程是没更新的，但查文档是有helper函数，生成项目试用就可以上手。)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;总结,Rails3里,ajax的使用更开放,也就是说,其实你在rails3中使用哪个框架都可以,只需要修改一个rails.js就可以了.&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;参考:&lt;/div&gt; &lt;div&gt;&lt;a href="http://keithschacht.org/getting-ajax-to-work-in-rails-3-with-jquery/"&gt;http://keithschacht.org/getting-ajax-to-work-in-rails-3-with-jquery/&lt;/a&gt;&lt;/div&gt; &lt;div&gt;&lt;br /&gt;--&lt;br /&gt;tommy xiao&lt;br /&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com/"&gt;gmail.com&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-7854973050793488840?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/7854973050793488840/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/07/rails3beta4ajax.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/7854973050793488840?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/7854973050793488840?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/07/rails3beta4ajax.html" title="Rails3beta4使用Ajax的一些参考" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUAAQns-cCp7ImA9WxFaEkQ.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-3631049845053655155</id><published>2010-07-16T08:22:00.001-07:00</published><updated>2010-07-16T08:22:23.558-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-16T08:22:23.558-07:00</app:edited><title>RVM，标准配置Ruby环境的首选</title><content type="html">rvm，快速，高效，简洁，所以你需要的优化，它全部具备。只要你有一台Linux/Mac系统，就可以在5分钟内完成安装（限制仅在你的网速）。&lt;br&gt;第一步：&lt;br&gt;&lt;pre&gt;&lt;code class="bash"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;bash &amp;lt; &amp;lt;&lt;span class="o"&gt;(&lt;/span&gt; curl &lt;a href="http://rvm.beginrescueend.com/releases/rvm-install-head"&gt;http://rvm.beginrescueend.com/releases/rvm-install-head&lt;/a&gt; &lt;span class="o"&gt;)&lt;br&gt; &lt;br&gt;第二步：&lt;br&gt;在你的.bash_profile，把这段放在最后一行，保证PATH里有它就可以.贴上后，新开一个terminal，然后source ~/.bash_profile就可以了。&lt;br&gt;&lt;br&gt;&lt;/span&gt;&lt;/code&gt;&lt;code class="bash"&gt; &lt;span class="o"&gt;[[&lt;/span&gt; -s &lt;span class="s2"&gt;&amp;quot;$HOME/.rvm/scripts/rvm&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;source&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;$HOME/.rvm/scripts/rvm&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;br&gt; &lt;/pre&gt;第三步：&lt;br&gt;安装你可爱的Ruby环境吧&lt;br&gt;&lt;pre&gt;&lt;code class="bash"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;rvm install 1.8.7&lt;br&gt;&lt;/code&gt;&lt;/pre&gt;可选，第四步：&lt;br&gt;想使用就这样操作：&lt;br&gt;&lt;pre&gt;&lt;code class="bash"&gt; &lt;span class="nv"&gt;$ &lt;/span&gt;rvm 1.8.7&lt;br&gt;&lt;br&gt;想知道更多，运行这句：&lt;br&gt; &lt;br&gt;&lt;/code&gt;&lt;code class="bash"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;rvm list  &lt;br&gt;或者：&lt;br&gt;$ rvm help&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;第五步：&lt;br&gt;想把整个ruby版本作为自己默认的环境，运行这句：&lt;br&gt;&lt;code class="bash"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;rvm 1.8.7 --default&lt;br&gt;&lt;br&gt;收工。去玩Ruby&amp;amp; rails吧&lt;br&gt; &lt;/code&gt;&lt;br&gt;参考这里：&lt;br&gt;&lt;a href="http://everydayrails.com/2010/06/28/rvm-gemsets-rails3.html"&gt;http://everydayrails.com/2010/06/28/rvm-gemsets-rails3.html&lt;/a&gt;&lt;br&gt;&lt;/pre&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-3631049845053655155?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/3631049845053655155/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/07/rvmruby.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/3631049845053655155?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/3631049845053655155?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/07/rvmruby.html" title="RVM，标准配置Ruby环境的首选" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUQHQXg5fip7ImA9WxFbGEg.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-6291513456275817395</id><published>2010-07-11T06:02:00.001-07:00</published><updated>2010-07-11T06:02:10.626-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-11T06:02:10.626-07:00</app:edited><title>ruby1.9.1对String的处理有细微差别，注意</title><content type="html">今天在ruby1.9.2-dev环境下起&lt;a href="http://github.com/intridea/oria"&gt;Oria&lt;/a&gt;，报了个错：&lt;br&gt;/Users/xiaodeshi/.rvm/gems/ruby-1.9.2-head@rails3beta/gems/oria-0.1.1/lib/oria.rb:57:in `+&amp;#39;: String can&amp;#39;t be coerced into Fixnum (TypeError)&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from /Users/xiaodeshi/.rvm/gems/ruby-1.9.2-head@rails3beta/gems/oria-0.1.1/lib/oria.rb:57:in `block in port&amp;#39;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from /Users/xiaodeshi/.rvm/gems/ruby-1.9.2-head@rails3beta/gems/oria-0.1.1/lib/oria.rb:57:in `each&amp;#39;&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from /Users/xiaodeshi/.rvm/gems/ruby-1.9.2-head@rails3beta/gems/oria-0.1.1/lib/oria.rb:57:in `inject&amp;#39;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from /Users/xiaodeshi/.rvm/gems/ruby-1.9.2-head@rails3beta/gems/oria-0.1.1/lib/oria.rb:57:in `port&amp;#39;&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from /Users/xiaodeshi/.rvm/gems/ruby-1.9.2-head@rails3beta/gems/oria-0.1.1/bin/oria:43:in `parse_options&amp;#39;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from /Users/xiaodeshi/.rvm/gems/ruby-1.9.2-head@rails3beta/gems/oria-0.1.1/bin/oria:49:in `start&amp;#39;&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from /Users/xiaodeshi/.rvm/gems/ruby-1.9.2-head@rails3beta/gems/oria-0.1.1/bin/oria:11:in `go&amp;#39;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from /Users/xiaodeshi/.rvm/gems/ruby-1.9.2-head@rails3beta/gems/oria-0.1.1/bin/oria:76:in `&amp;lt;top (required)&amp;gt;&amp;#39;&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from /Users/xiaodeshi/.rvm/gems/ruby-1.9.2-head@rails3beta/bin/oria:19:in `load&amp;#39;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from /Users/xiaodeshi/.rvm/gems/ruby-1.9.2-head@rails3beta/bin/oria:19:in `&amp;lt;main&amp;gt;&amp;#39;&lt;br clear="all"&gt;&lt;br&gt;心中奇怪，这昨天才用了一下没这问题啊。找开对应文件定位到：&lt;br&gt; &amp;nbsp; def self.port&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @@port ||= &amp;quot;Oria is easily the coolest in-memory, super-simple KVS. Cool people use it.&amp;quot;.split(&amp;quot;&amp;quot;).inject(0) {|total, char| total += (char[0].class == String ? char[0].ord : char[0])}&lt;br&gt; &amp;nbsp; end&lt;br&gt;&lt;br&gt;直接去irb下跑，原来作者是使用charcode加出来的一个端口，但1.9.2修正了1.8.7字符串的显示不一致问题。&lt;br&gt;原来在1.8.7下,&amp;#39;a&amp;#39;[0]出来的是ascii code，但在1.9.2下&amp;#39;a&amp;#39;[0]还是返回&amp;#39;a&amp;#39;，这代码就跑不动了。&lt;br&gt;ok，了解原因后，改一行就ok了。&lt;br&gt;&lt;pre&gt;&lt;code&gt;@@port ||= &amp;quot;Oria is easily the coolest in-memory, super-simple KVS. Cool people use it.&amp;quot;.split(&amp;quot;&amp;quot;).inject(0) {|total, char|  total += (char[0].class == String ? char[0].ord : char[0])}&lt;br&gt; &lt;br&gt;兼容1.8.7.&lt;br&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-6291513456275817395?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/6291513456275817395/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/07/ruby191string.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/6291513456275817395?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/6291513456275817395?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/07/ruby191string.html" title="ruby1.9.1对String的处理有细微差别，注意" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkUEQHc6fip7ImA9WxFbGE4.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-5625666573623076032</id><published>2010-07-11T00:43:00.001-07:00</published><updated>2010-07-11T00:43:21.916-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-11T00:43:21.916-07:00</app:edited><title>mac下删除ports，使用homebrew</title><content type="html">homebrew是为rubist准备的安装管理器，所以port删除是当务之急。&lt;br&gt;search并当了一回小白鼠，成功! &lt;a href="http://guide.macports.org/chunked/installing.macports.uninstalling.html"&gt;http://guide.macports.org/chunked/installing.macports.uninstalling.html&lt;/a&gt;&lt;br&gt; 第一步：&lt;br&gt;&lt;pre class="programlisting"&gt;&lt;code class="prompt"&gt;%&lt;/code&gt; &lt;strong class="userinput"&gt;&lt;code&gt;sudo port -f uninstall installed&lt;/code&gt;&lt;/strong&gt;&lt;/pre&gt;第二步：&lt;br&gt;&lt;pre class="programlisting"&gt;&lt;code class="prompt"&gt;%&lt;/code&gt; &lt;strong class="userinput"&gt;&lt;code&gt;sudo rm -rf \&lt;br&gt;     /opt/local \&lt;br&gt;    /Applications/DarwinPorts \&lt;br&gt;    /Applications/MacPorts \&lt;br&gt;    /Library/LaunchDaemons/org.macports.* \&lt;br&gt;    /Library/Receipts/DarwinPorts*.pkg \&lt;br&gt;    /Library/Receipts/MacPorts*.pkg \&lt;br&gt;    /Library/StartupItems/DarwinPortsStartup \&lt;br&gt;     /Library/Tcl/darwinports1.0 \&lt;br&gt;    /Library/Tcl/macports1.0 \&lt;br&gt;    ~/.macports&lt;/code&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;br clear="all"&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-5625666573623076032?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/5625666573623076032/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/07/macportshomebrew.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/5625666573623076032?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/5625666573623076032?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/07/macportshomebrew.html" title="mac下删除ports，使用homebrew" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DE4BRHk-cSp7ImA9WxFUFk4.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-863667955749435281</id><published>2010-06-27T04:06:00.001-07:00</published><updated>2010-06-27T04:09:15.759-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-27T04:09:15.759-07:00</app:edited><title>28字节ruby代码带来的乐趣！</title><content type="html">是的。你没有看错，这是我今天看到的代码：&lt;br /&gt;&lt;pre class="ruby"&gt;&lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;p.method_missing*_&lt;/span&gt;&lt;span class="punct"&gt;;&lt;/span&gt;&lt;span class="ident"&gt;p&lt;/span&gt;&lt;span class="punct"&gt;;&lt;/span&gt;&lt;span class="keyword"&gt;end&lt;br /&gt;&lt;br /&gt;第一次看，还是没有看的全明白。然后咱们来个格式化后的版本：&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;NilClass&lt;/span&gt;&lt;br /&gt; &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;method_missing&lt;/span&gt; &lt;span class="punct"&gt;*&lt;/span&gt;&lt;span class="ident"&gt;_&lt;/span&gt;&lt;br /&gt;    &lt;span class="constant"&gt;nil&lt;/span&gt;&lt;br /&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;br /&gt;&lt;br /&gt;别钻牛脚尖，非要一个字符字符对，看中间精华部分。此代码的作用是针对实例对象类如@some_hash，是个hash,&lt;br /&gt;你想得到key=&amp;gt;value值时，出现nil时，提供的解决办法。&lt;br /&gt;&lt;br /&gt;你可能希望这样的代码：&lt;br /&gt;&lt;/span&gt;&lt;code&gt;if @some_hash[:some_key] # good looking version&lt;br /&gt; # do something with @some_hash[:some_key]&lt;br /&gt;end&lt;/code&gt;&lt;br /&gt;&lt;span class="keyword"&gt;&lt;br /&gt;但如果@some_hash是nil，上面的代码就会出exception了。&lt;br /&gt;你不得不这么写：&lt;br /&gt;&lt;/span&gt;&lt;code&gt;if @some_hash &amp;amp;&amp;amp; @some_hash[:some_key] # correct version&lt;br /&gt;  # do something with @some_hash[:some_key]&lt;br /&gt;end&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;再来一个完整的代码实例：&lt;br /&gt;&lt;br /&gt;&lt;pre class="ruby"&gt;&lt;span class="comment"&gt;# Egocentric nil&lt;/span&gt;&lt;br /&gt;&lt;span class="comment"&gt;# code by Yohan, slightly edited and comments by me&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="comment"&gt;# start ego mode block, usage:&lt;/span&gt;&lt;br /&gt;&lt;span class="comment"&gt;# catch_nil do&lt;/span&gt;&lt;br /&gt;&lt;span class="comment"&gt;#   if @some_hash[:some_key].to_formatted_array[3]&lt;/span&gt;&lt;br /&gt;&lt;span class="comment"&gt;#     # do something&lt;/span&gt;&lt;br /&gt;&lt;span class="comment"&gt;#   end&lt;/span&gt;&lt;br /&gt;&lt;span class="comment"&gt;# end&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;catch_nil&lt;/span&gt;&lt;span class="punct"&gt;(&amp;amp;&lt;/span&gt;&lt;span class="ident"&gt;block&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;&lt;br /&gt;  &lt;span class="comment"&gt;# grip methods&lt;/span&gt;&lt;br /&gt; &lt;span class="ident"&gt;ori_method_missing&lt;/span&gt;   &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;NilClass&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;instance_method&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:method_missing&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;&lt;br /&gt;  &lt;span class="ident"&gt;catch_method_missing&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;NilClass&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;instance_method&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:catch_method_missing&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;&lt;br /&gt;  &lt;span class="comment"&gt;# activate ego mode&lt;/span&gt;&lt;br /&gt; &lt;span class="constant"&gt;NilClass&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;send&lt;/span&gt; &lt;span class="symbol"&gt;:define_method&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:method_missing&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="ident"&gt;catch_method_missing&lt;/span&gt;&lt;br /&gt;  &lt;span class="comment"&gt;# run code&lt;/span&gt;&lt;br /&gt; &lt;span class="keyword"&gt;yield&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;ensure&lt;/span&gt;&lt;br /&gt; &lt;span class="comment"&gt;# no matter what happens: restore default nil behaviour&lt;/span&gt;&lt;br /&gt; &lt;span class="constant"&gt;NilClass&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;send&lt;/span&gt; &lt;span class="symbol"&gt;:define_method&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:method_missing&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="ident"&gt;ori_method_missing&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="comment"&gt;#alias :egonil :catch_nil # ;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="comment"&gt;# this is the ego nil&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;NilClass&lt;/span&gt;&lt;br /&gt;  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;catch_method_missing&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;m&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="punct"&gt;*&lt;/span&gt;&lt;span class="ident"&gt;args&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="punct"&gt;&amp;amp;&lt;/span&gt;&lt;span class="ident"&gt;block&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span class="constant"&gt;nil&lt;/span&gt;&lt;br /&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;不管怎么说，真的很优雅。ruby is awesome!&lt;br /&gt;&lt;br /&gt;详细看这里：&lt;br /&gt;&lt;h1&gt;&lt;a href="http://rbjl.net/26-the-28-bytes-of-ruby-joy"&gt;The 28 Bytes  of Ruby Joy!&lt;/a&gt;&lt;/h1&gt;--&lt;br /&gt;tommy xiao&lt;br /&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com/"&gt;gmail.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-863667955749435281?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/863667955749435281/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/06/28ruby.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/863667955749435281?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/863667955749435281?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/06/28ruby.html" title="28字节ruby代码带来的乐趣！" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CU4ERH47fyp7ImA9WxFVFUU.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-1962475311560784089</id><published>2010-06-14T23:38:00.001-07:00</published><updated>2010-06-14T23:38:25.007-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-14T23:38:25.007-07:00</app:edited><title>use jruby+sinatra+jfreechart build StackedBar graph! - Series 1</title><content type="html">&lt;p class="mobile-photo"&gt;&lt;a href="http://1.bp.blogspot.com/_EvAlXkwLm0g/TBcf4dqGq7I/AAAAAAAAASA/zYkA24y-6wo/s1600/Toopaste!-705008.png"&gt;&lt;img src="http://1.bp.blogspot.com/_EvAlXkwLm0g/TBcf4dqGq7I/AAAAAAAAASA/zYkA24y-6wo/s320/Toopaste!-705008.png"  border="0" alt="" id="BLOGGER_PHOTO_ID_5482886126241229746" /&gt;&lt;/a&gt;&lt;/p&gt;FYI,jruby is now 1.5.1, i want to build gpaph service.so i want to familiar with jruby and jfreechart api. this is blow doc is my practice notes.any feedback welcome.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;first step:&lt;/div&gt;&lt;div&gt;use jruby+jetty+sinatra stack:&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://github.com/vvilhonen/Jetty-jruby-sinatra-skeleton"&gt;http://github.com/vvilhonen/Jetty-jruby-sinatra-skeleton&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;only git clone done.you will have done this stack in local&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;second step:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;create your rb file:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;charting.rb&lt;/div&gt;&lt;div&gt;==========&lt;/div&gt;&lt;div&gt;&lt;div&gt;require &amp;#39;rubygems&amp;#39;&lt;/div&gt;&lt;div&gt;require &amp;#39;sinatra&amp;#39;&lt;/div&gt;&lt;div&gt; require &amp;#39;java&amp;#39;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;import &amp;#39;org.jfree.data.category.DefaultCategoryDataset&amp;#39;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class DefaultCategoryDataset&lt;/div&gt;&lt;div&gt;  class Inner&lt;/div&gt;&lt;div&gt;    def initialize(dataset, row)&lt;/div&gt; &lt;div&gt;      @dataset, @row = dataset, row.to_s&lt;/div&gt;&lt;div&gt;    end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;    # a value of nil can call &amp;#39;removeValue&amp;#39;&lt;/div&gt;&lt;div&gt;    def []=(column, value)&lt;/div&gt;&lt;div&gt;      @dataset.addValue value.to_java(:int), @row, column.to_s&lt;/div&gt; &lt;div&gt;    end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;    def populate(hash)&lt;/div&gt;&lt;div&gt;      hash.each_pair do |column, value|&lt;/div&gt;&lt;div&gt;        @dataset.addValue value.to_java(:int), @row, column.to_s&lt;/div&gt;&lt;div&gt;      end&lt;/div&gt;&lt;div&gt;    end&lt;/div&gt; &lt;div&gt;  end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;  def [](row)&lt;/div&gt;&lt;div&gt;    Inner.new self, row&lt;/div&gt;&lt;div&gt;  end&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;module Graph&lt;/div&gt;&lt;div&gt;  class StackedBar&lt;/div&gt;&lt;div&gt;    include_class &amp;#39;java.io.File&amp;#39;&lt;/div&gt; &lt;div&gt;    include_class &amp;#39;org.jfree.chart.ChartUtilities&amp;#39;&lt;/div&gt;&lt;div&gt;    include_class &amp;#39;org.jfree.chart.JFreeChart&amp;#39;&lt;/div&gt;&lt;div&gt;    include_class &amp;#39;org.jfree.data.category.DefaultCategoryDataset&amp;#39;&lt;/div&gt;&lt;div&gt;     include_class &amp;#39;org.jfree.chart.ChartFactory&amp;#39;&lt;/div&gt;&lt;div&gt;    include_class &amp;#39;org.jfree.chart.plot.PlotOrientation&amp;#39;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;    def initialize(width=600, height=400, data=[])&lt;/div&gt;&lt;div&gt;      @width = width&lt;/div&gt; &lt;div&gt;      @height = height&lt;/div&gt;&lt;div&gt;      dataset = create_sample_data() if data.empty?&lt;/div&gt;&lt;div&gt;      @chart = create_chart(dataset)&lt;/div&gt;&lt;div&gt;    end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;    def render_to_file(filename, format=&amp;quot;png&amp;quot;)&lt;/div&gt; &lt;div&gt;      puts &amp;quot;Rendering graph to #{filename}&amp;quot;&lt;/div&gt;&lt;div&gt;      javafile = java.io.File.new(filename)&lt;/div&gt;&lt;div&gt;      ChartUtilities.saveChartAsPNG(javafile, @chart, @width, @height)&lt;/div&gt;&lt;div&gt;    end&lt;/div&gt;&lt;div&gt; &lt;br&gt;&lt;/div&gt;&lt;div&gt;    private&lt;/div&gt;&lt;div&gt;    def create_sample_data&lt;/div&gt;&lt;div&gt;      # This also allows symbols as well as strings&lt;/div&gt;&lt;div&gt;      dataset = DefaultCategoryDataset.new&lt;/div&gt;&lt;div&gt;      dataset[:Submitted].populate(:A =&amp;gt; 1, :B =&amp;gt; 2, :C =&amp;gt; 3)&lt;/div&gt; &lt;div&gt;      dataset[:Assigned].populate(:A =&amp;gt; 1, :C =&amp;gt; 1)&lt;/div&gt;&lt;div&gt;      dataset[&amp;quot;In-work&amp;quot;].populate(:A =&amp;gt; 3, :C =&amp;gt; 3)&lt;/div&gt;&lt;div&gt;      dataset[:InVerfication][:A] = 1&lt;/div&gt;&lt;div&gt;      dataset[:Delivered][:A] = 2&lt;/div&gt; &lt;div&gt;      dataset[:Rejected][:B] = 1&lt;/div&gt;&lt;div&gt;      dataset[:Closed][:B] = 1&lt;/div&gt;&lt;div&gt;      dataset[&amp;quot;On-hold&amp;quot;][:C] = 2&lt;/div&gt;&lt;div&gt;      dataset&lt;/div&gt;&lt;div&gt;    end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;    def create_chart(dataset)&lt;/div&gt; &lt;div&gt;      chart = ChartFactory.createStackedBarChart(&amp;quot;XYZ&amp;#39;s Development Projects&amp;quot;,&lt;/div&gt;&lt;div&gt;                                                 &amp;quot;Project Name&amp;quot;, &lt;/div&gt;&lt;div&gt;                                                 &amp;quot;Hours&amp;quot;, &lt;/div&gt; &lt;div&gt;                                                 dataset, &lt;/div&gt;&lt;div&gt;                                                 PlotOrientation::VERTICAL, &lt;/div&gt;&lt;div&gt;                                                 true, &lt;/div&gt; &lt;div&gt;                                                 true, &lt;/div&gt;&lt;div&gt;                                                 false)&lt;/div&gt;&lt;div&gt;      return chart    &lt;/div&gt;&lt;div&gt;    end&lt;/div&gt;&lt;div&gt;  end # class StackedBar  &lt;/div&gt;&lt;div&gt; end # class Graph&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;get &amp;#39;/&amp;#39; do&lt;/div&gt;&lt;div&gt;  sb = Graph::StackedBar.new&lt;/div&gt;&lt;div&gt;  @pp = &amp;quot;stacked_bar.png&amp;quot;&lt;/div&gt;&lt;div&gt;  img_pub = &amp;quot;public/images/&amp;quot;&lt;/div&gt;&lt;div&gt;  sb.render_to_file(img_pub+@pp)&lt;/div&gt; &lt;div&gt;  erb :graph&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;fix some expired function and modified from &lt;a href="http://kfahlgren.com/blog/2007/07/12/stacked-bar-charts-in-jruby-using-jfreechart/"&gt;http://kfahlgren.com/blog/2007/07/12/stacked-bar-charts-in-jruby-using-jfreechart/&lt;/a&gt;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-1962475311560784089?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/1962475311560784089/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/06/use-jrubysinatrajfreechart-build.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/1962475311560784089?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/1962475311560784089?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/06/use-jrubysinatrajfreechart-build.html" title="use jruby+sinatra+jfreechart build StackedBar graph! - Series 1" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_EvAlXkwLm0g/TBcf4dqGq7I/AAAAAAAAASA/zYkA24y-6wo/s72-c/Toopaste!-705008.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkYASHc6eSp7ImA9WxFXEkk.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-5109556932551297677</id><published>2010-05-18T22:49:00.001-07:00</published><updated>2010-05-18T22:49:09.911-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-18T22:49:09.911-07:00</app:edited><title>CGI和FASTCGI协议认知心得</title><content type="html">前段时间去面试，被问到关于什么是CGI协议，懵了不会。因为使用ruby总需要与CGI打交道，我还是今天把功课补上，毕竟是手上的事。读了一下CGI的RFC3875，如果用一句来说，它是一个纯文本的协议。&lt;br&gt;通过Meta关键字=VALUE形式组成一个数组，与上端的Web&lt;br&gt;Server和下连的Script互相交流。从我们web程序员的角度来说，是透明的。但它针对每个Request都会起一个进程，所以之后引进了FastCGI，改良的地方就是针对客户端的Request，FCGI只开一个主进程，内部使用分组复用的技术(有点像CDMA时分复用的技术，如果你有通信方面的背景的话，对这个肯定能有所了解。)加快处理并返回Response。&lt;br&gt;  另外，RFC里有一个表达式：巴科斯范式，也顺便学了一下，你也不妨学一招吧.&lt;p&gt;参考：&lt;br&gt;&lt;a href="http://www.ietf.org/rfc/rfc3875.txt"&gt;http://www.ietf.org/rfc/rfc3875.txt&lt;/a&gt;&lt;br&gt;&lt;a href="http://en.wikipedia.org/wiki/FastCGI"&gt;http://en.wikipedia.org/wiki/FastCGI&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-5109556932551297677?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/5109556932551297677/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/05/cgifastcgi.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/5109556932551297677?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/5109556932551297677?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/05/cgifastcgi.html" title="CGI和FASTCGI协议认知心得" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ak8CSHg8eCp7ImA9WxFQFE0.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-3618624753691663455</id><published>2010-05-09T05:41:00.001-07:00</published><updated>2010-05-09T05:41:09.670-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-09T05:41:09.670-07:00</app:edited><title>使用Vagrant快速部署测试环境，给Rails3打Patch简单到小儿科！</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Arial; font-size: medium; "&gt;&lt;div&gt;今天看一文章，rails社区竟然有人作了一个&lt;a href="http://www.vagrantup.com/"&gt;Vagrant gem&lt;/a&gt;调用&lt;a href="http://www.virtualbox.org/"&gt;Oracle's VirtualBox&lt;/a&gt;快速虚拟出ubuntu下的rails开发环境。&lt;/div&gt; &lt;div&gt;我看了一下&lt;a href="http://gist.github.com/389621"&gt;gist安装指令&lt;/a&gt;，已经进化到一键完成的地步，犹如当年GhostXP操作一般，这哪有什么技术含量啊，呵呵。&lt;/div&gt;&lt;div&gt;这样的环境对于社区开发来说，绝对是一记强行针，学会这招之后，你也可以参&lt;a href="https://rails.lighthouseapp.com/projects/8994/sending-patches"&gt;考Rails开发者指南&lt;/a&gt;，你就会了解到，想给Rails写Patch之前，第一步都是去&lt;a href="https://rails.lighthouseapp.com/dashboard"&gt;LightHouse&lt;/a&gt;看看感兴趣的问题，如果有人贴了patch，就需要快速有个环境来测试了，所以之前的工具就是为这种场景下的需求准备的。但这个gem的产出，带来了一种全新的，简单的开发流程模式，相信一定会给其它开源社区的开发者带出更多灵感！赞！&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;参考链接徘徊于墙外：&lt;/div&gt;&lt;div&gt;&lt;a href="http://blog.cookiestack.com/post/571168451/testing-rails-for-the-masses"&gt;http://blog.cookiestack.com/post/571168451/testing-rails-for-the-masses&lt;/a&gt;&lt;/div&gt;&lt;/span&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-3618624753691663455?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/3618624753691663455/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/05/vagrantrails3patch.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/3618624753691663455?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/3618624753691663455?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/05/vagrantrails3patch.html" title="使用Vagrant快速部署测试环境，给Rails3打Patch简单到小儿科！" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0QMRXo9eyp7ImA9WxFREU8.&quot;"><id>tag:blogger.com,1999:blog-3329626545263581292.post-2860818383537797502</id><published>2010-04-24T08:03:00.001-07:00</published><updated>2010-04-24T08:03:04.463-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-24T08:03:04.463-07:00</app:edited><title>Fat Free CRM on Heroku,可扩展的CRM套件</title><content type="html">如果在Rails关注一年以上的朋友，都可能听说过这个套件Fat Free Crm，这个套件基于Rails 2.3.5，功能写的不多不少。非常方便定制。&lt;br&gt;我也是近期需要一个可扩展的框架才回过头来找到它的。对于前期实践，我想着如果放到heroku上作实验更方便，就试着搜索了一下，&lt;br&gt;还真有解决方案：&lt;br&gt;&lt;pre style="background-color: rgb(204, 255, 255);"&gt;&lt;code&gt;&lt;span class="global"&gt;$ &lt;/span&gt;&lt;span class="ident"&gt;git&lt;/span&gt; &lt;span class="ident"&gt;clone&lt;/span&gt; &lt;span class="ident"&gt;git&lt;/span&gt;&lt;span class="punct"&gt;:/&lt;/span&gt;&lt;span class="regex"&gt;&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;github&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;com&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;ryanwood&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;fat_free_crm&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;git&lt;/span&gt;&lt;br&gt; &lt;span class="global"&gt;$ &lt;/span&gt;&lt;span class="ident"&gt;heroku&lt;/span&gt; &lt;span class="ident"&gt;create&lt;/span&gt;&lt;br&gt;&lt;span class="global"&gt;$ &lt;/span&gt;&lt;span class="ident"&gt;git&lt;/span&gt; &lt;span class="ident"&gt;push&lt;/span&gt; &lt;span class="ident"&gt;heroku&lt;/span&gt; &lt;span class="ident"&gt;master&lt;/span&gt;&lt;br&gt; &lt;span class="global"&gt;$ &lt;/span&gt;&lt;span class="ident"&gt;heroku&lt;/span&gt; &lt;span class="ident"&gt;rake&lt;/span&gt; &lt;span class="ident"&gt;crm&lt;/span&gt;&lt;span class="symbol"&gt;:setup&lt;/span&gt; &lt;span class="constant"&gt;USERNAME&lt;/span&gt;&lt;span class="punct"&gt;=&lt;/span&gt;&lt;span class="ident"&gt;myusername&lt;/span&gt; &lt;span class="constant"&gt;PASSWORD&lt;/span&gt;&lt;span class="punct"&gt;=&lt;/span&gt;&lt;span class="ident"&gt;mypass&lt;/span&gt; &lt;span class="constant"&gt;EMAIL&lt;/span&gt;&lt;span class="punct"&gt;=&lt;/span&gt;&lt;span class="ident"&gt;my&lt;/span&gt;&lt;span class="attribute"&gt;@email&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;com&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; Cool!&lt;br&gt;&lt;br&gt;ref: &lt;a href="http://ryanwood.com/past/2010/1/21/fat-free-crm-on-heroku/"&gt;http://ryanwood.com/past/2010/1/21/fat-free-crm-on-heroku/&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- &lt;br&gt;tommy xiao&lt;br&gt;E-mail: xiaods(AT)&lt;a href="http://gmail.com"&gt;gmail.com&lt;/a&gt;&lt;br&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3329626545263581292-2860818383537797502?l=coderchina.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://coderchina.blogspot.com/feeds/2860818383537797502/comments/default" title="帖子评论" /><link rel="replies" type="text/html" href="http://coderchina.blogspot.com/2010/04/fat-free-crm-on-herokucrm.html#comment-form" title="0 条评论" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/2860818383537797502?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3329626545263581292/posts/default/2860818383537797502?v=2" /><link rel="alternate" type="text/html" href="http://coderchina.blogspot.com/2010/04/fat-free-crm-on-herokucrm.html" title="Fat Free CRM on Heroku,可扩展的CRM套件" /><author><name>肖</name><uri>http://www.blogger.com/profile/09204798093329129985</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="28" src="http://3.bp.blogspot.com/_EvAlXkwLm0g/S4DFipryI7I/AAAAAAAAARY/WicPJZ14rMA/S220/a1ad16fa996e72a759ee90a1.jpg" /></author><thr:total>0</thr:total></entry></feed>

