<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cyberpunk &#187; Ruby on Rails</title>
	<atom:link href="http://punk.tw/category/computer/programming/ruby-on-rails/feed" rel="self" type="application/rss+xml" />
	<link>http://punk.tw</link>
	<description>網際叛客：學習心得、Web 2.0與網路觀察、Google應用與技術、Ruby on Rails, Google App Engine</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:42:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>[Facebook應用程式開發] Rails on Facebook for Beginners</title>
		<link>http://punk.tw/2009/12/22/facebook%e6%87%89%e7%94%a8%e7%a8%8b%e5%bc%8f%e9%96%8b%e7%99%bc-rails-on-facebook-for-beginners</link>
		<comments>http://punk.tw/2009/12/22/facebook%e6%87%89%e7%94%a8%e7%a8%8b%e5%bc%8f%e9%96%8b%e7%99%bc-rails-on-facebook-for-beginners#comments</comments>
		<pubDate>Tue, 22 Dec 2009 12:24:56 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://punk.tw/?p=1008</guid>
		<description><![CDATA[以下是筆者今天於Ruby Tuesday社群聚會分享使用Ruby on Rails開發Facebook應用程式的經驗之投影片。裡面包括許多實際在使用中的程式碼並且都有提供Gist的網址，有需要的朋友可以直接到該網址複製使用。 其中有提到iPK這個Facebook應用程式，是筆者參與Inside部落格團隊所開發的應用案例，投影片中所有的程式碼片段皆整理自該程式，若您對於程式的寫法有任何建議或疑問，歡迎在本文提出以進行交流、討論。:) 投影片內容除了團隊共同的研究、開發經驗之外，也感謝Cardinal Blue經驗上的分享，關於Cardinal Blue分享的投影片請見：Cardinal Blue的Facebook應用程式開發經驗分享：使用Ruby on Rails與Heroku]]></description>
			<content:encoded><![CDATA[<p>
以下是筆者今天於<a href="http://ruby.tw/">Ruby Tuesday</a>社群聚會分享使用Ruby on Rails開發Facebook應用程式的經驗之投影片。裡面包括許多實際在使用中的程式碼並且都有提供Gist的網址，有需要的朋友可以直接到該網址複製使用。
</p>
<p>
其中有提到<a href="http://apps.facebook.com/pkpolls/">iPK</a>這個Facebook應用程式，是筆者參與Inside部落格團隊所開發的應用案例，投影片中所有的程式碼片段皆整理自該程式，若您對於程式的寫法有任何建議或疑問，歡迎在本文提出以進行交流、討論。:)
</p>
<p>
投影片內容除了團隊共同的研究、開發經驗之外，也感謝Cardinal Blue經驗上的分享，關於Cardinal Blue分享的投影片請見：<a href="http://www.inside.com.tw/11/29/cardinal-blue的facebook應用程式開發經驗分享：使用ruby-on-rails與heroku">Cardinal Blue的Facebook應用程式開發經驗分享：使用Ruby on Rails與Heroku</a>
</p>
<div style="text-align:center">
<iframe src="http://docs.google.com/present/embed?id=dv62wt6_300fnptksc2&#038;loop=true&#038;size=m" frameborder="0" width="555" height="451"></iframe>
</div>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2009/12/22/facebook%e6%87%89%e7%94%a8%e7%a8%8b%e5%bc%8f%e9%96%8b%e7%99%bc-rails-on-facebook-for-beginners/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何將現有的Ruby on Rails專案移植到Heroku？</title>
		<link>http://punk.tw/2009/09/27/%e5%a6%82%e4%bd%95%e5%b0%87%e7%8f%be%e6%9c%89%e7%9a%84ruby-on-rails%e5%b0%88%e6%a1%88%e7%a7%bb%e6%a4%8d%e5%88%b0heroku%ef%bc%9f</link>
		<comments>http://punk.tw/2009/09/27/%e5%a6%82%e4%bd%95%e5%b0%87%e7%8f%be%e6%9c%89%e7%9a%84ruby-on-rails%e5%b0%88%e6%a1%88%e7%a7%bb%e6%a4%8d%e5%88%b0heroku%ef%bc%9f#comments</comments>
		<pubDate>Sun, 27 Sep 2009 15:16:40 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/?p=960</guid>
		<description><![CDATA[今天試著將兩個手頭上已經沒在密集維護但偶有流量的網站移植到Heroku上來降低維護的成本，過程中相當輕鬆地將專案無痛轉移到Heroku之外，連資料都一起順利轉移過去了，以下是轉移步驟的簡介。 將專案納入git版本控管中，指令是git init 建立一個新的Heroku空間，指令是heroku create或是heroku create YOUR_APP_NAME 在config/environment.rb加上$KCODE='u'（避免中文編碼問題，我是加在第一行） 將所有檔案丟到Heroku上：git add . ; git commit -a -m "deploy to Heroku" ; git push heroku master 步驟其實很簡單，官方文件上應該也能找到更詳盡的教學，另外要注意的是，如果您的專案擁有自己的網址，希望能一併指到Heroku，還需要注意下列事項： 將DNS中的CNAME 指到proxy.heroku.com，或是將A Record指到75.101.163.44, 75.101.145.87, 174.129.212.2，Heroku的程式在新增custom domain name時會先檢查您的DNS Records。 請在Heroku的帳戶管理中輸入您的信用卡資料（custom domain name雖然是免費的服務，但要驗證信用卡） 使用heroku addons:add custom_domains指令啟用自定網址 使用heroku domains:add YOUR_DOMAIN_NAME來新增網址 當然，上述步驟可以不透過指令，直接在Heroku的管理介面完成。 我自己在移植的過程中遇到兩個問題，第一個是資料丟上Heroku之後都變成亂碼，但我的MySQL編碼就是UTF8了，實在沒道理，因此就嘗試加上$KCODE的設定，沒想到馬上管用。 第二個問題是資料如何丟到Heroku，步驟也很簡單： sudo gem install tap（tap就是讓你可以無痛轉移的關鍵Ruby gem） heroku db:push（如此一來就會把資料庫，包括schema、data、index完整送上Heroku） 其中要注意的是，Heroku設計的原意是讓你可以將開發過程中已有的測試資料（development環境）丟上Heroku一併測試，因此我目前沒有找到如何讀取production環境的參數，我自己的作法是在config/database.yml中將development的設定改為production的設定，讓程式去讀取production。 或是你也可以使用指令的方式指定任意的資料庫：heroku db:push [...]]]></description>
			<content:encoded><![CDATA[<p>今天試著將兩個手頭上已經沒在密集維護但偶有流量的網站移植到Heroku上來降低維護的成本，過程中相當輕鬆地將專案無痛轉移到Heroku之外，連資料都一起順利轉移過去了，以下是轉移步驟的簡介。</p>
<ol>
<li>將專案納入git版本控管中，指令是git init</li>
<li>建立一個新的Heroku空間，指令是heroku create或是heroku create YOUR_APP_NAME</li>
<li>在config/environment.rb加上$KCODE='u'（避免中文編碼問題，我是加在第一行）</li>
<li>將所有檔案丟到Heroku上：git add . ; git commit -a -m "deploy to Heroku" ; git push heroku master</li>
</ol>
<p>步驟其實很簡單，官方文件上應該也能找到更詳盡的教學，另外要注意的是，如果您的專案擁有自己的網址，希望能一併指到Heroku，還需要注意下列事項：</p>
<ol>
<li><span style="background-color: #ffffff;">將DNS中的CNAME 指到proxy.heroku.com，或是將A Record指到75.101.163.44, 75.101.145.87, 174.129.212.2，Heroku的程式在新增custom domain name時會先檢查您的DNS Records。</span></li>
<li><span style="background-color: #ffffff;">請在Heroku的帳戶管理中輸入您的信用卡資料（custom domain name雖然是免費的服務，但要驗證信用卡）</span></li>
<li><span style="background-color: #ffffff;">使用heroku addons:add custom_domains指令啟用自定網址</span></li>
<li><span style="background-color: #ffffff;">使用heroku domains:add YOUR_DOMAIN_NAME來新增網址</span></li>
</ol>
<p>當然，上述步驟可以不透過指令，直接在Heroku的管理介面完成。</p>
<p>我自己在移植的過程中遇到兩個問題，第一個是資料丟上Heroku之後都變成亂碼，但我的MySQL編碼就是UTF8了，實在沒道理，因此就嘗試加上$KCODE的設定，沒想到馬上管用。</p>
<p>第二個問題是資料如何丟到Heroku，步驟也很簡單：</p>
<ol>
<li>sudo gem install tap（tap就是讓你可以無痛轉移的關鍵Ruby gem）</li>
<li>heroku db:push（如此一來就會把資料庫，包括schema、data、index完整送上Heroku）</li>
</ol>
<p>其中要注意的是，Heroku設計的原意是讓你可以將開發過程中已有的測試資料（development環境）丟上Heroku一併測試，因此我目前沒有找到如何讀取production環境的參數，我自己的作法是在config/database.yml中將development的設定改為production的設定，讓程式去讀取production。</p>
<p>或是你也可以使用指令的方式指定任意的資料庫：heroku db:push mysql://YOUR_USER_NAME:YOUR_PASSWORD@localhost/DB_NAME</p>
<p>P.S. 當然，如果嫌Heroku不好用或是其他原因想要搬家，只要下heroku db:pull，就會把雲端上的資料撈回來放在development環境，我自己是用SQLite，資料就會倒進SQLite了，是不是很方便呢？:p</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2009/09/27/%e5%a6%82%e4%bd%95%e5%b0%87%e7%8f%be%e6%9c%89%e7%9a%84ruby-on-rails%e5%b0%88%e6%a1%88%e7%a7%bb%e6%a4%8d%e5%88%b0heroku%ef%bc%9f/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Rails 2.0中如何避免在URL使用資料流水號</title>
		<link>http://punk.tw/2008/04/29/%e5%9c%a8rails-20%e4%b8%ad%e5%a6%82%e4%bd%95%e9%81%bf%e5%85%8d%e5%9c%a8url%e4%bd%bf%e7%94%a8%e8%b3%87%e6%96%99%e6%b5%81%e6%b0%b4%e8%99%9f</link>
		<comments>http://punk.tw/2008/04/29/%e5%9c%a8rails-20%e4%b8%ad%e5%a6%82%e4%bd%95%e9%81%bf%e5%85%8d%e5%9c%a8url%e4%bd%bf%e7%94%a8%e8%b3%87%e6%96%99%e6%b5%81%e6%b0%b4%e8%99%9f#comments</comments>
		<pubDate>Mon, 28 Apr 2008 19:23:18 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[ActiveRecord]]></category>

		<guid isPermaLink="false">http://punk.tw/2008/04/29/857.html</guid>
		<description><![CDATA[<p>我曾寫過一篇「<a href="http://punk.tw/2007/10/06/340.html">Rails: 建立Permalink，避免流水號洩漏網站資料</a>」針對有人擔心（或質疑）Ruby on Rails中以資料表主鍵流水號作為URL中的參數，會導致網站洩漏某些不希望被外界一眼看穿的資訊，例如使用者總數或文章總數之類的數據，因此簡單地透過Model在存取資料庫時的before_create方法建立每一筆資料的unique key來避免這個問題。</p> ]]></description>
			<content:encoded><![CDATA[<p>我曾寫過一篇「<a href="http://punk.tw/2007/10/06/340.html">Rails: 建立Permalink，避免流水號洩漏網站資料</a>」針對有人擔心（或質疑）Ruby on Rails中以資料表主鍵流水號作為URL中的參數，會導致網站洩漏某些不希望被外界一眼看穿的資訊，例如使用者總數或文章總數之類的數據，因此簡單地透過Model在存取資料庫時的before_create方法建立每一筆資料的unique key來避免這個問題。</p>
<p>之前使用Rails 1.2.x版本時根據我當時的作法並無不妥，因為我自己的coding習慣是會完整地指定controller, action以及id，並在對應的action中使用find_by_key的方法來找到資料。</p>
<p>然而，升級到Rails 2.0後便會出現許多麻煩，例如預設產生的scaffold必須修改許多地方，才能讓Model.find_by_key、redirect_to <strong>post_url</strong>(@post)之類的方法正確運作。</p>
<p>於是我一直到前陣子才找到應該比較正規的作法：在Model中使用to_param方法。</p>
<p>to_param(): Enables Active Record objects to be used as URL parameters in Action Pack automatically.</p>
<p>這麼好用的方法我居然不是一開始就發現，只能說相見恨晚，好險我開發Rails 2.0的時間還不算長，沒走到太多冤枉路。要實踐本標題所說的在Rails 2.0中如何避免在URL使用資料流水號便相當簡單！</p>
<p>1. 建立Scaffold：（通常會對key這個欄位建立index並設定字串長度limit，別忘了:p）<br />script/generate post title:string content:text key:string</p>
<p>2. 將Post的migration寫進資料庫後修改Post model如下：</p>
<p>
<pre class="prettyprint">
class Post < ActiveRecord::Base
  before_create :generate_key

<strong>  def self.find(*args)
    if args.first.is_a?(String)
      find_by_key(args.shift, *args) or raise ActiveRecord::RecordNotFound
    else
      super
    end
  end

  def to_param
    key
  end</strong>

  protected
  # 我前一篇文章產生key的方式不太一樣，這應該是個人習慣。
  # 另外，其實亂碼的網址沒有SEO的效益，建議還是弄個slug吧！
  def generate_key
    require 'digest/sha1'
    self.key = Digest::SHA1.hexdigest( Time.now.to_s.split(//).sort_by {rand}.join )[15..24]
  end
end
</pre>
</p>
<p>就這樣！<strong>概念很簡單，就是不再用ID當查詢的參數，全面改用key</strong>啦！關鍵就在於使用to_param()方法以及對find做進一步的判斷，因為我<strong>除了Model.find(:all)之類的Symbol，其餘的CRUD都是傳入Key作為參數</strong>，因此在此僅簡單地判斷是否為字串。</p>
<p>如此一來，不管你是什麼user_posts_url, new_user_post_url都可以輕鬆地直接以ActiveRecord Object傳遞，起碼我之前曾經嘗試用edit_post_url(@post.key)這種方式傳值，非常麻煩、要改Controller又要改View，現在用了to_param()，什麼都不用改了！又優雅又簡單，寫起來更加快樂、效率也提昇了:p</p>
<p>P.S. 其實在Rails 1.2.x應該也是這麼做比較優雅，不限於2.0</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2008/04/29/%e5%9c%a8rails-20%e4%b8%ad%e5%a6%82%e4%bd%95%e9%81%bf%e5%85%8d%e5%9c%a8url%e4%bd%bf%e7%94%a8%e8%b3%87%e6%96%99%e6%b5%81%e6%b0%b4%e8%99%9f/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何使用Rails做HTTP 301/302 Redirect？</title>
		<link>http://punk.tw/2008/04/29/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8rails%e5%81%9ahttp-301302-redirect%ef%bc%9f</link>
		<comments>http://punk.tw/2008/04/29/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8rails%e5%81%9ahttp-301302-redirect%ef%bc%9f#comments</comments>
		<pubDate>Mon, 28 Apr 2008 18:38:23 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2008/04/29/856.html</guid>
		<description><![CDATA[HTTP的規範中，狀態代碼301代表Permanent Redirect（永久定址轉移）、302則是暫時定址轉移，相較於使用HTML或是JavaScript來達到Redirect轉址目的，最大的差別在於301/302的HTTP狀態是被搜尋引擎所認可的；換句話說，你可以透過301/302轉址的方式讓搜尋引擎爬到你搬家後的新網頁。 至於301、302兩種狀態的差異，所謂的「永久」定址轉移是指搜尋引擎會根據你所指定的新網址重新建立索引，原來的位址便不再使用；而暫時定址轉移則是暫時性地將網頁搬到某個地方。 一般做301/302轉址可直接更改.htaccess檔案，讓Apache代勞即可： Redirect 301 /not_available/old_page.html http://www.newserver.com/available/new_page.html 若要在Rails中來做這件事情，有幾種作法，最簡單的是在Controller裡面寫 headers["Status"] = "301 Moved Permanently"redirect_to http://somenewurl/ 或者 head :moved_permanently, :location =&#62; 'http://somenewurl' 或者，從Rails的原始碼中可以看到下列用法，感覺這個最好用:p (from trunk/actionpack/lib/action_controller/base.rb) # Examples: #&#160;&#160; redirect_to :action=&#62;'atom', :status=&#62;:moved_permanently #&#160;&#160; redirect_to post_url(@post), :status=&#62;301 #&#160;&#160; redirect_to :action=&#62;'atom', :status=&#62;302]]></description>
			<content:encoded><![CDATA[<p><strong>HTTP的規範中，狀態代碼301代表Permanent Redirect</strong>（永久定址轉移）、302則是暫時定址轉移，相較於使用HTML或是JavaScript來達到Redirect轉址目的，最大的差別在於<strong>301/302的HTTP狀態是被搜尋引擎所認可的</strong>；換句話說，你可以透過301/302轉址的方式讓搜尋引擎爬到你搬家後的新網頁。</p>
<p>至於301、302兩種狀態的差異，所謂的<strong>「永久」定址轉移是指搜尋引擎會根據你所指定的新網址重新建立索引，原來的位址便不再使用</strong>；而暫時定址轉移則是暫時性地將網頁搬到某個地方。</p>
<p>一般做301/302轉址可直接更改.htaccess檔案，讓Apache代勞即可：</p>
<p>Redirect 301 /not_available/old_page.html http://www.newserver.com/available/new_page.html</p>
<p>若要在Rails中來做這件事情，有幾種作法，最簡單的是在Controller裡面寫</p>
<p>headers["Status"] = "301 Moved Permanently"<br />redirect_to <a href="http://somenewurl/">http://somenewurl/</a>
<p>或者</p>
<p>head :moved_permanently, :location =&gt; 'http://somenewurl'</p>
<p>或者，從Rails的原始碼中可以看到下列用法，感覺這個最好用:p</p>
<p>(from <a href="http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action_controller/base.rb?rev=7820">trunk/actionpack/lib/action_controller/base.rb</a>)</p>
<p># Examples: <br />#&nbsp;&nbsp; redirect_to :action=&gt;'atom', :status=&gt;:moved_permanently <br />#&nbsp;&nbsp; redirect_to post_url(@post), :status=&gt;301 <br />#&nbsp;&nbsp; redirect_to :action=&gt;'atom', :status=&gt;302 </p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2008/04/29/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8rails%e5%81%9ahttp-301302-redirect%ef%bc%9f/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby Plus：Ruby與Rails的免費教學影片</title>
		<link>http://punk.tw/2008/01/15/ruby-plus%ef%bc%9aruby%e8%88%87rails%e7%9a%84%e5%85%8d%e8%b2%bb%e6%95%99%e5%ad%b8%e5%bd%b1%e7%89%87</link>
		<comments>http://punk.tw/2008/01/15/ruby-plus%ef%bc%9aruby%e8%88%87rails%e7%9a%84%e5%85%8d%e8%b2%bb%e6%95%99%e5%ad%b8%e5%bd%b1%e7%89%87#comments</comments>
		<pubDate>Tue, 15 Jan 2008 02:04:45 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://punk.tw/2008/01/15/607.html</guid>
		<description><![CDATA[Ruby Plus是個類似Railscasts的影片收藏站，提供各種Rails（或Ruby）相關的教學影片，例如：如何在Rails 2.0中上傳圖片、如何開發Rails Plugins，或是最近比較熱門的RESTful目前也有幾篇教學影片可以參考。 註：Railscasts因為出來得比較早，教學影片較多，也可參考參考。:D]]></description>
			<content:encoded><![CDATA[<p><a href="http://punk.tw/wp-content/uploads/2008/01/image35.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="74" alt="image" src="http://punk.tw/wp-content/uploads/2008/01/image-thumb34.png" width="318" border="0"></a> </p>
<p><a href="http://www.rubyplus.org/">Ruby Plus</a>是個類似<a href="http://railscasts.com/">Railscasts</a>的影片收藏站，提供各種Rails（或Ruby）相關的教學影片，例如：<a href="http://www.rubyplus.org/episodes/31-How-to-upload-images-in-Rails-2-.html">如何在Rails 2.0中上傳圖片</a>、<a href="http://www.rubyplus.org/episodes/10-How-to-develop-Plugins-in-Rails-The-Basics.html">如何開發Rails Plugins</a>，或是最近比較熱門的RESTful目前也有幾篇教學影片<a href="http://www.rubyplus.org/episodes/archive">可以參考</a>。</p>
<p>註：Railscasts因為出來得比較早，教學影片較多，也可參考參考。:D</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2008/01/15/ruby-plus%ef%bc%9aruby%e8%88%87rails%e7%9a%84%e5%85%8d%e8%b2%bb%e6%95%99%e5%ad%b8%e5%bd%b1%e7%89%87/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Heroku：線上撰寫Rails程式初體驗</title>
		<link>http://punk.tw/2007/11/20/heroku%ef%bc%9a%e7%b7%9a%e4%b8%8a%e6%92%b0%e5%af%abrails%e7%a8%8b%e5%bc%8f%e5%88%9d%e9%ab%94%e9%a9%97</link>
		<comments>http://punk.tw/2007/11/20/heroku%ef%bc%9a%e7%b7%9a%e4%b8%8a%e6%92%b0%e5%af%abrails%e7%a8%8b%e5%bc%8f%e5%88%9d%e9%ab%94%e9%a9%97#comments</comments>
		<pubDate>Tue, 20 Nov 2007 07:22:37 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web2.0 Website]]></category>
		<category><![CDATA[Heroku]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/11/20/443.html</guid>
		<description><![CDATA[Heroku是一個讓網頁開發人員可以在線上編輯Rails程式的網路服務，目前還在limited beta的階段，有興趣申請的讀者可以到申請網址登記排隊。上一篇文章提到Heroku的幾個特色，這篇文章就登入來玩玩看吧！ 初次登入之後會看到如下畫面： 此時尚未建立任何應用程式，點選建立程式之後會轉到另一個網址：http://edit.untitled-22289.heroku.com/，由於尚未對應用程式命名，網址是以流水號加上untitled的方式命名，這是可以設定的。（說不定還支援使用者自行指定domain name？或許將會是個付費服務）。 上圖是應用程式的設定畫面，可以自訂網址、支援協同編輯、匯入/匯出、程式版本快照（簡單的版本控制），至於Other裡面目前只有Destroy一項功能:p 因為內文都是一些截圖，使用起來對我而言也沒有太大的驚喜，所以先講結論吧！ 適合初學者環境都已經建好了，連資料庫都免費提供，完全不需要學習建置環境或是任何設定，就可以開始快快樂樂寫Rails。 適合拿來當維護環境手邊沒有電腦、沒有合適的開發環境、沒有安全的網路環境，又急著要修改？如果類似的服務可以提供https://的SSL環境，或許可以拿來玩玩看。 適合拿來推廣Rails技術高手想要推廣Rails，但手邊沒有現成的環境，登入Heroku馬上就可以開始demo Ruby on Rails的威力，新手看到一個留言板居然沒有幾行程式就搞定，一定會馬上被拐進來的:D 下圖即編輯程式的主畫面： 畫面的構成我就不多做介紹了，基本上在編輯畫面可以看到Rails app的目錄結構、檢視資料庫schema以及Rails的log file，點選右上角的圖示則會馬上跳轉到應用程式執行的頁面，讓你知道目前執行的狀況。 畫面左下角則有幾個寫Rails必備的指令工具：Generator, Console以及Rake 先打開Console模式來玩玩看，點選Console之後會跳到另一個網址，此時出現的是全螢幕的Console畫面，等等再建幾個Model來玩玩看： HelloWorld，建個留言板！ Code Generator的畫面： 執行之後也會告知執行結果： 稍微寫一下migration，使用編輯器的感覺是非常不順手，我的作業系統、Firefox都是英文環境，語系也設為en-us，但在編輯器裡面卻會出現游標與實際文字位置無法對齊的狀況，實在是相當奇妙。 先不管它，先migrate上去了！Rake的畫面也是純指令模式，這點就不太親切啦～建議開發團隊可以考慮NetBeans那種IDE懶人用法啊XD 看到這個畫面，我才想起我根本還沒設定database啊XD趕快看看database.yaml如下： 換句話說，heroku目前提供了database而且還是postgresql :p，說不定以後也會是個向使用者索取費用的服務。 接下來建立scaffold讓我的guestbook跑起來吧！ 建立完成之後，應該就可以馬上看到程式目前的畫面啦～！ 檢視資料庫 檢視資料庫的畫面可以看到目前有哪些資料表： 也可以直接點進去修改： 檢視Log file 點選各個訊息還可以看到更詳盡的資訊。]]></description>
			<content:encoded><![CDATA[<p>Heroku是一個讓網頁開發人員可以在線上編輯Rails程式的網路服務，目前還在limited beta的階段，有興趣申請的讀者可以到<a href="http://heroku.com/beta">申請網址</a>登記排隊。上一篇文章提到Heroku的幾個特色，這篇文章就登入來玩玩看吧！</p>
<p>初次登入之後會看到如下畫面：</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image10.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="222" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb9.png" width="432" border="0"></a> </p>
<p>此時尚未建立任何應用程式，點選建立程式之後會轉到另一個網址：<a title="http://edit.untitled-22289.heroku.com/" href="http://edit.untitled-22289.heroku.com/">http://edit.untitled-22289.heroku.com/</a>，由於尚未對應用程式命名，網址是以流水號加上untitled的方式命名，這是可以設定的。（說不定還支援使用者自行指定domain name？或許將會是個付費服務）。<br /><a href="http://punk.tw/wp-content/uploads/2007/11/image11.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="261" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb10.png" width="416" border="0"></a> </p>
<p>上圖是應用程式的設定畫面，可以自訂網址、支援協同編輯、匯入/匯出、程式版本快照（簡單的版本控制），至於Other裡面目前只有Destroy一項功能:p</p>
<p>因為內文都是一些截圖，使用起來對我而言也沒有太大的驚喜，所以先講結論吧！</p>
<ul>
<li>適合初學者<br />環境都已經建好了，連資料庫都免費提供，完全不需要學習建置環境或是任何設定，就可以開始快快樂樂寫Rails。</li>
<li>適合拿來當維護環境<br />手邊沒有電腦、沒有合適的開發環境、沒有安全的網路環境，又急著要修改？如果類似的服務可以提供https://的SSL環境，或許可以拿來玩玩看。</li>
<li>適合拿來推廣Rails<br />技術高手想要推廣Rails，但手邊沒有現成的環境，登入Heroku馬上就可以開始demo Ruby on Rails的威力，新手看到一個留言板居然沒有幾行程式就搞定，一定會馬上被拐進來的:D</li>
</ul>
<p>下圖即編輯程式的主畫面：</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image12.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="310" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb11.png" width="434" border="0"></a> </p>
<p>畫面的構成我就不多做介紹了，基本上在編輯畫面可以看到Rails app的目錄結構、檢視資料庫schema以及Rails的log file，點選右上角的圖示則會馬上跳轉到應用程式執行的頁面，讓你知道目前執行的狀況。</p>
<p>畫面左下角則有幾個寫Rails必備的指令工具：Generator, Console以及Rake</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image13.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="121" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb12.png" width="129" border="0"></a> </p>
<p>先打開Console模式來玩玩看，點選Console之後會跳到另一個網址，此時出現的是全螢幕的Console畫面，等等再建幾個Model來玩玩看：</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image14.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="163" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb13.png" width="303" border="0"></a> </p>
<h1>HelloWorld，建個留言板！</h1>
<p>Code Generator的畫面：</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image15.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="291" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb14.png" width="422" border="0"></a> </p>
<p>執行之後也會告知執行結果：</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image16.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="231" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb15.png" width="339" border="0"></a> </p>
<p>稍微寫一下migration，使用編輯器的感覺是非常不順手，我的作業系統、Firefox都是英文環境，語系也設為en-us，但在編輯器裡面卻會出現<strong>游標與實際文字位置無法對齊</strong>的狀況，實在是相當奇妙。</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image17.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="123" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb16.png" width="304" border="0"></a> </p>
<p>先不管它，先migrate上去了！Rake的畫面也是純指令模式，這點就不太親切啦～建議開發團隊可以考慮NetBeans那種IDE懶人用法啊XD</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image18.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="252" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb17.png" width="358" border="0"></a> </p>
<p>看到這個畫面，我才想起我根本還沒設定database啊XD趕快看看database.yaml如下：</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image19.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="116" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb18.png" width="203" border="0"></a> </p>
<p>換句話說，heroku目前提供了database而且還是postgresql :p，說不定以後也會是個向使用者索取費用的服務。</p>
<p>接下來建立scaffold讓我的guestbook跑起來吧！</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image20.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="240" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb19.png" width="416" border="0"></a> </p>
<p>建立完成之後，應該就可以馬上看到程式目前的畫面啦～！</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image21.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="131" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb20.png" width="301" border="0"></a> </p>
<h1>檢視資料庫</h1>
<p>檢視資料庫的畫面可以看到目前有哪些資料表：</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image22.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="38" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb21.png" width="361" border="0"></a> </p>
<p>也可以直接點進去修改：</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image23.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="233" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb22.png" width="382" border="0"></a> </p>
<h1>檢視Log file</h1>
<p><a href="http://punk.tw/wp-content/uploads/2007/11/image24.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="31" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb23.png" width="432" border="0"></a> </p>
<p>點選各個訊息還可以看到更詳盡的資訊。</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/11/20/heroku%ef%bc%9a%e7%b7%9a%e4%b8%8a%e6%92%b0%e5%af%abrails%e7%a8%8b%e5%bc%8f%e5%88%9d%e9%ab%94%e9%a9%97/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Heroku：讓你用網頁介面寫Rails（順便Hosting）</title>
		<link>http://punk.tw/2007/11/20/heroku%ef%bc%9a%e8%ae%93%e4%bd%a0%e7%94%a8%e7%b6%b2%e9%a0%81%e4%bb%8b%e9%9d%a2%e5%af%abrails%ef%bc%88%e9%a0%86%e4%be%bfhosting%ef%bc%89</link>
		<comments>http://punk.tw/2007/11/20/heroku%ef%bc%9a%e8%ae%93%e4%bd%a0%e7%94%a8%e7%b6%b2%e9%a0%81%e4%bb%8b%e9%9d%a2%e5%af%abrails%ef%bc%88%e9%a0%86%e4%be%bfhosting%ef%bc%89#comments</comments>
		<pubDate>Tue, 20 Nov 2007 06:34:50 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web2.0 Website]]></category>
		<category><![CDATA[Heroku]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/11/20/411.html</guid>
		<description><![CDATA[http://heroku.com/ （最近因為忙著申請學校，同時面對工作上的專案跟學校的專題，實在是難有餘裕寫文章，今天算是忙裡偷閒:p幾天沒寫文章手真的很癢，過一陣子忙完會盡量多發文的。） Heroku是個號稱可以讓你在線上撰寫你的Rails程式，並且連Hosting的服務都一起搞定的網路服務，有興趣的朋友可以到此網址排隊申請：http://heroku.com/beta，邀請函目前需要等待12天左右。 Heroku上列出了幾個特色如下： 線上編輯程式 支援Hosting，新建或是匯入Rails程式後即可直接啟動:D 分享或協同編輯 支援匯入、匯出 還支援完整的Console模式&#160; References Heroku: An Online Rails Development and App Hosting Environment]]></description>
			<content:encoded><![CDATA[<p><a href="http://heroku.com/"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="51" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image9.png" width="205" border="0"></a> <a title="http://heroku.com/" href="http://heroku.com/">http://heroku.com/</a></p>
<p> （最近因為忙著申請學校，同時面對工作上的專案跟學校的專題，實在是難有餘裕寫文章，今天算是忙裡偷閒:p幾天沒寫文章手真的很癢，過一陣子忙完會盡量多發文的。）</p>
<p><a href="http://heroku.com/">Heroku</a>是個號稱可以讓你在線上撰寫你的Rails程式，並且連Hosting的服務都一起搞定的網路服務，有興趣的朋友可以到此網址排隊申請：<a title="http://heroku.com/beta" href="http://heroku.com/beta">http://heroku.com/beta</a>，邀請函目前需要等待12天左右。</p>
<p><a href="http://heroku.com/">Heroku</a>上列出了<a href="http://heroku.com/features">幾個特色</a>如下：</p>
<ul>
<li>線上編輯程式<br /><a href="http://punk.tw/wp-content/uploads/2007/11/image4.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="109" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb4.png" width="367" border="0"></a> </li>
<li>支援Hosting，新建或是匯入Rails程式後即可直接啟動:D<br /><a href="http://punk.tw/wp-content/uploads/2007/11/image5.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="107" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb5.png" width="368" border="0"></a> </li>
<li>分享或協同編輯<br /><a href="http://punk.tw/wp-content/uploads/2007/11/image6.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="107" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb6.png" width="380" border="0"></a> </li>
<li>支援匯入、匯出<br /><a href="http://punk.tw/wp-content/uploads/2007/11/image7.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="102" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb7.png" width="367" border="0"></a> </li>
<li>還支援完整的Console模式<br /><a href="http://punk.tw/wp-content/uploads/2007/11/image8.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="96" alt="image" src="http://punk.tw/wp-content/uploads/2007/11/image-thumb8.png" width="367" border="0"></a>&nbsp;</li>
</ul>
<p>References</p>
<ul>
<li><a href="http://www.rubyinside.com/heroku-an-online-rails-development-and-app-hosting-environment-647.html">Heroku: An Online Rails Development and App Hosting Environment</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/11/20/heroku%ef%bc%9a%e8%ae%93%e4%bd%a0%e7%94%a8%e7%b6%b2%e9%a0%81%e4%bb%8b%e9%9d%a2%e5%af%abrails%ef%bc%88%e9%a0%86%e4%be%bfhosting%ef%bc%89/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jq4r: jQuery on Rails</title>
		<link>http://punk.tw/2007/09/20/jq4r-jquery-on-rails</link>
		<comments>http://punk.tw/2007/09/20/jq4r-jquery-on-rails#comments</comments>
		<pubDate>Thu, 20 Sep 2007 13:04:51 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[AJAX Framework]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/09/20/259.html</guid>
		<description><![CDATA[ericksk說：「既然找不到別人寫的，那就自己寫吧！」，因此他寫了一套jq4r，全名叫jQuery helpers for Rails。真是頗吸引我的，之前用過一陣子的jQuery，感覺還滿好用的，最近不但推出新版還搞了一套jQuery UI，之前在某個日文網站看到的評論稱之為「jQuery's Scriptaculous」。 anyway，ericsk的文章在此：jq4r - jQuery helpers for Rails 他另外開了一個blog及google code project專門來放jq4r： jq4r project: http://jq4r.googlecode.com/ jq4r blog: http://jq4r.blogspot.com/]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.ericsk.org/">ericksk</a>說：「既然找不到別人寫的，那就自己寫吧！」，因此他寫了一套jq4r，全名叫jQuery helpers for Rails。真是頗吸引我的，之前用過一陣子的jQuery，感覺還滿好用的，最近不但推出新版還搞了一套jQuery UI，之前在某個日文網站看到的評論稱之為「jQuery's Scriptaculous」。</p>
<p>anyway，ericsk的文章在此：<a href="http://blog.ericsk.org/archives/767">jq4r - jQuery helpers for Rails</a></p>
<p>他另外開了一個blog及google code project專門來放jq4r：</p>
<ul>
<li>jq4r project: <a href="http://jq4r.googlecode.com/">http://jq4r.googlecode.com/</a> </li>
<li>jq4r blog: <a href="http://jq4r.blogspot.com/">http://jq4r.blogspot.com/</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/09/20/jq4r-jquery-on-rails/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AjaxScaffold &amp; ActiveScaffold for Ruby on Rails</title>
		<link>http://punk.tw/2007/06/15/ajaxscaffold-activescaffold-for-ruby-on-rails</link>
		<comments>http://punk.tw/2007/06/15/ajaxscaffold-activescaffold-for-ruby-on-rails#comments</comments>
		<pubDate>Thu, 14 Jun 2007 19:06:17 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Ruby on Rails Plugin]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/06/15/ajaxscaffold-activescaffold-for-ruby-on-rails/</guid>
		<description><![CDATA[AjaxScaffold: AJAX interface for your Ruby on Rails modelshttp://www.ajaxscaffold.com/ ActiveScaffold: A Ruby on Rails plugin for dynamic, AJAX CRUD interfaceshttp://activescaffold.com/ 我自己還沒有實際用來開發，不過光看demo還滿吸引人的，簡單的CRUD機制都包好並且用Ajax的方式運作，包成Ruby on Rails的plugin使得安裝、使用都很簡單，有空再來研究研究。]]></description>
			<content:encoded><![CDATA[<p>AjaxScaffold: AJAX interface for your Ruby on Rails models<br /><a href="http://www.ajaxscaffold.com/">http://www.ajaxscaffold.com/</a>
<p>ActiveScaffold: A Ruby on Rails plugin for dynamic, AJAX CRUD interfaces<br /><a href="http://activescaffold.com/">http://activescaffold.com/</a>
<p>我自己還沒有實際用來開發，不過光看demo還滿吸引人的，簡單的CRUD機制都包好並且用Ajax的方式運作，包成Ruby on Rails的plugin使得安裝、使用都很簡單，有空再來研究研究。</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/06/15/ajaxscaffold-activescaffold-for-ruby-on-rails/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aptana + RadRails</title>
		<link>http://punk.tw/2007/04/25/aptana-radrails</link>
		<comments>http://punk.tw/2007/04/25/aptana-radrails#comments</comments>
		<pubDate>Wed, 25 Apr 2007 10:09:21 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/04/25/aptana-radrails/</guid>
		<description><![CDATA[最近致力於向身邊的朋友推廣Ruby on Rails，平常自己習慣用vi寫rails，對於Windows底下的開發環境相當不適應（gvim實在用不習慣），但為了推廣Rails，基於深信工欲善其事、必先利其器的心理，便稍微摸索一下RadRails+InstantRails的組合，結果就在我demo Rails給朋友們看的同時，赫然發現Aptana網站上已經釋出了Aptana + RadRails的版本，但其實我也懶得抓下來玩，因為我自己的電腦是Eclipse + Aptana + RadRails，基本上我猜用起來應該會差不多吧XD 網頁介紹在此，有興趣的可以前往觀看：http://www.aptana.com/download_rails_rdt.php 註：Aptana是一套適合用來開發Ajax的IDE（支援JavaScript, CSS, HTML），目前整合RadRails之後，應該會是個拿來寫Rails + Ajax的好組合。]]></description>
			<content:encoded><![CDATA[<p>最近致力於向身邊的朋友推廣Ruby on Rails，平常自己習慣用vi寫rails，對於Windows底下的開發環境相當不適應（gvim實在用不習慣），但為了推廣Rails，基於深信工欲善其事、必先利其器的心理，便稍微摸索一下RadRails+InstantRails的組合，結果就在我demo Rails給朋友們看的同時，赫然發現Aptana網站上已經釋出了Aptana + RadRails的版本，但其實我也懶得抓下來玩，因為我自己的電腦是Eclipse + Aptana + RadRails，基本上我猜用起來應該會差不多吧XD</p>
<p>網頁介紹在此，有興趣的可以前往觀看：<br /><a title="http://www.aptana.com/download_rails_rdt.php" href="http://www.aptana.com/download_rails_rdt.php">http://www.aptana.com/download_rails_rdt.php</a></p>
<p>註：Aptana是一套適合用來開發Ajax的IDE（支援JavaScript, CSS, HTML），目前整合RadRails之後，應該會是個拿來寫Rails + Ajax的好組合。</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/04/25/aptana-radrails/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Ruby on Rails中取出最新的一筆資料</title>
		<link>http://punk.tw/2007/04/04/howto-ruby-on-rails%e4%b8%ad%e5%8f%96%e5%87%ba%e6%9c%80%e6%96%b0%e7%9a%84%e4%b8%80%e7%ad%86%e8%b3%87%e6%96%99</link>
		<comments>http://punk.tw/2007/04/04/howto-ruby-on-rails%e4%b8%ad%e5%8f%96%e5%87%ba%e6%9c%80%e6%96%b0%e7%9a%84%e4%b8%80%e7%ad%86%e8%b3%87%e6%96%99#comments</comments>
		<pubDate>Wed, 04 Apr 2007 14:02:27 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/04/04/howto-ruby-on-rails%e4%b8%ad%e5%8f%96%e5%87%ba%e6%9c%80%e6%96%b0%e7%9a%84%e4%b8%80%e7%ad%86%e8%b3%87%e6%96%99/</guid>
		<description><![CDATA[使用Active Record時可以使用 Model.find(:first)來取出第一筆資料，或是Model.find(:all)來取出全部的資料，那如果想要取出最近的一筆資料該怎麼做呢？其實只需要加個排序的條件即可。 範例： @event = Event.find(:first, : order =&#62; "created_at DESC") Updated: 補充一下，其實如果是@event = Event.find(:all)，那麼@event.last便是最後一筆資料了。]]></description>
			<content:encoded><![CDATA[<p>使用Active Record時可以使用 Model.find(:first)來取出第一筆資料，或是Model.find(:all)來取出全部的資料，那如果想要取出最近的一筆資料該怎麼做呢？其實只需要加個排序的條件即可。</p>
<div>範例：</div>
<p><code>@event = Event.find(:first, : order =&gt; "created_at DESC")</code>
<p>Updated: 補充一下，其實如果是@event = Event.find(:all)，那麼@event.last便是最後一筆資料了。</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/04/04/howto-ruby-on-rails%e4%b8%ad%e5%8f%96%e5%87%ba%e6%9c%80%e6%96%b0%e7%9a%84%e4%b8%80%e7%ad%86%e8%b3%87%e6%96%99/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails</title>
		<link>http://punk.tw/2007/03/23/ruby-on-rails-2</link>
		<comments>http://punk.tw/2007/03/23/ruby-on-rails-2#comments</comments>
		<pubDate>Thu, 22 Mar 2007 16:43:05 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/03/23/ruby-on-rails-2/</guid>
		<description><![CDATA[昨天在網路上抓到的一張Ruby on Rails的架構圖，點圖可放大。 P.S.若有侵權請來信告知deduce_@_gmail.com, thanks!]]></description>
			<content:encoded><![CDATA[<p><a href="http://punk.tw/wp-content/uploads/images/RubyonRails_A13/084510_1955218822_wiegsazn9.jpg" atomicselection="true"><img height="181" src="http://punk.tw/wp-content/uploads/images/RubyonRails_A13/084510_1955218822_wiegsazn_thumb7.jpg" width="240"></a> </p>
<p>昨天在網路上抓到的一張Ruby on Rails的架構圖，點圖可放大。</p>
<p>P.S.若有侵權請來信告知deduce_@_gmail.com, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/03/23/ruby-on-rails-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails Recipes</title>
		<link>http://punk.tw/2007/03/18/rails-recipes</link>
		<comments>http://punk.tw/2007/03/18/rails-recipes#comments</comments>
		<pubDate>Sun, 18 Mar 2007 08:53:09 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/03/18/rails-recipes/</guid>
		<description><![CDATA[我連Agile Web Development with Rails都還沒看完，就迫不及待拿出Rails Recipes開始看看裡面提供了些什麼有趣的玩意兒。Rails Recipes這本書比較適合已經對於Ruby on Rails有點瞭解，甚至是已經開始製作、經營網站的User，裡面提供了一些很實用的技巧，共70個Recipes分成以下幾篇： User Interface Recipes Database Recipes Controller Recipes Testing Recipes Big-Picture Recipes Email Recipes 我覺得這本書跟Agile Web Development with Rails都很有收藏價值，Rails Recipe在每一章的開頭會先敘述一段網站開發者可能遭遇的「Problem」（或是一段簡單的場景敘述），隨後列出需要準備的「Ingredients」，並且提出對應的「Solution」，內容我認為是簡短有力，沒事拿來當閒書翻閱一下或是放在旁邊當工具書參考用都很有幫助。 註：另一本「Advanced Rails Recipes」預計在August 2007出版，真是令人期待！http://www.pragmaticprogrammer.com/titles/fr_mrr/index.html]]></description>
			<content:encoded><![CDATA[</p>
<p><img height="166" src="http://punk.tw/wp-content/uploads/images/RailsRecipes_EC85/image04.png" width="138"> </p>
<p>我連Agile Web Development with Rails都還沒看完，就迫不及待拿出Rails Recipes開始看看裡面提供了些什麼有趣的玩意兒。Rails Recipes這本書比較適合已經對於Ruby on Rails有點瞭解，甚至是已經開始製作、經營網站的User，裡面提供了一些很實用的技巧，共70個Recipes分成以下幾篇：</p>
<ul>
<li>User Interface Recipes</li>
<li>Database Recipes</li>
<li>Controller Recipes</li>
<li>Testing Recipes</li>
<li>Big-Picture Recipes</li>
<li>Email Recipes</li>
</ul>
<p>我覺得這本書跟Agile Web Development with Rails都很有收藏價值，Rails Recipe在每一章的開頭會先敘述一段網站開發者可能遭遇的「Problem」（或是一段簡單的場景敘述），隨後列出需要準備的「Ingredients」，並且提出對應的「Solution」，內容我認為是簡短有力，沒事拿來當閒書翻閱一下或是放在旁邊當工具書參考用都很有幫助。</p>
<p>註：另一本「Advanced Rails Recipes」預計在August 2007出版，真是令人期待！<br /><a title="http://www.pragmaticprogrammer.com/titles/fr_mrr/index.html" href="http://www.pragmaticprogrammer.com/titles/fr_mrr/index.html">http://www.pragmaticprogrammer.com/titles/fr_mrr/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/03/18/rails-recipes/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>22 Successful Ruby on Rails Web Applications</title>
		<link>http://punk.tw/2007/03/17/22-successful-ruby-on-rails-web-applications</link>
		<comments>http://punk.tw/2007/03/17/22-successful-ruby-on-rails-web-applications#comments</comments>
		<pubDate>Sat, 17 Mar 2007 13:33:09 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web2.0 Website]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/03/17/22-successful-ruby-on-rails-web-applications/</guid>
		<description><![CDATA[http://rubycorner.net/articles/22-successful-ruby-on-rails-web-applications/ 這篇文章介紹了22個成功的Ruby on Rails個案，稍微做個簡單的中文翻譯替螢幕前的訪客省點時間好了:) （另外在http://happycodr.com/biglist有更多的網站介紹，共有388個！） 第一部份主要是37signals他們公司所經營的網站， Basecamphttp://www.basecamphq.com專案管理網站 Campfirehttp://www.campfirenow.com即時群組聊天網站 Backpackhttp://www.backpackit.com資訊彙整與行事曆網站 Tadalisthttp://www.tadalist.com簡單好用的Todo List（要做的事） Writeboardhttp://www.writeboard.com線上共同編輯文件 第二部份則是在RubyonRails.org有介紹的網站， 43things.comhttp://www.43things.com這個網站也算是Web 2.0與Ruby on Rails的經典網站，人們可以上去分享自己想做的事情，藉此來找到跟自己有著相同目標的朋友們。 odeo.comhttp://odeo.com音樂分享網站 shopify.comhttp://shopify.com提供使用者快速建立屬於自己的電子商務網站 fluxionhttp://www.fluxiom.com管理、組織並分想你的數位資產 strongspace.comhttp://www.strongspace.comFile hosting檔案分享網站 Typohttp://www.typosphere.orgBlogging engine，這在Ruby on Rails也算是很紅的一套blog系統 第三部份應該是筆者自行發現的網站，還滿不錯的～看到好多以前沒逛過的站 ajaxed.comhttp://www.ajaxed.com不需要寫程式即可輕輕鬆鬆在你現有的網站上加上Ajax的效果 atopsites.comhttp://atopsites.com仿Alaxa.com的網站 asoboo.comhttp://asoboo.com針對Creative people所設立的社群網站（筆者特別強調該網站是佈署在Win2003） thebeststuffintheworldhttp://www.thebeststuffintheworld.com有趣的web 2.0應用 dealplumber.comhttp://www.dealplumber.com另一個有趣的社群網站 digital-tunes.nethttp://www.digital-tunes.net專做音樂的電子商務網站 flagr.comhttp://www.flagr.com看起來應該是跟Google map有關的Mashup godefy.comhttp://www.godefy.com有關網路行銷公司或產品的比較 lovexpress.frhttp://www.lovexpress.fr法國的交友網站 podomatic.comhttp://podomatic.com專門分享podcasts的網站 pixrat.comhttp://www.pixrat.comSocial picture bookmars，人家del.icio.us做的是書籤，pixrat做的是「圖籤」，其實前陣子出現的diggirl概念就類似Pixrat，都是要收藏美女並且用類似「digg」的方式來推選出本日熱門，不過Pixrat的精神比較接近書籤，比較著重在收藏、分享，而diggirl則是著重在本日最熱門，比較接近digg的概念。（但diggirl同時又搭配幹圖王可以收藏，還滿威的！）]]></description>
			<content:encoded><![CDATA[<p><a title="http://rubycorner.net/articles/22-successful-ruby-on-rails-web-applications/" href="http://rubycorner.net/articles/22-successful-ruby-on-rails-web-applications/">http://rubycorner.net/articles/22-successful-ruby-on-rails-web-applications/</a></p>
<p>這篇文章介紹了22個成功的Ruby on Rails個案，稍微做個簡單的中文翻譯替螢幕前的訪客省點時間好了:)</p>
<p>（另外在<a href="http://happycodr.com/biglist">http://happycodr.com/biglist</a>有更多的網站介紹，共有388個！）</p>
<p>第一部份主要是37signals他們公司所經營的網站，</p>
<ol>
<li>Basecamp<br /><a href="http://www.basecamphq.com">http://www.basecamphq.com</a><br />專案管理網站
<li>Campfire<br /><a href="http://www.campfirenow.com">http://www.campfirenow.com</a><br />即時群組聊天網站
<li>Backpack<br /><a href="http://www.backpackit.com">http://www.backpackit.com</a><br />資訊彙整與行事曆網站
<li>Tadalist<br /><a href="http://www.tadalist.com">http://www.tadalist.com</a><br />簡單好用的Todo List（要做的事）
<li>Writeboard<br /><a href="http://www.writeboard.com">http://www.writeboard.com</a><br />線上共同編輯文件</li>
</ol>
<p>第二部份則是在RubyonRails.org有介紹的網站，</p>
<ol>
<li>43things.com<br /><a href="http://www.43things.com">http://www.43things.com</a><br />這個網站也算是Web 2.0與Ruby on Rails的經典網站，人們可以上去分享自己想做的事情，藉此來找到跟自己有著相同目標的朋友們。
<li>odeo.com<br /><a href="http://odeo.com">http://odeo.com</a><br />音樂分享網站
<li>shopify.com<br /><a href="http://shopify.com">http://shopify.com</a><br />提供使用者快速建立屬於自己的電子商務網站
<li>fluxion<br /><a href="http://www.fluxiom.com">http://www.fluxiom.com</a><br />管理、組織並分想你的數位資產
<li>strongspace.com<br /><a href="http://www.strongspace.com">http://www.strongspace.com</a><br />File hosting檔案分享網站
<li>Typo<br /><a href="http://www.typosphere.org">http://www.typosphere.org</a><br />Blogging engine，這在Ruby on Rails也算是很紅的一套blog系統</li>
</ol>
<p>第三部份應該是筆者自行發現的網站，還滿不錯的～看到好多以前沒逛過的站</p>
<ol>
<li>ajaxed.com<br /><a href="http://www.ajaxed.com">http://www.ajaxed.com</a><br />不需要寫程式即可輕輕鬆鬆在你現有的網站上加上Ajax的效果
<li>atopsites.com<br /><a href="http://atopsites.com">http://atopsites.com</a><br />仿Alaxa.com的網站
<li>asoboo.com<br /><a href="http://asoboo.com">http://asoboo.com</a><br />針對Creative people所設立的社群網站（筆者特別強調該網站是佈署在Win2003）
<li>thebeststuffintheworld<br /><a href="http://www.thebeststuffintheworld.com">http://www.thebeststuffintheworld.com</a><br />有趣的web 2.0應用
<li>dealplumber.com<br /><a href="http://www.dealplumber.com">http://www.dealplumber.com</a><br />另一個有趣的社群網站
<li>digital-tunes.net<br /><a href="http://www.digital-tunes.net">http://www.digital-tunes.net</a><br />專做音樂的電子商務網站
<li>flagr.com<br /><a href="http://www.flagr.com">http://www.flagr.com</a><br />看起來應該是跟Google map有關的Mashup
<li>godefy.com<br /><a href="http://www.godefy.com">http://www.godefy.com</a><br />有關網路行銷公司或產品的比較
<li>lovexpress.fr<br /><a href="http://www.lovexpress.fr">http://www.lovexpress.fr</a><br />法國的交友網站
<li>podomatic.com<br /><a href="http://podomatic.com">http://podomatic.com</a><br />專門分享podcasts的網站
<li>pixrat.com<br /><a href="http://www.pixrat.com">http://www.pixrat.com</a><br />Social picture bookmars，人家del.icio.us做的是書籤，pixrat做的是「<strong>圖籤</strong>」，其實前陣子出現的diggirl概念就類似Pixrat，都是要收藏美女並且用類似「digg」的方式來推選出本日熱門，不過Pixrat的精神比較接近書籤，比較著重在收藏、分享，而diggirl則是著重在本日最熱門，比較接近digg的概念。（但diggirl同時又搭配幹圖王可以收藏，還滿威的！）</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/03/17/22-successful-ruby-on-rails-web-applications/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 10 Ruby on Rails performance tips</title>
		<link>http://punk.tw/2007/03/14/top-10-ruby-on-rails-performance-tips</link>
		<comments>http://punk.tw/2007/03/14/top-10-ruby-on-rails-performance-tips#comments</comments>
		<pubDate>Wed, 14 Mar 2007 06:01:15 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/03/14/top-10-ruby-on-rails-performance-tips/</guid>
		<description><![CDATA[http://www.antoniocangiano.com/articles/2007/02/10/top-10-ruby-on-rails-performance-tips 作者提出十個針對Ruby on Rails Performance的小技巧，有興趣的可以到該網頁參考。 Optimize your Ruby code. Caching is good. Use your database to the full extent of the law. Finders are great but be careful. Group operations in a transaction. Control your controllers. Use HTML for you views. Logging. Patch the GC.(Garbage Collection) A final not, be "performance aware" and work on [...]]]></description>
			<content:encoded><![CDATA[<p><a title="http://www.antoniocangiano.com/articles/2007/02/10/top-10-ruby-on-rails-performance-tips" href="http://www.antoniocangiano.com/articles/2007/02/10/top-10-ruby-on-rails-performance-tips">http://www.antoniocangiano.com/articles/2007/02/10/top-10-ruby-on-rails-performance-tips</a></p>
<p>作者提出十個針對Ruby on Rails Performance的小技巧，有興趣的可以到該網頁參考。</p>
<ol>
<li>Optimize your Ruby code.</li>
<li>Caching is good.</li>
<li>Use your database to the full extent of the law.</li>
<li>Finders are great but be careful.</li>
<li>Group operations in a transaction.</li>
<li>Control your controllers.</li>
<li>Use HTML for you views.</li>
<li>Logging.</li>
<li>Patch the GC.(Garbage Collection)</li>
<li>A final not, be "performance aware" and work on your code with these principle in mind.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/03/14/top-10-ruby-on-rails-performance-tips/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails for Designers</title>
		<link>http://punk.tw/2007/03/08/rails-for-designers</link>
		<comments>http://punk.tw/2007/03/08/rails-for-designers#comments</comments>
		<pubDate>Wed, 07 Mar 2007 17:14:33 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/03/08/rails-for-designers/</guid>
		<description><![CDATA[http://glu.ttono.us/articles/2006/03/21/rails-for-designers 這是一篇寫給為Rails環境做視覺設計、美工設計的網頁設計師看的文章。作者簡單地介紹了MVC架構，也就是Ruby on Rails最基本的架構，隨後開始介紹Layouts的概念以及如何在網頁中插入Ruby on Rails所產生的動態網頁內容。 說實在文章的後半段對於"純"美工人員應該還是有點艱澀，不過還是有其參考價值。 P.S. 可能是我英文不好，說不定這篇文章是要讓那些有意從事程式設計的美工人員看的XD]]></description>
			<content:encoded><![CDATA[<p><a title="http://glu.ttono.us/articles/2006/03/21/rails-for-designers" href="http://glu.ttono.us/articles/2006/03/21/rails-for-designers">http://glu.ttono.us/articles/2006/03/21/rails-for-designers</a></p>
<p>這是一篇寫給為Rails環境做視覺設計、美工設計的網頁設計師看的文章。作者簡單地介紹了MVC架構，也就是Ruby on Rails最基本的架構，隨後開始介紹Layouts的概念以及如何在網頁中插入Ruby on Rails所產生的動態網頁內容。</p>
<p>說實在文章的後半段對於"純"美工人員應該還是有點艱澀，不過還是有其參考價值。</p>
<p>P.S. 可能是我英文不好，說不定這篇文章是要讓那些有意從事程式設計的美工人員看的XD</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/03/08/rails-for-designers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Real: The Book by 37signals</title>
		<link>http://punk.tw/2007/03/06/getting-real-the-book-by-37signals</link>
		<comments>http://punk.tw/2007/03/06/getting-real-the-book-by-37signals#comments</comments>
		<pubDate>Tue, 06 Mar 2007 04:53:54 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/03/06/getting-real-the-book-by-37signals/</guid>
		<description><![CDATA[好書推薦，Web 2.0創業家絕對要讀的一本好書！ 網址：https://gettingreal.37signals.com/線上免費全文：http://gettingreal.37signals.com/toc.php 今天逛到這網站的時候心想：「這麼好的書我怎麼現在才看到？」簡單來說就是相見恨晚，雖然說目前Ruby on Rails的相關書籍越來越多，甚至在Amazon上可以看到很多尚未出版的Rails相關書籍都有更深入的內涵，但要找到真正透徹Ruby on Rails精神的好書實在不容易（不過也有可能我都只是翻翻，沒有深入研究XD） Anyway, Getting Real這本書網站上提到「Discover the smarter, faster, easier way to build a successful web-based application.」這就是Ruby on Rails的精神以及最吸引我的地方。 簡單來說，這本書是37Signals的成功經驗分享寶典，對於想要從事Web 2.0創業、創新的朋友，絕對是值得一讀的好書。 這本書可以在網路上免費觀看全文，也可以線上購買PDF版本或是paperback；其中比較特別的是，如果線上購買PDF版本，書本中每一頁都會出現購買者的名字，還滿酷的。 關於這本書的相關資訊，可以參考Getting Real 學習筆記，有完整的筆記，內容相當豐富！目前也有人正在從事Getting Real的中文翻譯工作，有興趣的朋友也可以參考Getting Real中文版協同翻譯的計劃。]]></description>
			<content:encoded><![CDATA[<h1>好書推薦，Web 2.0創業家絕對要讀的一本好書！</h1>
<p>網址：<a title="https://gettingreal.37signals.com/" href="https://gettingreal.37signals.com/">https://gettingreal.37signals.com/</a><br />線上免費全文：<a title="http://gettingreal.37signals.com/toc.php" href="http://gettingreal.37signals.com/toc.php">http://gettingreal.37signals.com/toc.php</a></p>
<p>今天逛到這網站的時候心想：「這麼好的書我怎麼現在才看到？」簡單來說就是相見恨晚，雖然說目前Ruby on Rails的相關書籍越來越多，甚至在Amazon上可以看到很多尚未出版的Rails相關書籍都有更深入的內涵，但要找到真正透徹Ruby on Rails精神的好書實在不容易（不過也有可能我都只是翻翻，沒有深入研究XD）</p>
<p>Anyway, Getting Real這本書網站上提到「Discover the smarter, faster, easier way to build a successful web-based application.」這就是Ruby on Rails的精神以及最吸引我的地方。</p>
<p>簡單來說，這本書是37Signals的成功經驗分享寶典，<strong>對於想要從事Web 2.0創業、創新的朋友，絕對是值得一讀的好書</strong>。</p>
<p>這本書可以在<strong>網路上免費觀看全文</strong>，也可以線上購買PDF版本或是paperback；其中比較特別的是，如果線上購買PDF版本，書本中每一頁都會出現購買者的名字，還滿酷的。</p>
<p>關於這本書的相關資訊，可以參考<a href="http://indigos.cn/archives/46">Getting Real 學習筆記</a>，有完整的筆記，內容相當豐富！目前也有人正在從事Getting Real的中文翻譯工作，有興趣的朋友也可以參考<a href="http://groups-beta.google.com/group/getting-real-chinese">Getting Real中文版協同翻譯的計劃</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/03/06/getting-real-the-book-by-37signals/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flexible Rails</title>
		<link>http://punk.tw/2007/03/06/flexible-rails</link>
		<comments>http://punk.tw/2007/03/06/flexible-rails#comments</comments>
		<pubDate>Tue, 06 Mar 2007 03:28:15 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/03/06/flexible-rails/</guid>
		<description><![CDATA[初次看到「Flexible Rails」的時候，還以為只是另外一本介紹Ruby on Rails的書，沒想到這裡的Flexible是Adobe的Flex。Flexible Rails的網站上可以看到「A PDF-only Book about using Ruby on Rails 1.1 or 1.2 and Adobe Flex 2 together to build next-generation rich Internet applications」，感覺上還滿有趣的，有機會應該搞一本來翻翻看。 網址：http://flexiblerails.com/]]></description>
			<content:encoded><![CDATA[<p>初次看到「Flexible Rails」的時候，還以為只是另外一本介紹Ruby on Rails的書，沒想到這裡的Flexible是Adobe的Flex。Flexible Rails的網站上可以看到「A PDF-only Book about using Ruby on <strong>Rails 1.1 or 1.2 and Adobe Flex 2 together to build next-generation rich Internet applications</strong>」，感覺上還滿有趣的，有機會應該搞一本來翻翻看。</p>
<p>網址：<a title="http://flexiblerails.com/" href="http://flexiblerails.com/">http://flexiblerails.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/03/06/flexible-rails/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FAQ: 在Rails中如何確定是Ajax在呼叫？</title>
		<link>http://punk.tw/2007/01/31/faq-%e5%9c%a8rails%e4%b8%ad%e5%a6%82%e4%bd%95%e7%a2%ba%e5%ae%9a%e6%98%afajax%e5%9c%a8%e5%91%bc%e5%8f%ab%ef%bc%9f</link>
		<comments>http://punk.tw/2007/01/31/faq-%e5%9c%a8rails%e4%b8%ad%e5%a6%82%e4%bd%95%e7%a2%ba%e5%ae%9a%e6%98%afajax%e5%9c%a8%e5%91%bc%e5%8f%ab%ef%bc%9f#comments</comments>
		<pubDate>Tue, 30 Jan 2007 17:56:26 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/01/31/faq-%e5%9c%a8rails%e4%b8%ad%e5%a6%82%e4%bd%95%e7%a2%ba%e5%ae%9a%e6%98%afajax%e5%9c%a8%e5%91%bc%e5%8f%ab%ef%bc%9f/</guid>
		<description><![CDATA[這個技巧在「Ajax Hacks」書中有說明，非常簡單，只要在action裡面加上 if @request.xml_http_request?()來判斷即可。 我覺得這技巧非常實用，舉例來說，我最近在寫的程式牽涉到大量的資料存取， 假設我沒有在action裡面先確定是Ajax在前端做XHR就直接開始動作，若遭有心人士 以程式不斷對我的server發出request很有可能就會癱瘓我的資料庫（有這麼嚴重嗎XD）。 例如： def create &#160;&#160;if @request.xml_http_request?() &#160;&#160;&#160;&#160;#要執行的程式區塊 &#160;&#160;&#160;&#160;#............ &#160;&#160;end end]]></description>
			<content:encoded><![CDATA[<p>這個技巧在「Ajax Hacks」書中有說明，非常簡單，只要在action裡面加上</p>
<p><code>if @request.xml_http_request?()</code>來判斷即可。</p>
<p>我覺得這技巧非常實用，舉例來說，我最近在寫的程式牽涉到大量的資料存取， 假設我沒有在action裡面先確定是Ajax在前端做XHR就直接開始動作，若遭有心人士 以程式不斷對我的server發出request很有可能就會癱瘓我的資料庫（有這麼嚴重嗎XD）。 </p>
<p>例如：  <code>def create<br />
&nbsp;&nbsp;if @request.xml_http_request?()<br />
&nbsp;&nbsp;&nbsp;&nbsp;#要執行的程式區塊<br />
&nbsp;&nbsp;&nbsp;&nbsp;#............<br />
&nbsp;&nbsp;end<br />
end<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/01/31/faq-%e5%9c%a8rails%e4%b8%ad%e5%a6%82%e4%bd%95%e7%a2%ba%e5%ae%9a%e6%98%afajax%e5%9c%a8%e5%91%bc%e5%8f%ab%ef%bc%9f/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails Books List</title>
		<link>http://punk.tw/2007/01/15/ruby-on-rails-books-list</link>
		<comments>http://punk.tw/2007/01/15/ruby-on-rails-books-list#comments</comments>
		<pubDate>Mon, 15 Jan 2007 12:59:39 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/01/15/ruby-on-rails-books-list/</guid>
		<description><![CDATA[Ruby on Rails書單 稍微整理了一下目前市面上的Ruby &#38; Ruby on Rails相關書籍：（外文書直接Link到Amazon.com，中文書連到博客來網路書店） 外文 Agile Web Development, Pragmatic Bookshelf Ajax on Rails, O'Reilly Ruby Cookbook, O'Reilly Rails Recipes, Pragmatic Bookshelf Ruby for Rails: Ruby Techniques for Rails Developers, Manning Publications Ruby on Rails: Up and Running, O'Reilly Enterprise Integration with Ruby, O'Reilly Ruby In A Nutshell, O'Reilly The Ruby Way, [...]]]></description>
			<content:encoded><![CDATA[<h1>Ruby on Rails書單</h1>
<p>稍微整理了一下目前市面上的Ruby &amp; Ruby on Rails相關書籍：（外文書直接Link到Amazon.com，中文書連到博客來網路書店）</p>
<h1>外文</h1>
<ul>
<li><a href="http://www.amazon.com/Agile-Development-Rails-Dave-Thomas/dp/0977616630/sr=8-7/qid=1168863614/ref=pd_bbs_sr_7/103-0801685-4827822?ie=UTF8&amp;s=books">Agile Web Development, Pragmatic Bookshelf</a>
<li><a href="http://www.amazon.com/Ajax-Rails-Scott-Raymond/dp/0596527446">Ajax on Rails, O'Reilly</a>
<li><a href="http://www.amazon.com/Cookbook-Cookbooks-OReilly-Lucas-Carlson/dp/0596523696/ref=pd_sim_b_5/103-0801685-4827822">Ruby Cookbook, O'Reilly</a>
<li><a href="http://www.amazon.com/Rails-Recipes-Pragmatic-Programmers-Fowler/dp/0977616606/ref=pd_sxp_grid_i_0_2/103-0801685-4827822">Rails Recipes, Pragmatic Bookshelf</a>
<li><a href="http://www.amazon.com/Ruby-Rails-Techniques-Developers/dp/1932394699/ref=pd_sxp_grid_pt_1_0/103-0801685-4827822">Ruby for Rails: Ruby Techniques for Rails Developers, Manning Publications</a>
<li><a href="http://www.amazon.com/Ruby-Rails-Running-Bruce-Tate/dp/0596101325/ref=pd_sxp_grid_i_2_1/103-0801685-4827822">Ruby on Rails: Up and Running, O'Reilly</a>
<li><a href="http://www.amazon.com/Enterprise-Integration-Ruby-Maik-Schmidt/dp/0976694069/ref=pd_sxp_grid_i_2_2/103-0801685-4827822">Enterprise Integration with Ruby, O'Reilly</a>
<li><a href="http://www.amazon.com/Ruby-Nutshell-Yukihiro-Matsumoto/dp/0596002149/ref=pd_sxp_grid_i_0_0/103-0801685-4827822">Ruby In A Nutshell, O'Reilly</a>
<li><a href="http://www.amazon.com/Ruby-Way-Second-Addison-Wesley-Professional/dp/0672328844/ref=pd_sxp_grid_i_2_0/103-0801685-4827822">The Ruby Way, Second Edition: Solutions and Techniques in Ruby Programming, Addison-Wesley Professional</a>
<li><a href="http://www.amazon.com/Beginning-Rails-Steve-Ph-D-Holzner/dp/0470069155/sr=1-6/qid=1168864218/ref=sr_1_6/103-0801685-4827822?ie=UTF8&amp;s=books">Beginning Ruby on Rails, Wrox</a>
<li><a href="http://www.amazon.com/Beginning-Ruby-Rails-E-Commerce-Professional/dp/1590597362/sr=1-9/qid=1168864218/ref=sr_1_9/103-0801685-4827822?ie=UTF8&amp;s=books">Beginning Ruby on Rails E-Commerce: From Novice to Professional, Apress</a>
<li><a href="http://www.amazon.com/Hacking-Ruby-Rails-Real-World/dp/1932394745/sr=1-16/qid=1168864403/ref=sr_1_16/103-0801685-4827822?ie=UTF8&amp;s=books">Hacking with Ruby: Ruby and Rails for the Real World, Manning Publications</a>
<li><a href="http://www.amazon.com/Programming-Ruby-Pragmatic-Programmers-Second/dp/0974514055/sr=1-1/qid=1168864513/ref=pd_bbs_sr_1/103-0801685-4827822?ie=UTF8&amp;s=books">Programming Ruby, Pragmatic Bookshelf</a>
<li><a href="http://www.amazon.com/Beyond-Java-Bruce-Tate/dp/0596100949/ref=pd_sxp_grid_pt_1_1/103-0801685-4827822">Beyond Java, O'Reilly</a>（這本挺適合當閒書看的，才180多頁很快就翻完了。）
<li><a href="http://www.amazon.com/Best-Ruby-Quiz-Pragmatic-Programmers/dp/0976694077/ref=pd_sxp_grid_pt_1_0/103-0801685-4827822">Best of Ruby Quiz, Pragmatic Bookshelf</a>
<li><a href="http://www.amazon.com/Rails-Java-Developers-Stuart-Halloway/dp/097761669X">Rails for Java Developers, Pragmatic Bookshelf</a>（O'Reilly也有一本<a href="http://www.oreilly.com/catalog/097761669X/">Rails for Java Developers</a>）
<li><a href="http://www.amazon.com/Java-Ruby-Manager-Pragmatic-Programmers/dp/0976694093">From Java to Ruby: Things Every Manager Should Know, Pragmatic Bookshelf</a>（用來說服你的老闆Ruby on Rails也是個不錯的solution!）</li>
</ul>
<p>以上這些是在網路上看過的，天瓏應該也都有賣；以下是在Amazon.com找到，但幾乎都未上市</p>
<ul>
<li><a href="http://www.amazon.com/Ruby-Rails-Dummies-Computer-Tech/dp/0470081201/sr=1-7/qid=1168864552/ref=sr_1_7/103-0801685-4827822?ie=UTF8&amp;s=books">Ruby on Rails for Dummies, For Dummies</a>（這本很新喔！2007年一月出版的）
<li><a href="http://www.amazon.com/Build-Your-Ruby-Rails-Application/dp/0975841955/sr=1-9/qid=1168864552/ref=sr_1_9/103-0801685-4827822?ie=UTF8&amp;s=books">Build Your Own Ruby on Rails Web Application, SitePoint</a>（未上市，開放預購）
<li><a href="http://www.amazon.com/Ruby-Rails-Power-Comprehensive-Guides/dp/1598632167/sr=1-12/qid=1168864552/ref=sr_1_12/103-0801685-4827822?ie=UTF8&amp;s=books">Ruby on Rails Power!: The Comprehensive Guide, Course Technology PTR</a>（未上市，開放預購）
<li><a href="http://www.amazon.com/Rails-Solutions-Ruby-Made-Easy/dp/1590597524/sr=1-10/qid=1168864552/ref=sr_1_10/103-0801685-4827822?ie=UTF8&amp;s=books">Rails Solutions: Ruby on Rails Made Easy, friends of ED</a>
<li><a href="http://www.amazon.com/Practical-Rails-Social-Networking-Sites/dp/1590598415/sr=1-11/qid=1168864552/ref=sr_1_11/103-0801685-4827822?ie=UTF8&amp;s=books">Practical Ruby on Rails Social Networking Sites, Apress</a>（開放預購中）
<li><a href="http://www.amazon.com/Pro-Ruby-Rails-Enterprise-Solutions/dp/1590598121/sr=1-13/qid=1168864823/ref=sr_1_13/103-0801685-4827822?ie=UTF8&amp;s=books">Pro Ruby on Rails: Building Enterprise Solutions, Apress</a>
<li><a href="http://www.amazon.com/Pro-ActiveRecord-Ruby-Databases-Rails/dp/1590598474/sr=1-14/qid=1168864823/ref=sr_1_14/103-0801685-4827822?ie=UTF8&amp;s=books">Pro ActiveRecord for Ruby: Databases with Ruby on Rails, Apress</a><br />（最後三本Apress出版的還滿讓人期待的！）</li>
</ul>
<h1>中文</h1>
<ul>
<li><a href="http://www.books.com.tw/exep/prod/booksfile.php?item=0010325997">超越Java：探討程式語言的未來， O'Reilly</a>（Beyond Java的翻譯本，連我們政大圖書館都有得借XD）
<li><a href="http://www.books.com.tw/exep/prod/booksfile.php?item=0010353127">Ruby on Rails網路應用程式開發與建置，博碩</a>（翻譯自日本人的書）
<li><a href="http://www.books.com.tw/exep/prod/booksfile.php?item=0010350699">Ruby Programming，博碩</a>（翻譯自日本人的書）
<li><a href="http://www.books.com.tw/exep/prod/booksfile.php?item=0010345040">Ruby on Rails：建置與執行，O'Reilly</a>（翻譯自Ruby on Rails: Up and Running，嗯...不太推薦）</li>
</ul>
<p>除了上面這些書籍，其實像是Ajax Hacks裡面也有一個章節在談Ruby on Rails；或是像網路上資源應該也滿豐富的，例如<a href="http://rails.homelinux.org/">Four Days on Rails</a>。（有關Four Days on Rails可參考我寫的「<a href="http://punk.tw/2007/01/03/four-days-on-rails/">Four Days on Rails</a>」有簡單的介紹）。</p>
<p>另外，網路上也有許多Tutorials可以參考，可參考「<a href="http://punk.tw/2006/12/02/top-12-ruby-on-rails-tutorials/">Top 12 Ruby on Rails Tutorials</a>」。</p>
<p>註：好不容易盼到天瓏再次進了「Agile Web Development 2/e」，毫不猶豫馬上衝去買了一本！雖然說也是有其他選擇，但Dava Thomas這本真的是讓我覺得不買可惜啊！尤其是每次看了下面這張照片，更讓我覺得改天應該要衝一下Programming Ruby。<img class="reflect" height="412" src="http://punk.tw/wp-content/uploads/2006/12/108506780_51b867e50d.jpg" width="500"></p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/01/15/ruby-on-rails-books-list/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rails.vim Cheat Sheet</title>
		<link>http://punk.tw/2007/01/15/railsvim-cheat-sheet</link>
		<comments>http://punk.tw/2007/01/15/railsvim-cheat-sheet#comments</comments>
		<pubDate>Mon, 15 Jan 2007 10:07:14 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/01/15/railsvim-cheat-sheet/</guid>
		<description><![CDATA[今天在「Rails.vimのチートシート」發現的Rails.vim的Cheat Sheet（小抄？！），整理了使用Rails.vim的指令，print一張出來擺在旁邊隨時參考應該還挺方便的！需要的可以到http://d.hatena.ne.jp/moro/20061019/1161273221這個頁面下載:)，檔案是PDF格式的。 截圖：]]></description>
			<content:encoded><![CDATA[<p>今天在「<a href="http://d.hatena.ne.jp/moro/20061019/1161273221">Rails.vimのチートシート</a>」發現的Rails.vim的Cheat Sheet（小抄？！），整理了使用Rails.vim的指令，print一張出來擺在旁邊隨時參考應該還挺方便的！需要的可以到<a title="http://d.hatena.ne.jp/moro/20061019/1161273221" href="http://d.hatena.ne.jp/moro/20061019/1161273221">http://d.hatena.ne.jp/moro/20061019/1161273221</a>這個頁面下載:)，檔案是PDF格式的。</p>
<p>截圖：</p>
<p><a href="http://punk.tw/wp-content/uploads/2007/01/WindowsLiveWriter/Rails.vimCheatSheet_FDEC/image%7B0%7D%5B4%5D.png" atomicselection="true"><img height="84" src="http://punk.tw/wp-content/uploads/2007/01/WindowsLiveWriter/Rails.vimCheatSheet_FDEC/image%7B0%7D_thumb%5B2%5D.png" width="240"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/01/15/railsvim-cheat-sheet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails.vim General Commands</title>
		<link>http://punk.tw/2007/01/15/railsvim-general-commands</link>
		<comments>http://punk.tw/2007/01/15/railsvim-general-commands#comments</comments>
		<pubDate>Sun, 14 Jan 2007 17:34:24 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/01/15/railsvim-general-commands/</guid>
		<description><![CDATA[Rails.vim常用指令列表 網路上好像找不到完整的中文指令列表，雖然說其實也沒什麼好列表的，有問題在vim裡面就可以看help了，不過這邊還是稍微整理一下，供各位參考。 :Rails {directory}：建立一個新的Rails應用程式，並且讀取README檔案。 :Rake {targets}：跟console的用法一樣，例如直接在vim裡面:Rake migrate :Rcd {directory}：切換目錄 :Rlcd {directory}：切換目錄 :Rdoc：瀏覽Rails的API文件，還滿方便的！ :Rdoc!：相當於:help rails，直接觀看rails.vim的說明文件 :Redit {file}：直接輸入檔名，rails.vim會替你找到對應的檔案 從help裡面還有一堆指令，不過我都不太熟，還是先別亂寫的好orz，目前我會用到的大概也就這幾個了，日後有更多體會再補充！]]></description>
			<content:encoded><![CDATA[<h1>Rails.vim常用指令列表</h1>
<p>網路上好像找不到完整的中文指令列表，雖然說其實也沒什麼好列表的，有問題在vim裡面就可以看help了，不過這邊還是稍微整理一下，供各位參考。</p>
<ul>
<li>:Rails {directory}：建立一個新的Rails應用程式，並且讀取README檔案。
<li>:Rake {targets}：跟console的用法一樣，例如直接在vim裡面:Rake migrate
<li>:Rcd {directory}：切換目錄
<li>:Rlcd {directory}：切換目錄
<li>:Rdoc：瀏覽Rails的API文件，還滿方便的！
<li>:Rdoc!：相當於:help rails，直接觀看rails.vim的說明文件
<li>:Redit {file}：直接輸入檔名，rails.vim會替你找到對應的檔案</li>
</ul>
<p>從help裡面還有一堆指令，不過我都不太熟，還是先別亂寫的好orz，目前我會用到的大概也就這幾個了，日後有更多體會再補充！</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/01/15/railsvim-general-commands/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Install Rails.vim</title>
		<link>http://punk.tw/2007/01/15/howto-install-railsvim</link>
		<comments>http://punk.tw/2007/01/15/howto-install-railsvim#comments</comments>
		<pubDate>Sun, 14 Jan 2007 16:03:09 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/01/15/howto-install-railsvim/</guid>
		<description><![CDATA[其實這是延續一篇很久以前的文章（剛好一個月前，再次發現自己一個月沒啥進展orz）：「HOWTO:在DreamHost主機上安裝Vim 7.0 Editor」，裝好vim之後，接著安裝Rails.vim便可在相當有效率的工作環境下開發rails app. 首先請到http://www.vim.org/scripts/script.php?script_id=1567下載壓縮檔：點此下載。 將檔案解壓縮之後，放到Home Directory的.vim資料夾（$HOME/.vim），例如/home/deduce/.vim（壓縮檔內有兩個目錄，plugin跟doc） 進入vim 輸入「:helptags ~/.vim/doc」 如此一來您的vim變支援rails.vim，如果要看輔助說明檔案，只需輸入:help rails便會出現完整的文件說明。 註：若是Windows環境，請將檔案解壓縮到vimfiles資料夾。]]></description>
			<content:encoded><![CDATA[<p>其實這是延續一篇很久以前的文章（剛好一個月前，再次發現自己一個月沒啥進展orz）：「<a href="http://punk.tw/2006/12/13/howto%e5%9c%a8dreamhost%e4%b8%bb%e6%a9%9f%e4%b8%8a%e5%ae%89%e8%a3%9dvim-70-editor/">HOWTO:在DreamHost主機上安裝Vim 7.0 Editor</a>」，裝好vim之後，接著安裝Rails.vim便可在相當有效率的工作環境下開發rails app.</p>
<ol>
<li>首先請到<a title="http://www.vim.org/scripts/script.php?script_id=1567" href="http://www.vim.org/scripts/script.php?script_id=1567">http://www.vim.org/scripts/script.php?script_id=1567</a>下載壓縮檔：<a href="http://www.vim.org/scripts/download_script.php?src_id=6582">點此下載</a>。</li>
<li>將檔案解壓縮之後，放到Home Directory的.vim資料夾（$HOME/.vim），例如/home/deduce/.vim（壓縮檔內有兩個目錄，plugin跟doc）</li>
<li>進入vim</li>
<li>輸入「:helptags ~/.vim/doc」</li>
</ol>
<p>如此一來您的vim變支援rails.vim，如果要看輔助說明檔案，只需輸入:help rails便會出現完整的文件說明。</p>
<p>註：若是Windows環境，請將檔案解壓縮到vimfiles資料夾。</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/01/15/howto-install-railsvim/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FAQ: Lost connection to MySQL server during query</title>
		<link>http://punk.tw/2007/01/14/faq-lost-connection-to-mysql-server-during-query</link>
		<comments>http://punk.tw/2007/01/14/faq-lost-connection-to-mysql-server-during-query#comments</comments>
		<pubDate>Sun, 14 Jan 2007 14:48:16 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[FAQ]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/01/14/faq-lost-connection-to-mysql-server-during-query/</guid>
		<description><![CDATA[今天第一次在Ubuntu Linux上寫rails一開始就遇到錯誤訊息：「Lost connection to MySQL server during query: SELECT version FROM schema_info」，好不容易找到solution結果我的Ubuntu出問題，搞了一陣子才解決。（所以手邊有多台主機是幸福的，我還有另外兩台機器可以讓我專心寫程式XD） 如果是在Ubuntu Linux上要解決這個問題相當簡單，基本上只要輸入下列指令： apt-get install libmysql-ruby 應該就可以順利連線了。 註：我之前在Ubuntu上安裝Ruby on Rails是用apt-get install rails, 再安裝gem, MySQL則是本來就有安裝，因而忘了另外安裝libmysql-ruby。（這篇真是沒什麼建設性，不過我想總會有人跟我遇到一樣的問題的orz）]]></description>
			<content:encoded><![CDATA[<p>今天第一次在Ubuntu Linux上寫rails一開始就遇到錯誤訊息：「<strong>Lost connection to MySQL server during query: SELECT version FROM schema_info</strong>」，好不容易找到solution結果我的Ubuntu出問題，搞了一陣子才解決。（所以手邊有多台主機是幸福的，我還有另外兩台機器可以讓我專心寫程式XD）</p>
<p>如果是在Ubuntu Linux上要解決這個問題相當簡單，基本上只要輸入下列指令：</p>
<p><em>apt-get install libmysql-ruby</em></p>
<p>應該就可以順利連線了。</p>
<p>註：我之前在Ubuntu上安裝Ruby on Rails是用apt-get install rails, 再安裝gem, MySQL則是本來就有安裝，因而忘了另外安裝libmysql-ruby。（這篇真是沒什麼建設性，不過我想總會有人跟我遇到一樣的問題的orz）</p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/01/14/faq-lost-connection-to-mysql-server-during-query/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YouTube: Ruby on Rails, vim, and rails.vim</title>
		<link>http://punk.tw/2007/01/14/youtube-ruby-on-rails-vim-and-railsvim</link>
		<comments>http://punk.tw/2007/01/14/youtube-ruby-on-rails-vim-and-railsvim#comments</comments>
		<pubDate>Sun, 14 Jan 2007 14:29:25 +0000</pubDate>
		<dc:creator>deduce</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://punk.tw/2007/01/14/youtube-ruby-on-rails-vim-and-railsvim/</guid>
		<description><![CDATA[這個影片雖然模糊，不過卻展示了用vim來開發RoR Application的速度。雖然Mac的Textmate看了讓人很心動，不過目前應該沒那種財力為了Textmate衝一台MacBook回來把玩XD 今天試玩了一下用vim搭配rails.vim來寫rails，雖然還不太習慣，不過基本上還蠻方便的，上手之後應該能更有效提高生產力！ 關於使用vim開發rails，可以參考下列網址：Vim 開發 ruby on rails 完全配置(個人)：http://www.upulife.com/leo/?p=196]]></description>
			<content:encoded><![CDATA[<p>這個影片雖然模糊，不過卻展示了用vim來開發RoR Application的速度。雖然Mac的Textmate看了讓人很心動，不過目前應該沒那種財力為了Textmate衝一台MacBook回來把玩XD</p>
<p>今天試玩了一下用vim搭配rails.vim來寫rails，雖然還不太習慣，不過基本上還蠻方便的，上手之後應該能更有效提高生產力！</p>
<p>關於使用vim開發rails，可以參考下列網址：<br /><a href="http://www.upulife.com/leo/?p=196">Vim 開發 ruby on rails 完全配置(個人)</a>：<a title="http://www.upulife.com/leo/?p=196" href="http://www.upulife.com/leo/?p=196">http://www.upulife.com/leo/?p=196</a></p>
<p><embed src="http://www.youtube.com/v/30P8DSNOZuU" width="425" height="350" type="application/x-shockwave-flash" wmode="transparent"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://punk.tw/2007/01/14/youtube-ruby-on-rails-vim-and-railsvim/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

