<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>ruby-and-rails &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/ruby-and-rails/</link>
	<description>Feed of posts on WordPress.com tagged "ruby-and-rails"</description>
	<pubDate>Thu, 23 May 2013 11:01:26 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Wot's this - #4]]></title>
<link>http://ajmansfield.wordpress.com/2011/11/13/whats-this-4/</link>
<pubDate>Sun, 13 Nov 2011 11:16:59 +0000</pubDate>
<dc:creator>ajmansfield</dc:creator>
<guid>http://ajmansfield.wordpress.com/2011/11/13/whats-this-4/</guid>
<description><![CDATA[Redis key value pair tutorial &#8211; Redis is often described as a Key Value storage engine. Use th]]></description>
<content:encoded><![CDATA[<p><a href="http://openmymind.net/2011/11/8/Redis-Zero-To-Master-In-30-Minutes-Part-1/" title="Redis key value pair" target="_blank">Redis key value pair tutorial</a> &#8211; Redis is often described as a Key Value storage engine.  Use this tutorial to get up to speed in 30 min</p>
<p><a href="http://vallettaventures.tumblr.com/railside" title="RailsIde">RailsIde</a> &#8211; RailSide is OS X’s first native Ruby on Rails editor</p>
<p><a href="http://code.google.com/p/growl/source/checkout" rel="nofollow">http://code.google.com/p/growl/source/checkout</a><a href="http://code.google.com/p/growl/source/checkout" title="Growl Source" target="_blank">Growl Soource</a> &#8211; open source link to Growl hosted on Google. (Need Mecurial to get the code)</p>
<p><a href="http://oauth.net/code/" title="Oauth" target="_blank">Oauth</a> &#8211; OAuth attempts to provide a standard way for developers to offer their services via an API without forcing their users to expose their passwords (and other credentials)</p>
<p><a href="http://www.rubyinside.com/deploy-blog-with-toto-and-heroku-2962.html" title="Rails blog with toto" target="_blank">Rails blog with toto</a> &#8211; a light weight Ruby and Rack based blogging engine.  Content is managed by Git (ie its version controlled)</p>
<p><a href="http://www.rubyinside.com/jekyll-a-ruby-powered-static-site-generator-2716.html" title="Ruby powered static site generator" target="_blank">Ruby powered static site generator</a> &#8211; focused around bloggin, but can generate any static content</p>
<p><a href="http://www.rubyinside.com/reprise-a-ruby-powered-blogging-app-in-100-lines-including-templates-646.html" title="Sinatra blogging system" target="_blank">Sinatra blogging system</a> exampe for using Siniatra, the mini framework for non-MVC applications</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[installing ruby &amp; rubyOnRails in ubuntu]]></title>
<link>http://starodubtsevss.wordpress.com/2011/03/05/installing-ruby-rubyonrails-in-ubuntu/</link>
<pubDate>Sat, 05 Mar 2011 14:31:18 +0000</pubDate>
<dc:creator>starodubtsevss</dc:creator>
<guid>http://starodubtsevss.wordpress.com/2011/03/05/installing-ruby-rubyonrails-in-ubuntu/</guid>
<description><![CDATA[Ubuntu 10.10, ruby 1.9.2, rubyonrails 3.0.x. ﻿######### INSTALLING ############## #First, let’s inst]]></description>
<content:encoded><![CDATA[<p>Ubuntu 10.10, ruby 1.9.2, rubyonrails 3.0.x.</p>
<p><strong>﻿######### INSTALLING ##############</strong></p>
<p><strong> </strong><br />
#First, let’s install all of the necessary tools and libraries:<br />
<strong>apt-get install curl git-core build-essential zlib1g-dev libssl-dev libreadline5-dev</strong></p>
<p>#Install ruby 1.9.2 using RVM. Refer to the official RVM instructions here. Make sure you have curl #and git installed (from above) and run this command:<br />
<strong>bash &#60; &#60;( curl <a href="http://rvm.beginrescueend.com/releases/rvm-install-head" rel="nofollow">http://rvm.beginrescueend.com/releases/rvm-install-head</a> )</strong></p>
<p>#Then add this line as the last line to your .bashrc:<br />
<strong>source &#8220;$HOME/.rvm/scripts/rvm&#8221;</strong></p>
<p>#Close your terminal and open a new one, then run the following to test your RVM&#8217;s installation:<br />
<strong>rvm notes</strong></p>
<p>#Next, you can begin ruby 1.9.2 installation by running:<br />
<strong>rvm install 1.9.2</strong></p>
<p>#The install will take up to several minutes and once it completes you have to set ruby 1.9.2 as the #default version:<br />
<strong>rvm &#8211;default ruby-1.9.2</strong></p>
<p>#Then you can test your new ruby install:ruby -v<br />
<strong>#install railsgem install rails</strong></p>
<p>#that&#8217;s all! (minimum settings)</p>
<p><strong>######## GEM -PACKAGINGs #######</strong></p>
<p>#RuvyGems &#8211; slike Maven repository or like apt-get in Ubuntu</p>
<p># shows all gems (all plugins avaliable for RoR)<br />
<strong>gem list &#8211;local</strong><br />
<strong>gem list &#8211;remote</strong></p>
<p>#search by &#8220;STRING&#8221; in the <em>remote</em> repository<br />
<strong>gem search STRING &#8211;remote</strong></p>
<p>#do this just in case, and look at the output:<br />
<strong>gem install rubygems-update</strong><br />
<strong> update_rubygems</strong></p>
<p><strong><br />
</strong></p>
<p><strong>######### CREATING AND LAUNCH A NEW APP #########</strong></p>
<p>i may recommend to use <em>rubymine ide</em>, but you should know how create your app in command line:</p>
<p><strong>rails new YOUR_APP_PATH</strong></p>
<p>#start<br />
<strong>cd YOUR_APP_PATH<br />
rails server </strong></p>
<p>#launch app<br />
<strong>rails s</strong><br />
#or (if you want to set the port by yourself)<br />
<strong>rails s &#8211;port 8080</strong></p>
<p>#open your browser and type there &#8211; this is your aplication:<br />
<strong><a href="http://127.0.0.1:3000/" rel="nofollow">http://127.0.0.1:3000/</a></strong></p>
<p><strong>########### CHANGING DB for your app ###########</strong></p>
<p>#i suppose you would like to work with mysql database instead of using default one (which is defined in your_app_path/config/database.yml )<br />
so, in order to switch the db for your project, you should:</p>
<ol>
<li>edit tht file database.yml like this:<br />
<strong> development:<br />
adapter: mysql2<br />
encoding: utf8<br />
reconnect: false<br />
database: myproject_development<br />
pool: 5<br />
username: root<br />
password:<br />
socket: /var/run/mysqld/mysqld.sock</strong>&#160;</p>
<p>#do it for all databases not only for development one (if you wish)<br />
#by the way: Ruby on Rails recommends to create three databases<br />
1. myproject_development<br />
2. myproject_production<br />
3. myproject_test</li>
<li> add some libs and gems.. for mysql support<br />
<strong>sudo apt-get install libmysqlclient-dev<br />
gem install mysql2</strong></li>
<li>add new line to your project&#8217;s folder<br />
to file: Gemfile<br />
line: gem &#8216;mysql2&#8242;<br />
#it means that you are going to use this module/gem in your project</li>
<li> create the databases for your project<br />
<strong>cd your_app_path<br />
rake db:create</strong><br />
#it will create 2 databases &#8211; for development and for tests</li>
</ol>
		<div id="geo-post-1381" class="geo geo-post" style="display: none">
			<span class="latitude">49.850000</span>
			<span class="longitude">24.016667</span>
		</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ruby on rails - first steps]]></title>
<link>http://starodubtsevss.wordpress.com/2011/03/03/ruby-on-rails-first-steps/</link>
<pubDate>Thu, 03 Mar 2011 15:32:57 +0000</pubDate>
<dc:creator>starodubtsevss</dc:creator>
<guid>http://starodubtsevss.wordpress.com/2011/03/03/ruby-on-rails-first-steps/</guid>
<description><![CDATA[The first link which i&#8217;ve use: http://www.jetbrains.com/ruby/documentation/ so, there are some]]></description>
<content:encoded><![CDATA[<p>The first link which i&#8217;ve use:<a href="http://www.jetbrains.com/ruby/documentation/"></p>
<p>http://www.jetbrains.com/ruby/documentation/</a></p>
<p>so, there are some useful shortcuts:</p>
<p>Crtl+Alt+G &#8211; open dialog with code-generators (like <strong>scaffold)</strong></p>
<p>Ctrl+Alt+R &#8211; open dialogs with scripts/tasks to run (like <strong>db:create, db:migrate</strong>)</p>
		<div id="geo-post-1372" class="geo geo-post" style="display: none">
			<span class="latitude">49.850000</span>
			<span class="longitude">24.016667</span>
		</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Tutorial on Working with Ruby and Rails, with Netbeans 6.1]]></title>
<link>http://rubyworld.wordpress.com/2008/07/16/tutorial-on-working-with-ruby-and-rails-with-netbeans-61/</link>
<pubDate>Wed, 16 Jul 2008 04:33:01 +0000</pubDate>
<dc:creator>SoftMind</dc:creator>
<guid>http://rubyworld.wordpress.com/2008/07/16/tutorial-on-working-with-ruby-and-rails-with-netbeans-61/</guid>
<description><![CDATA[Hello, This is one of the best tutorial recently appeared. This tutorial guides you  with  lots of H]]></description>
<content:encoded><![CDATA[<p>Hello,</p>
<p>This is one of the best tutorial recently appeared. This tutorial guides you  with  lots of Hands on Labs Images, with Netbeans 6.1 like&#8230;</p>
<ul>
<li>Installation of Netbeans 6.1</li>
<li>Installation of Ruby and Rails</li>
<li>How to work with Ruby Files and create projects and classes</li>
<li>How to create Rails Projects</li>
<li>A sample walk-through of a simple project</li>
</ul>
<p><a href="http://rubyindia.files.wordpress.com/2008/07/rubyideimage.png"><img class="alignnone size-medium wp-image-24" src="http://rubyindia.files.wordpress.com/2008/07/rubyideimage.png?w=300&#038;h=163" alt="" width="300" height="163" /></a></p>
<p><a href="http://www.netbeans.org/kb/61/ruby/getting-started.html" target="_blank"><strong>Here is the Link.</strong></a></p>
<p>You can extend 2 great tutorials further, from the link posted in tutorial section.</p>
<p>Namaste</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Free and Biggest Ruby On Rails Tutorials with 850+ Members Starts Soon]]></title>
<link>http://rubyworld.wordpress.com/2008/07/07/free-and-biggest-ruby-on-rails-tutorials-with-850-members-starts-soon/</link>
<pubDate>Mon, 07 Jul 2008 09:14:12 +0000</pubDate>
<dc:creator>SoftMind</dc:creator>
<guid>http://rubyworld.wordpress.com/2008/07/07/free-and-biggest-ruby-on-rails-tutorials-with-850-members-starts-soon/</guid>
<description><![CDATA[Free and Biggest Ruby on Rails Tutorial Starts from 15th July 2008. It is a well known fact that Rub]]></description>
<content:encoded><![CDATA[<p style="text-align:center;"><a href="http://rubyindia.files.wordpress.com/2008/07/rails.png"><img class="size-medium wp-image-15 aligncenter" src="http://rubyindia.files.wordpress.com/2008/07/rails.png?w=87&#038;h=112" alt="" width="87" height="112" /></a></p>
<p><strong>Free and Biggest Ruby on Rails Tutorial Starts from 15th July 2008.</strong></p>
<p>It is a well known fact that Ruby on Rails is gaining quite a bit of popularity among developers and deployers of Web applications.. and for good reasons.  Rails is considered a well thought out Web application framework based on several development principles such as Don&#8217;t Repeat Yourself (DRY), Convention Over Configuration, which enables an agile yet practical development environment.  Ruby on Rails provides another benefit by allowing them to leverage the stability and the reliability of the Java platform.  This course will go through briefly the basics of Ruby programming language first.  The rest of the course will be devoted to learning Rails functionality such as Active Record, Active Controller, and Active View.</p>
<p>We are providing herewith full details with all the necessary links regarding the course.</p>
<p><strong>The First batch, will be starting from 15th July 2008<br />
Name of the course:- Ruby On Rails, Programming with Passion.</strong><strong>The Tutor of the this course is:- <a href="http://www.javapassion.com/rubyonrails" target="_blank">Sang Shin</a></strong><strong><br />
Current Members:- 850+ and Still growing<br />
Course Duration:- July to November 2008</strong><br />
<strong>IDE Required:</strong>- <strong>Netbeans 6.1( Free IDE )<br />
Course Fees:- Absolutely Free.  &#8221; Say..Thanks to Sang Shin &#8220;<br />
Joining Date:- Hurry Up.</strong></p>
<p><strong>How to Join:-</strong><br />
Its simple. All you have to do is <strong>send a blank email at the email address given below. This blank email will  automatically enroll you to the course, as well as to the forums for this course.</strong><br />
This forum can be used for posting questions/answers.  Please use this forum for all class related communication (technical or non-technical).</p>
<p><strong>Email:- </strong><br />
ruby-on-rails-programming-with-passion-subscribe@googlegroups.com</p>
<p><a href="http://www.javapassion.com/coursefaq.html" target="_blank"><strong>F.A.Q. :- Frequently asked Questions about this forums</strong></a></p>
<p><strong>Topics and Schedule:-</strong></p>
<p>Note that only the topics with the dates assigned will be covered in this course. (You need to submit homeworks only on the topics that have dates.)  You will be provided with presentation slides and Hands On Labs for the topics mentioned below. Many of the <strong>Hands on labs ( HOL ) are ready</strong> and many would be available soon.</p>
<p><strong>What is Hands on Labs ( HOL )</strong></p>
<p><a href="http://rubyindia.files.wordpress.com/2008/07/mydepot.png"><img class="alignnone size-medium wp-image-16" src="http://rubyindia.files.wordpress.com/2008/07/mydepot.png?w=300&#038;h=255" alt="" width="300" height="255" /></a></p>
<p><strong>Hands on labs are easy explanation Tutorials with lots of Images. </strong></p>
<p>HOL provides you with Images captured in Browser as you proceed with the Step By Step Example. The advantage is clear, you can easily understand whats going on, plus you can easily see the image to check, whether you are heading in the right direction or any step is missed by you.</p>
<p>The Tutor has taken lots of efforts by offering plenty of images for each tutorials, making you understand Rails much easier and faster.</p>
<p><a href="http://www.javapassion.com/rubyonrails/" target="_blank"><strong>Download the Course Material Here.</strong></a></p>
<p>You can immediately start reading with the available PDF files, Slides, References and <strong>Hands on Labs ( HOL )</strong> that are ready.</p>
<p><strong>1. Ruby Language Basics</strong> =&#62; July 15th. =&#62; HOL Ready<strong><br />
2. Ruby Language Meta-programming.</strong> =&#62; July 22nd. =&#62; HOL Ready<strong><br />
3. JRuby Basics.</strong> =&#62; July 29th. =&#62; HOL Ready<strong><br />
4. Ruby on Rails Basics</strong>. =&#62; August 5th.=&#62; HOL Ready<strong><br />
5. Scaffolding.</strong> =&#62; August 12th. =&#62; HOL Ready<strong><br />
6. JRuby and Rails Support in NetBeans</strong> =&#62; August 26th<strong><br />
7. Active Record Basics. </strong>=&#62; Sep. 2nd. =&#62; HOL Ready<strong><br />
8. Active Record Associations. </strong>=&#62; Sep. 9th.<strong><br />
9. Action Controller Basics.</strong> =&#62; Sep. 23rd.<strong><br />
10. Action View Basics.</strong>=&#62; Sep. 30th.<strong><br />
11. Action View Helpers.</strong> =&#62;  Oct. 7th.<strong><br />
12. Ajax.</strong> =&#62;  Oct. 21st, 2008.=&#62;  HOL  partially ready<strong><br />
13. REST support.</strong> =&#62; Oct. 28th<strong><br />
14. Testing.</strong> =&#62; Nov. 4th.<strong><br />
15. Deployment.</strong> =&#62;  Nov. 18th, 2008<strong><br />
16. Example Application.</strong> =&#62;Depot (Ecommerce)  Nov. 25th.=&#62;  HOL ready<strong><br />
17. Example Application.</strong> =&#62;Flickr (Photo)  Dec. 2nd. =&#62; HOL ready<strong><br />
18. Example Application. </strong>=&#62; CheckItOut (Personal Finance) Dec. 9th. =&#62; HOL Ready<br />
<strong>19. Example Application.</strong> =&#62; Redmine (Project Management) Dec. 16th. =&#62; HOL Ready</p>
<p><strong>Other Examples Applications:-</strong></p>
<p>1. Example Application &#8211; Typo (Blogging Engine) -   hands-on lab ready<br />
2. Example Application &#8211; Substruct (Ecommerce) -   hands-on lab ready<br />
3. Example Application &#8211; FreeMIS (MIS) -   hands-on lab ready<br />
4. Example Application &#8211; TimeTracker -   hands-on lab ready<br />
5. Gems and Helpers &#8211; hands-on lab  partially ready<br />
6. Caching<br />
7. Performance -<br />
8. Action Mailer<br />
9. Rails Security<br />
10. Rails and other Web technologies (jMaki) -<br />
11. Plug-in -<br />
12. Rails 2.0 Features<br />
13. Misc Topics</p>
<p><strong>If You are a Newbie or Fresher in Ruby On Rails&#8230;.</strong><br />
We suggest you to take the maximum advantage by participating in the Training and learn with the best of material available, Since this is the Biggest ever Online Ruby On Rails tutorial so far.</p>
<p><strong>If you are an Experienced Developer</strong>&#8230;.<br />
We suggest you to participate in this tutorials by answering threads/questions in the forum and helping others with your well laid knowledge. This would make life of the Tutorial a bit easier, with less burden on his head.<br />
The Tutor has already helped us a lot, lets say thanks to him by taking much burden of his head by participating and answering at least few questions, which you think you know.</p>
<p><strong>Last but not the least.</strong><br />
Please promote this Tutorial in your group, so that maximum students can take maximum advantage.</p>
<p>Namaste.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Ruby,Rubinius,IronRuby,Rails and Merb Group on FaceBook]]></title>
<link>http://rubyworld.wordpress.com/2008/07/05/rubyrubiniusironrubyrails-and-merb-group-on-facebook/</link>
<pubDate>Sat, 05 Jul 2008 08:40:40 +0000</pubDate>
<dc:creator>SoftMind</dc:creator>
<guid>http://rubyworld.wordpress.com/2008/07/05/rubyrubiniusironrubyrails-and-merb-group-on-facebook/</guid>
<description><![CDATA[Hello, I just came across a new group created on FaceBook, which covers major subjects like&#8230; (]]></description>
<content:encoded><![CDATA[<p>Hello,</p>
<p>I just came across a new group created on FaceBook, which covers major subjects like&#8230; (1) Ruby (2) Rubinius (3) IronRuby (4) Rails and (5) Merb.</p>
<p>The main goal is to discuss all this major topics under on roof. This group is specially created by Indian developers, with a mission to promote Rails and other related languages/frameworks in India.</p>
<p>I would highly recommend joining there.</p>
<p>Thanks</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Ruby on Rails 2.1 Tutorials Are Ready Now...]]></title>
<link>http://rubyworld.wordpress.com/2008/07/03/ruby-on-rails-21-tutorials-are-ready-now/</link>
<pubDate>Thu, 03 Jul 2008 08:36:14 +0000</pubDate>
<dc:creator>SoftMind</dc:creator>
<guid>http://rubyworld.wordpress.com/2008/07/03/ruby-on-rails-21-tutorials-are-ready-now/</guid>
<description><![CDATA[Ruby on Rails Tutorials for Rails 2.1 are ready &#8230; Don&#8217;t Miss out. I suggest you to read]]></description>
<content:encoded><![CDATA[<p><strong>Ruby on Rails Tutorials for Rails 2.1 are ready &#8230; Don&#8217;t Miss out.</strong></p>
<p>I suggest you to read and gain more expertise from ground up, with the series of fresh Ruby on Rails Tutorial here at <strong>Tutorials Point.</strong></p>
<p><a href="http://www.tutorialspoint.com/ruby-on-rails-2.1/index.htm" target="_blank">http://www.tutorialspoint.com/ruby-on-rails-2.1/index.htm</a></p>
<p>This tutorial comes with easy explanation chapterwise as mentioned below. It covers basic as well as advanced syllabus.</p>
<p><strong>Learning Ruby on Rails 2.1 ( Basic )</strong></p>
<p>* Rails 2.1 Home<br />
* Rails 2.1 Preliminary<br />
* Rails 2.1 Introduction<br />
* Rails 2.1 Installation<br />
* Rails 2.1 Framework<br />
* Rails 2.1 Dir Structure<br />
* Rails 2.1 Examples<br />
* Rails 2.1 Database Setup<br />
* Rails 2.1 Active Records<br />
* Rails 2.1 Migrations<br />
* Rails 2.1 Controllers<br />
* Rails 2.1 Views<br />
* Rails 2.1 Layouts<br />
* Rails 2.1 Scaffolding<br />
* Rails 2.1 and AJAX<br />
* Rails 2.1 Uploads Files<br />
* Rails 2.1 Sends Emails</p>
<p><strong>Advanced Ruby on Rails 2.1</strong></p>
<p>* Rails 2.1 RMagick Guide<br />
* Rails 2.1 Basic HTTP Auth<br />
* Rails 2.1 Error Handling<br />
* Rails 2.1 Routes System<br />
* Rails 2.1 Unit Testing</p>
<p>I hope you will enjoy and gain as much as I did.</p>
<p>Namaste</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Inviting All Ruby and Rails Developers across India]]></title>
<link>http://rubyworld.wordpress.com/2008/07/02/inviting-all-ruby-and-rails-developers-across-india/</link>
<pubDate>Wed, 02 Jul 2008 10:50:04 +0000</pubDate>
<dc:creator>SoftMind</dc:creator>
<guid>http://rubyworld.wordpress.com/2008/07/02/inviting-all-ruby-and-rails-developers-across-india/</guid>
<description><![CDATA[Hi, I invite all Ruby and Rails developers across India. It would be nice to have a detailed list of]]></description>
<content:encoded><![CDATA[<p>Hi,</p>
<p>I invite all <strong>Ruby and Rails developers across India.</strong> It would be nice to have a detailed list of all active Ruby and Rails developers and Students from India under one single roof.</p>
<p>This blog comes with few special reasons&#8230;</p>
<ul>
<li>Promoting Ruby in India.</li>
<li>Promoting Rails in India.</li>
<li>Helping Newcomers / New Developers with enough guidelines.</li>
<li>Providing links and References for further studies.</li>
<li>Upcoming events for Ruby and Rails.</li>
<li>Tutorials for Ruby and Rails</li>
<li>Easy reference for Job recruitment agencies looking for Ruby Developers / Job Assistance.</li>
<li>Starter Kit References.</li>
<li>Good Books on Ruby and Rails with reviews and suggestions.</li>
<li>Placing Advertisements for Ruby and Rails.</li>
<li>Much More&#8230;.welcomed by suggestions.</li>
</ul>
<p>I hope this would be good enough for start Ups.</p>
<p>Please send us your suggestions / Blogs / Current Activities to be included in this newly founded Ruby and Rails community from India</p>
<p>Thanks</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[rails 小技巧 :  動態產生 javascript file]]></title>
<link>http://semapwang.wordpress.com/2008/04/29/rails-%e5%b0%8f%e6%8a%80%e5%b7%a7-%e5%8b%95%e6%85%8b%e7%94%a2%e7%94%9f-javascript-file/</link>
<pubDate>Tue, 29 Apr 2008 08:44:47 +0000</pubDate>
<dc:creator>semapwang</dc:creator>
<guid>http://semapwang.wordpress.com/2008/04/29/rails-%e5%b0%8f%e6%8a%80%e5%b7%a7-%e5%8b%95%e6%85%8b%e7%94%a2%e7%94%9f-javascript-file/</guid>
<description><![CDATA[假設我們的javascript叫做 dynamic.js 一般來說我們會把該檔案 放到 rails的 /public/javascripts 目錄裡面, 然後在layout裡面加入 &lt;%= ja]]></description>
<content:encoded><![CDATA[<p>假設我們的javascript叫做 dynamic.js</p>
<p>一般來說我們會把該檔案  放到 rails的  /public/javascripts  目錄裡面, 然後在layout裡面加入</p>
<p>&#60;%= javascript_include_tag &#8216;dynamic&#8217;%&#62;</p>
<p>不過萬一我們希望 dynamic.js 的內容是動態的, 可以用下面的方法達成,</p>
<ul>
<li>首先一樣將  下面的程式加到 你的layout裡</li>
</ul>
<p>&#60;%= javascript_include_tag &#8216;dynamic&#8217;, :cache =&#62; false  %&#62;</p>
<ul>
<li>然後做一個 叫 javascripts 的controller, 裡面只有一個action叫做 dynamic</li>
</ul>
<ul>
<li>製作一個  view叫做  dynamic.js.erb 或是 dynamic.js.rjs (看你要用 erb 或 rjs 來產生javascript的內容)</li>
<li>最後一步就是你要在 routes.rb 裡面加上下面這一行, 讓rails找到正確的 controller, action, 和format</li>
</ul>
<p>map.connect &#8216;:controller/:action.:format&#8217;</p>
<p>如此一來 <a href="http://&#8230;&#8230;/javascripts/dynamic.js" rel="nofollow">http://&#8230;&#8230;/javascripts/dynamic.js</a> 就會動態的產生javascript檔案了</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[LiveValidation Rails Plugin]]></title>
<link>http://semapwang.wordpress.com/2008/04/24/livevalidation-rails-plugin/</link>
<pubDate>Thu, 24 Apr 2008 09:34:18 +0000</pubDate>
<dc:creator>semapwang</dc:creator>
<guid>http://semapwang.wordpress.com/2008/04/24/livevalidation-rails-plugin/</guid>
<description><![CDATA[在本周 railsenvy 的podcast裡 介紹了一個 rails plugin, 叫做 Live validation Rails plugin 使用了這個plugin後, 它會幫我在clien]]></description>
<content:encoded><![CDATA[<p>在本周 railsenvy 的podcast裡  介紹了一個 rails plugin, 叫做 <a href="http://livevalidation.rubyforge.org/">Live validation Rails plugin </a></p>
<p>使用了這個plugin後, 它會幫我在client端產生一些javascript, </p>
<p>這些javascript會依照我們在 ActiveRecord上面的validation, 在client端先做一次檢查.</p>
<p>super DRY.  cool.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ Ruby的Symbol]]></title>
<link>http://semapwang.wordpress.com/2008/04/23/ruby%e7%9a%84symbol/</link>
<pubDate>Wed, 23 Apr 2008 13:25:31 +0000</pubDate>
<dc:creator>semapwang</dc:creator>
<guid>http://semapwang.wordpress.com/2008/04/23/ruby%e7%9a%84symbol/</guid>
<description><![CDATA[Ruby的Symbol是什麼? 我剛學Ruby時 一直不是很清楚, 相信對很多Ruby的初學者也有相同的問題. 很多大師也對Ruby Symbol下了不同的定義, 然而對我來說, Ruby Symbo]]></description>
<content:encoded><![CDATA[<p>Ruby的Symbol是什麼?</p>
<p>我剛學Ruby時 一直不是很清楚, 相信對很多Ruby的初學者也有相同的問題.</p>
<p>很多大師也對Ruby Symbol下了不同的定義,</p>
<p>然而對我來說, Ruby Symbol是代表一個字串的符號, 並且有下面兩個特性</p>
<p>1. 不可變動性 (所代表的字串內容不可更改)<br />
2. 唯一性 (系統中代表同一個字串的symbol 是同一個instance)</p>
<p>在Ruby中, Symbol也是一個class, 但是它並不是String的subclass.</p>
<p>Symbol class不提供 Symbol.new 讓我們使用,</p>
<p>如果要產生Symbol的instance要使這個方式</p>
<p><code>&#62;x = :abc</p>
<p>=&#62;:abc</code></p>
<p>上面程式告訴Ruby, 我要產生一個Symbol的instance, 他所代表的字串是&#8221;abc&#8221;</p>
<p>&#62;x.class<br />
=&#62;Symbol</p>
<p>我們可以看出來, x的class是Symbol而不是String</p>
<p>&#62;y = :abc<br />
=&#62;:abc<br />
&#62;x.object_id<br />
=&#62;243938<br />
&#62;y.object_id<br />
=&#62;243938</p>
<p>上面我們看出 Symbol的唯一性, x和y是同一個object. (因為x和y的object_id是一樣的)</p>
<p>瞭解了Symbol是什麼後, 重要的問題來了?<br />
Symbol有什麼用? 也就是說Ruby為什麼要有Symbol?</p>
<p>嗯&#8230;&#8230;有兩個原因第一是節省記憶體空間(space), 第二是增加執行時的效率(performance)</p>
<p>如果你是Java的programmer,應該知道, Java的String內容是不能改變的, 然而Ruby的String卻完全不是這麼一回事,</p>
<p>&#62;m = &#8220;abc&#8221;<br />
=&#62;&#8221;abc&#8221;<br />
&#62;n = &#8220;abc&#8221;<br />
=&#62;&#8221;abc&#8221;<br />
&#62;m.object_id<br />
=&#62;23225030<br />
&#62;n.object_id<br />
=&#62;23222010<br />
&#62;m[0] = &#8220;A&#8221;<br />
=&#62;&#8221;A&#8221;<br />
&#62;m<br />
=&#62;&#8221;Abc&#8221;</p>
<p>看出來了嗎? m和n都是字串&#8221;abc&#8221;, 但是的卻是不同的instance (object_id不一樣), 而且字串的內容是可以修改的.</p>
<p>但是&#8230;&#8230;&#8230;.字串是程式中常常用到的, Ruby中的 每一個&#8221;abc&#8221;, 其實都是 String.new(&#8220;abc&#8221;),<br />
如果我們程式中有太多的&#8221;abc&#8221;, 那麼, Ruby就會create一堆的 String instance&#8230;., 所以如果我們可以在程式裡多用:abc 來取代&#8221;abc&#8221;, 那麼就可以節省掉一些記憶體的空間. symbol最普遍應用的就是就屬hashmap的key值了.</p>
<p>Symbol第二個好處就是增加執行時的performance,</p>
<p>Symbol在ruby內部除了代表一個字串外, 其實也代表了一個數字</p>
<p>如果ruby執行到 m.do_something, 在Ruby的內部, 會在m中找一個名稱叫做 do_something, 如果Ruby用字串比對的方式在m中去找名稱叫 &#8220;do_something&#8221;的method, 那麼performance將會很低(因為字串的比對是很花時間的), 所以Ruby會將 &#8220;do_something&#8221;轉成 :do_something, 由於:do_something也代表了某個數字(假設代表的數字是34), 因為Ruby只要在m中尋找 34這一個method, 這樣比用字串比對去找&#8221;do_something&#8221;要快得多了&#8230;.</p>
<p>所以在Ruby當中 m.do_something 事實上是呼叫 m.send(:do_something)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Twin Cities Code Camp IV]]></title>
<link>http://subjunctive.us/2008/04/06/twin-cities-code-camp-iv/</link>
<pubDate>Mon, 07 Apr 2008 03:27:57 +0000</pubDate>
<dc:creator>Chris Sutton</dc:creator>
<guid>http://subjunctive.us/2008/04/06/twin-cities-code-camp-iv/</guid>
<description><![CDATA[Yesterday, I was in the Cities at the fourth Twin Cities Code Camp.&nbsp; It really was a fantastic]]></description>
<content:encoded><![CDATA[<p>Yesterday, I was in the Cities at the fourth <a href="http://twincitiescodecamp.com/TCCC/Spring2008/Schedule.aspx">Twin Cities Code Camp</a>.&#160; It really was a fantastic experience, likely the the best one yet (I presented at the first two code camps as well). From the presentations I attended I would say that the quality of the presentations was very high. They easily would rival what you get at a paid conference. I also met a bunch of people I had never seen in person which is really cool.</p>
<p>Some of the Iowa crowd that went up was <a href="http://blog.lozanotek.com/archive/2008/04/06/Twin_Cities_Code_Camp_Silverlight_Presentation.aspx">Javier Lozano</a>, <a href="http://weblogs.asp.net/bryansampica/">Bryan Sampica</a> and <a href="http://www.solidrockstable.com/blogs/PragmaticTSQL/Lists/Posts/Post.aspx?ID=22">Greg Wilson</a>. There were several other attendees from Bryan&#8217;s company as well. The Iowa presenters and attendees have grown significantly since the first one where I was the sole Iowan as far as I know.</p>
<p>Some interesting people I met/saw were <a href="http://geekswithblogs.net/dlussier/archive/2008/04/05/121065.aspx">D&#8217;Arcy Lussier</a>, Neil Iverson (Inetium), <a href="http://itanddevevents.blogspot.com/">Brandy Favilla</a> (New Horizons), <a href="http://aspadvice.com/blogs/robertb/archive/2008/03/11/Twin-Cities-Code-Camp-Spring-2008.aspx">Robert Boedigheimer</a>, <a href="http://geekswithblogs.net/cwilliams/archive/2008/04/05/121067.aspx">Chris Williams</a> (Magenic), <a href="http://blog.magenic.com/blogs/aarone/archive/2008/04/06/Back-from-Code-Camp.aspx">Aaron Erickson</a> (Magenic), <a href="http://sqlblog.com/blogs/kent_tegels/">Kent Tegels</a> (DevelopMentor), <a href="http://blog.magenic.com/blogs/jefff/archive/2008/04/07/Twin-Cities-Code-Camp-Session-Slides-and-Code-Posted.aspx">Jeff Ferguson</a>, <a href="http://blog.johnsonch.net/">Chris Johnson</a>, Saviz Artang, John Thurow, Kirstin (Magenic), Nicole and Kristen (New Horizons) and <a href="http://www.justnbusiness.com/Blogs/Twin_Cities_Code_Camp,_April_2008_Wrapup.aspx">Justin Chase</a>.</p>
<p>My favorite session was Neil Iverson&#8217;s PowerShell for Developers.&#160; It was a fast paced live demo that kept incrementally building.&#160; Rarely have I been so engaged in a session. D&#8217;Arcy&#8217;s MVC vs ASP.Net talk was also really interesting.&#160; We only had about 6 people in the session, so we went around the room and said where we were coming from in our ASP.Net development experience. Then D&#8217;Arcy showed us how he typically structures his webforms applications, and we peppered him with questions.&#160; I learned a lot from the session.</p>
<p>My talk was the second of the day in the large seminar room so we actually had about 50 people in the session.&#160; One thing that was cool was that <a href="http://geekswithblogs.net/dlussier/archive/2008/04/06/121078.aspx">D&#8217;Arcy Lussier</a> did an intro talk right before mine, so I got to build off of what he did in the session before. Mine seemed to go pretty well. There were a lot of questions and interest in what MVC brings to web development in the Microsoft space.</p>
<p><a href="http://www.jasonbock.net/JB/Default.aspx?blog=entry.e78146913866440f817dea60ed679b5e">Jason Bock</a> did a great job again bringing this all together.&#160; It&#8217;s a lot of work coordinating an event like this.</p>
<p>If you liked what you got at the Twin Cities Code Camp you&#8217;ll definitely want to check out the <a href="http://iowacodecamp.com/">Iowa Code Camp</a>.&#160; We&#8217;ll be a little bit smaller, but have some top notch presenters, a great facility and will have great prizes as well.&#160; The registration is right on the home page and is as simple as it gets.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Open source Flash Chart]]></title>
<link>http://yitan.wordpress.com/2008/03/25/open-source-flash-chart/</link>
<pubDate>Tue, 25 Mar 2008 16:14:09 +0000</pubDate>
<dc:creator>yitan</dc:creator>
<guid>http://yitan.wordpress.com/2008/03/25/open-source-flash-chart/</guid>
<description><![CDATA[Open Flash Chart http://teethgrinder.co.uk/open-flash-chart/ How does it work? User browses to your]]></description>
<content:encoded><![CDATA[<p>Open Flash Chart
<p><a title="http://teethgrinder.co.uk/open-flash-chart/" href="http://teethgrinder.co.uk/open-flash-chart/">http://teethgrinder.co.uk/open-flash-chart/</a></p>
<h4>How does it work?</h4>
<ol>
<li>User browses to your web site.
<li>The browser downloads the web page which contains the Open Flash Chart.
<li>Open Flash Chart downloads the data file and displays the chart. </li>
</ol>
<div></div>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>It&#8217;s such a wonderful tool.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[How to support foreign domain (CNAME forwarding) in your Rails application]]></title>
<link>http://yitan.wordpress.com/2008/03/25/how-to-support-foreign-domain-cname-forwarding-in-your-rails-application/</link>
<pubDate>Tue, 25 Mar 2008 12:12:35 +0000</pubDate>
<dc:creator>yitan</dc:creator>
<guid>http://yitan.wordpress.com/2008/03/25/how-to-support-foreign-domain-cname-forwarding-in-your-rails-application/</guid>
<description><![CDATA[Let&#8217;s say you have a blog application, which is built on Ruby on Rails. In the application, ea]]></description>
<content:encoded><![CDATA[<p>Let&#8217;s say you have a blog application, which is built on Ruby on Rails. In the application, each registered user will have his personal blog page at the URL: yourblogapp.com/blogs/blogid</p>
<p>Perhaps, the user has his own website, say, someone.com. It will be nicer to let the user have a custom domain in your blog application (in this example: blog.someone.com).</p>
<p>After some digging, I found the implementation in Rails is quite simple and straightforward.</p>
<h2>Requirements</h2>
<ol>
<li>Your application must running on a dedicated IP. Or at least, if running on a virtual hosting without a&#160; dedicated IP, it must be set to the default vhost site, in order to allow all requests from foreign domains be routed to your application.</li>
<li>In your blog table add a field to record custom domain set by the user. Something like:<br />add_column(:blogs, :custom_domain, :string, :limit=&#62;200)<br />And provide an web interface to let the user custom it. </li>
</ol>
<h2>Implementation in Rails</h2>
<p>Rails has a <a href="http://api.rubyonrails.org/classes/ActionController/Routing.html">built-in URL rewriting</a> module, which redirects incoming requests to controllers and actions. This router makes things a lot easier. But the packaged Routing module only understand request from native domain, and so all we need to do is to extend it to parse requests from foreign domain.</p>
<p>The Routing module provides two extendible methods to define the condition for request parsing. <a href="http://weblog.rubyonrails.org/2006/5/22/dan-webbs-request-routing-plugin">Dan Webb&#8217;s Request Routing plugin</a> (<a href="http://svn.danwebb.net/external/rails/plugins/request_routing/trunk/">alternative link</a>) has already taken care of them and give extra conditions for defining map rules. </p>
<p>So, install the plugin:</p>
<blockquote><p>ruby script/plugin install <a href="http://svn.danwebb.net/external/rails/plugins/request_routing/trunk/" rel="nofollow">http://svn.danwebb.net/external/rails/plugins/request_routing/trunk/</a></p>
</blockquote>
<p>Then create a new map rule in routes.rb</p>
<blockquote><p># route all requrest from foriegn domain to boards controller<br />map.connect(<br />&#160; &#8216;:action/:id&#8217;,<br />&#160; :controller =&#62; &#8216;blogs&#8217;,<br />&#160; :conditions =&#62; {<br />&#160;&#160;&#160;&#160; :domain =&#62; /\A(?!(yourblogapp\.com))/i<br />&#160; }<br />) </p>
</blockquote>
<p>This map rule says all requests which are not coming from &#8220;yourblogapp.com&#8221; will be redirect to the blogs controller.
<p>Then in blogs_controller, you will probably have something like:<br />
<blockquote>
<p>def retrieve_blog
<p>&#160;&#160; @blog = Blog.find_by_id(params['id'])
<p>&#160;&#160; &#8230;..
<p>end</p>
</blockquote>
<p>Change this retrieving method to:<br />
<blockquote>
<p>def retrieve_blog
<p>&#160;&#160; @blog = (request.domain != &#8216;yourblogapp.com&#8217;)&#160; ? <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Blog.find_by_id params['id']&#160; : <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Blog.find_by_custom_domian request.host.downcase&#160;
<p>&#160;&#160; &#8230;..
<p>end</p>
</blockquote>
<p>Job done.</p>
<h2>What the user needs to do</h2>
<p>To custom a domain for his blog, the user need to do following two setup:</p>
<ol>
<li>Create a CNAME record for this domain: blog.someone.com, the destination of which is the domain of your application: yourblogapp.com</li>
<li>Log in your application, and add &#8220;blog.someone.com&#8221; to his preference settings.</li>
</ol>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Iowa Code Camp - Spring 2008]]></title>
<link>http://subjunctive.us/2008/01/11/iowa-code-camp-spring-2008/</link>
<pubDate>Fri, 11 Jan 2008 17:09:18 +0000</pubDate>
<dc:creator>Chris Sutton</dc:creator>
<guid>http://subjunctive.us/2008/01/11/iowa-code-camp-spring-2008/</guid>
<description><![CDATA[We are planning our first ever Iowa Code Camp.&nbsp; It&#8217;s going to happen at the University of]]></description>
<content:encoded><![CDATA[<p>We are planning our first ever <a href="http://iowacodecamp.com/">Iowa Code Camp</a>.&#160; It&#8217;s going to happen at the University of Iowa&#8217;s Conference Center in Iowa City on Saturday May 3rd.</p>
<p>The details are coming together nicely and we already have about 1/2 of our speakers in place.</p>
<p>Our current sponsors are:</p>
<ul>
<li>University of Iowa
<li>Microsoft
<li>And several others are in the works </li>
</ul>
<p>We are currently looking for more sponsors to provide some good food, drinks and prizes.</p>
<p>If you are interested in helping in any way, leave me a comment and I&#8217;ll make sure to pass your information on to the right person.</p>
<p>Javier has <a href="http://www.bostondotnet.org/CodeCamp/default.aspx/CodeCamp/CodeCampSchedule.html">already posted</a> the Code Camp on bostondotnet.org</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[I love SciTE, I love free software]]></title>
<link>http://heshaaam.wordpress.com/2007/12/17/i-love-scite-i-love-free-software/</link>
<pubDate>Mon, 17 Dec 2007 19:08:49 +0000</pubDate>
<dc:creator>heshaaam</dc:creator>
<guid>http://heshaaam.wordpress.com/2007/12/17/i-love-scite-i-love-free-software/</guid>
<description><![CDATA[Thanks Richard Stallman, Donal Knuth, and the Free Software movement. You can easily some of the bes]]></description>
<content:encoded><![CDATA[<p>Thanks Richard Stallman, Donal Knuth, and the Free Software movement. You can easily some of the best software and it is free (in the fsf.org sense).</p>
<p>After picking up  programming again I was looking for a good source code editor, and I found <a href="http://www.scintilla.org/SciTE.html">SciTE</a>. Works great, highlights your code and has a small footprint, etc. Highly recommended. Thanks to the creator of SciTE Neil Hodgson.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Getting Started With Capistrano 2.0]]></title>
<link>http://issarangul.wordpress.com/2007/08/02/getting-started-with-capistrano-2-0/</link>
<pubDate>Thu, 02 Aug 2007 22:02:00 +0000</pubDate>
<dc:creator>issarangul</dc:creator>
<guid>http://issarangul.wordpress.com/2007/08/02/getting-started-with-capistrano-2-0/</guid>
<description><![CDATA[หลังจากได้ลองศึกษาและเขียน Web Application ด้วย Ruby On Rails มาได้สักพัก ก็ได้เวลา เอา Web Applicat]]></description>
<content:encoded><![CDATA[<p>หลังจากได้ลองศึกษาและเขียน Web Application ด้วย Ruby On Rails มาได้สักพัก ก็ได้เวลา เอา Web Application ที่ทำ ไปใช้งานจริง ซึ่งในช่วงแรก ผมอาศัยการก็อปปี้จากตัว Development ไปใช้งาน โดยเปลี่ยน config ให้รันในโหมด Production ทั้งนี้ผมรันทั้ง Development และ Production บนเครื่องตัวเองที่บ้านครับ เพราะต้องการศึกษา และทดสอบให้มั่นใจซะก่อน </p>
<p>และจากเดิมที่ใช้วิธีการก็อบปี้ ก็เปลี่ยนมาใช้ Subversion ช่วยซึ่งก็ทำให้สะดวกขึ้น และในที่สุดก็เลยมาลองใช้ Capistrano เพราะเห็นใครๆเขาก็ใช้กัน ^^ และพอได้มาลองใช้ดู ก็พบว่าวิธีการใช้งาน ที่มีคนเขียนไว้ตามเว็ปต่างๆนั้น ใช้แทบไม่ได้เลย &#8211; -&#8221; เพราะเวอร์ชั่น 2.0 นี้ต่างจากของเดิมเยอะพอสมควร ก็เลยต้องลองผิดลองถูก เดาๆเอาจากของเดิมที่มีคนเขียนอธิบายไว้ กับที่เว็ปของ Capistrano เขียนไว้ (น้อยจัง) พอทำสำเร็จเลยต้องมาเขียน Blog ไว้กันลืม ^^&#8221;</p>
<p>เริ่มต้นเลยใช้เช็คก่อนว่าเราได้ลง Capistrano 2.0 ไว้หรือยัง
<pre class='terminal'>gem list</pre>
<p>ถ้ายังไม่ได้ลงก็จัดการลงเลยครับ
<pre class='terminal'>sudo gem install capistrano</pre>
<p>จากนั้นก็ใน Project Root directory ซึ่งในกรณี้ของผมโปรเจคชื่อ inventory และอยู่ที่ Directory /home/my_local_username/aptana/workspace/inventory 
<pre class='terminal'>cd ~/aptana/workspace/inventory</pre>
<p>จากนั้นก็ทำการสร้างคอนฟิกไฟล์ของ Capistrano ใน Project ของเราด้วยคำสั่ง
<pre class='terminal'>capify .</pre>
<p>จากนั้นถ้าจะดูว่าเราสามารถใช้คำสั่งอะไรได้บ้างให้ลองใช้คำสั่งนี้ดูครับ
<pre class='terminal'>cap -T</pre>
<p>ทีนี้ให้เราไปเปิดไฟล์ config/deploy.rb เพื่อแก้ไขคอนฟิกให้ใช้งานได้ถูกต้องตามต้องการ ซึ่งปกติหน้าตาไฟล์คอนฟิกที่มันสร้างให้จะเป็นดังด้านล่างนี้
<pre class="terminal"><code>set :application, "set your application name here" <br />set :repository,  "set your repository location here" <br /><br /># If you aren't deploying to /u/apps/#{application} on the target<br /># servers (which is the default), you can specify the actual location<br /># via the :deploy_to variable:<br /># set :deploy_to, "/var/www/#{application}" <br /><br /># If you aren't using Subversion to manage your source code, specify<br /># your SCM below:<br /># set :scm, :subversion<br /><br />role :app, "your app-server here" <br />role :web, "your web-server here" <br />role :db,  "your db-server here", :primary =&#62; true</code></pre>
<p>ก็ให้แก้ตัวแปร
<ul>
<li>:application เป็นชื่อโปรเจค</li>
<p>
<li>:repository เป็น subversion repository ที่โปรเจคนี้ใช้งาน</li>
<p>
<li>:runner เป็น username ที่ใช้งานบน Remote Server</li>
<p>
<li>:runner เป็น username ที่ใช้งานบน Remote Server</li>
<p>
<li>:deploy_to เป็น path ที่เราจะ deploy web application บน Remote Server</li>
<p>
<li>:app, :web และ :db เป็นชื่อโดเมนของ Remote Server ที่เราจะ Deploy Web ซึ่งในกรณีของผม ผมจะ Deploy ไปยัง inventory.codesniper.org ซึ่งอยู่ในเครื่องที่ ผมทำงานนั่นแหล่ะ แต่ผมเซ็ตชื่อโดเมนไว้ใน /etc/hosts  application</li>
<p></ul>
<p>หลังจากแก้ไขไฟล์ config/deploy.rb เสร็จหน้าตาก็จะเป็นดังนี้
<pre class="terminal"><code>set :application, "inventory"<br />set :repository,  "http://localhost/svn/inventory/trunk"<br />set :runner, 'my_remote_username'<br /># If you aren't deploying to /u/apps/#{application} on the target<br /># servers (which is the default), you can specify the actual location<br /># via the :deploy_to variable:<br /># set :deploy_to, "/var/www/#{application}"<br />set :deploy_to, "/home/my_remote_username/RailsProjects/#{application}"<br /># If you aren't using Subversion to manage your source code, specify<br /># your SCM below:<br /># set :scm, :subversion<br /><br />role :app, "inventory.codesniper.org"<br />role :web, "inventory.codesniper.org"<br />role :db,  "inventory.codesniper.org", :primary =&#62; true<br /><br />task :after_setup do<br />  run "mkdir -p #{shared_path}/media"<br />  run "mkdir -p #{shared_path}/media/thumbnail"<br />end<br /><br />task :after_symlink do<br />  run "rm -rf current/public/media"<br />  run "ln -s #{shared_path}/media #{current_path}/public/media"<br />end</code></pre>
<p>แต่ทั้งนี้จะเห็นว่าผมใส่ Callbak Task ไว้ 2 Task คือ :after_setup ส่วนการทำงานเดี๋ยวผมจะ อธิบายทีหลัง ทีนี้หลังจากที่เราแก้ไขไฟล์ deploy.rb เสร็จแล้ว เราจะทำการเซ็ต ในส่วนที่เกี่ยวกับการ สั่งรัน Web Application บน Remote Server ซึ่งในที่นี้ผมจะรันด้วย Mongrel ดังนั้นเราต้องสร้างไฟล์ script/spin ขึ้นมา
<p class='code'>nano -w script/spin</p>
<p>โดยในไฟล์ spin นี้ให้ใส่คำสั่งดังต่อไปนี้ (อย่าลืมแก้ไข Path ให้ถูกต้องด้วยนะครับ) ไฟล์นี้จะถูก Capistrono เรียกใช้โดยอัตโนมัติ
<pre class="terminal"><code>/home/my_remote_username/RailsProjects/inventory/current/script/process/spawner -p 5010 -i 2</code></pre>
<p>โดยไฟล์นี้จะทำหน้านี้รัน Mongrel ในที่นี้ผมเซ็ตให้รัน 2 Process เพราะผมได้เซ็ต Apache/mod_proxy ไว้แล้ว และหลังจากนี้ ให้เราแก้ไขไฟล์ config/database.yml กันก่อน เนื่องจากผมใช้ sqlite3 เป็นฐานข้อมูล ดังนั้นเพื่อไม่ให้มีปัญหาตอน Deploy ผมเลยแก้ไขไฟล์ database.yml เป็นดังนี้
<pre class="terminal"><code>development:<br />  adapter: sqlite3<br />  database: db/development.sqlite3<br /><br />test:<br />  adapter: sqlite3<br />  database: db/test.sqlite3<br /><br />production:<br />  adapter: sqlite3<br />  database: /home/my_remote_username/RailsProjects/inventory/shared/production.sqlite3</code></pre>
<p>ที่ต้องระบุ path ของ Production database ดังด้านบน ก็เพราะถ้าเราเก็บไฟล์ฐานข้อมูลไว้ใน Directory &#8220;db&#8221; ที่อยู่ใน Root Project เมื่อเราทำการแก้ไขโปรแกรมแล้วทำการ Deploy เพื่ออัพเดท Web App บน Remote Server ไฟล์ฐานข้อมุลก็จะหายไป  <br />ทีนี้่ก่อนที่เราจะ Deploy ให้ทำการ commit ไฟล์ในโปรเจคก่อน
<pre class='terminal'>svn commit -m "Config Capistrano to Project"</pre>
<p>จากนี้เราจะเริ่มทำการ Deploy Web Application กัน เริ่มด้วยคำสั่ง
<pre class='terminal'>cap deploy:setup</pre>
<p>หลังจากเรียกคำสั่งนี้ใน Remote server จะมี Directory จำนวนนึงถูกสร้างขึ้นมา และที่เราได้เขียน Callback Task ไว้ใน deploy.rb
<pre class="terminal"><code>task :after_setup do<br />  run "mkdir -p #{shared_path}/media"<br />  run "mkdir -p #{shared_path}/media/thumbnail"<br />end</code></pre>
<p>เมื่อลองเช็คดูใน Remote Server ใน Path ที่เราจะ Deploy จะมี Directory &#8220;current&#8221;, &#8220;releases&#8221;, &#8220;shared&#8221; และใน &#8220;shared&#8221; นั้นจะมี Directory &#8220;media&#8221; และ &#8220;media/thumbnail&#8221; ที่เราสั่งให้สร้างไว้</p>
<p>จากนั้นให้ส่ัง Deploy ด้วยคำส่ัง
<pre class='terminal'>cap deploy:cold</pre>
<p>ซึ่งคำสั่งนี้ใช้ Deploy Web Application ในครั้งแรก ซึ่งจะมีการสั่งรัน db:migration สร้างฐานข้อมุลขึ้นมา และรัน Mongrel ให้เราโดยอัตโนมัติ ส่วน Web Application ของเราจะถูก Deploy ไปยัง Directory &#8220;Release&#8221;
<pre class='terminal'>$ pwd<br />/home/my_remote_username/RailsProjects/inventory<br />$ ls<br />current  releases  shared<br />$ls releases<br />20070802140742<br />$ls releases/20070802140742<br />app      components  db   lib  nohup.out  Rakefile  REVISION  test  vendor<br />Capfile  config      doc  log  public     README    script    tmp<br /></pre>
<p>จะเห็นว่าบน Remote Server นั้น Web Application Root จะอยู่ใน 20070802140742 ซึ่ง Directory &#8220;current&#8221; จะลิ้งก์ไปที่ Directory &#8220;20070802140742&#8243;<br />และจากในช่วงแรกที่ผมได้เขียน Callback Task :after_symlink ไว้ใน deploy.rb
<pre class="terminal"><code>task :after_symlink do<br />  run "rm -rf #{current_path}/public/media"<br />  run "ln -s #{shared_path}/media #{current_path}/public/media"<br />end</code></pre>
<p>ซึ่ง Callback Task นี้จะถูกรันในขั้นตอนนี้ ซึ่งจะทำการลบ Directory &#8220;media&#8221; ทิ้ง ที่ต้องลบทิ้งเพราะใน Directory นี้ที่ใช้เก็บรูปภาพ อาจมีรูปต่างๆที่เราอัพโหลดในช่วงพัฒนา ซึ่งเราไม่ได้เอาไปใช้จริง และหลังจากลบ Directory นี้แล้วก็เป็น คำสั่งสร้าง Symbolic link ไปยัง &#8220;shared/media&#8221; ส่วนทำไมต้องทำแบบนี้ เดี๋ยวจะอธิบายในช่วงต่อไปครับ ^^&#8221;<br />ส่วนตอนนี้เราสามารถ เปิดดูเว็ปเราได้แล้วนะครับ และต่อไป ถ้าเราทำการพัฒนาเพิ่มเติม หรือแก้ไขบน Local แล้วต้องการอัพเทดบน Remote เราก็สามารถทำได้โดยง่ายด้วยคำสั่ง
<pre class='terminal'>cap deploy</pre>
<p>ซึ่งจะทำการ deploy Web Application ที่เราพัฒนาเพิ่มเติมเสร็จ ่ไปยัง Remote Server และทำการ Restart Mongrel แต่จะไม่มีการสร้างฐานข้อมูลใหม่ให้เรา เพราะเป็นการ Deploy เพื่ออัพเดท Web Application บน Remote Server ถ้าเราลองดูใน Directory &#8220;releases&#8221; จะเห็นว่ามี Directory ใหม่สร้างขึ้นมา ภายในนั้นก็คือ Web Application Root ชุดใหม่ที่เราเพิ่งสั่ง Deploy มา และ Directory Current ก็จะถูกเปลี่ยนมาชี้ที่นี่แทน</p>
<p>นั่นเป็นสาเหตุที่ผมได้แก้ไขไฟล์ database.yml ที่ระบุ sqlite database file ไว้ใน shared แทนก็เพราะถ้าไว้ภายใน Web Application Root เมื่อเรา Deploy เพื่ออัพเดท Directory &#8220;current&#8221; จะถูกเปลี่ยนให้ลิ้งก์ไปที่ Web Application Root อันใหม่ซึ่งจะไม่มีไฟล์ฐานข้อมูล  </p>
<p>ตอนนี้น่าจะเริ่มเข้าใจแล้วนะครับว่า ที่ผมเขียน Callback Task ให้สร้าง Directory &#8220;media&#8221;, &#8220;media/thumbnail&#8221; ไว้ใน &#8220;shared&#8221; ก็ด้วยเหตุผลเดียวกัน เนื่องจาก Directory เหล่านี้ผมเอาไว้เก็บรูปภาพสินค้า เมื่อเราใช้งานบน Remote Server มีการอัพรูปสินค้าไปบ้างแล้ว ถ้าเราสั่ง deploy เพื่ออัพเดทเว็ป แล้วเราดันเก็บรูปไว้ใน Diretory ที่อยู่ภายใน Web Application Root มันก็จะเกิดปัญหาขึ้น เพราะ Directory &#8220;current&#8221; ถูกเปลี่ยนลิ้งก์ไปยัง Web Application Root ชุดใหม่แทน ทำให้รูปเดิมที่เคยอัพไปแล้วใช้ไม่ได้</p>
<p>สุดท้ายนี้ ผมไม่ได้เขียนเกี่ยวกับ การเซ็ต Apache &#8211; Subversion &#8211; Mongrel นะครับ ถ้าใครสนใจก็ ลองอ่านได้<a href="http://weblog.punneng.com/?p=136">ที่นี่</a>ครับ เพราะผมก็ไปอ่านจากที่นั่นแหล่ะ :P <br />ความจริงการใช้งาน Capistrano ยังมีอะไรให้ศึกษาอีกเยอะครับ มันสามารถเซ็ต และทำงานได้มากมาย กว่าที่ผมเขียนมาทั้งหมด เพียงแต่ผมพิ่งศึกษาและเพิ่งทดลองใช้งานได้แค่นี้ ไว้ถ้าได้อะไรมากกว่านี้ก็จะมาเขียนเพิ่มเติม</p>
<p class='alert'>หมายเหตุ : ทั้งนี้ที่ผมทดสอบนั้น Local และ Remote Server จะอยู่บนเครื่องเดียวกัน อาจทำให้บางท่าน ที่อ่านแล้วนำไปใช้ อาจไม่ได้ผลอย่างที่ผมเขียน ก็ต้องขออภัยด้วยครับ</p>
<p>อ้างอิง : <a href="http://www.capify.org/getting-started/rails">Capistrano</a>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15290871-2670128110153273142?l=issarangul.blogspot.com' alt='' /></div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ออกแล้ว Rails 1.2.0]]></title>
<link>http://elixer.wordpress.com/2007/01/19/rails-120/</link>
<pubDate>Thu, 18 Jan 2007 17:44:22 +0000</pubDate>
<dc:creator>remedy</dc:creator>
<guid>http://elixer.wordpress.com/2007/01/19/rails-120/</guid>
<description><![CDATA[หลังจากออกตัว RC2 ได้ไม่ถึง 2 สัปดาห์ ตอนนี้ก็ออกตัวจริงมาแล้ว โดยผู้ที่มี Rails ติดตั้งอยู่แล้ว ก็ใ]]></description>
<content:encoded><![CDATA[<p>หลังจากออกตัว RC2 ได้ไม่ถึง 2 สัปดาห์ ตอนนี้ก็ออกตัวจริงมาแล้ว โดยผู้ที่มี Rails ติดตั้งอยู่แล้ว ก็ใส่คำสั่งตามนี้ เพื่ออัพเดทได้เลย</p>
<blockquote><p><code>gem update rails --include-dependencies</code></p></blockquote>
<p>ส่วนผู้ที่ติดตั้งใหม่ ก็ใส่คำสั่งนี้เพื่อติดตั้ง</p>
<blockquote><p><code>gem install rails --include-dependencies</code></p></blockquote>
<p>ตอนนี้ที่เว็บ <a href="http://www.rubyonrails.org/">Ruby on Rails</a> <strike>ยังไม่อัพเดท</strike> และ <a href="http://rubyforge.org/projects/rails/">Rubyforge</a> อัพเดทเรียบร้อยแล้ว</p>
<p><strong>เพิ่มเติม</strong> <a href="http://prototypejs.org/">Prototype 1.5</a> และ <a href="http://haml.hamptoncatlin.com/">Haml 1.0</a> ก็ิิออกแล้ว</p>
<p><a href="http://rubyforge.org/projects/rails/">Rubyforge</a> via <a href="http://merubyyoujane.com/">Me Ruby You jane</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Rails 1.2rc2]]></title>
<link>http://elixer.wordpress.com/2007/01/16/rails-12rc2/</link>
<pubDate>Tue, 16 Jan 2007 12:51:31 +0000</pubDate>
<dc:creator>remedy</dc:creator>
<guid>http://elixer.wordpress.com/2007/01/16/rails-12rc2/</guid>
<description><![CDATA[Rails 1.2rc2 ออกมาตั้งแต่วันที่ 5 คาดว่าถัดจากเวอร์ชันนี้ น่าจะเป็นตัว final แล้ว อยากรู้ว่ามีอะไรเพ]]></description>
<content:encoded><![CDATA[<p>Rails 1.2rc2 ออกมาตั้งแต่วันที่ 5 คาดว่าถัดจากเวอร์ชันนี้ น่าจะเป็นตัว final แล้ว อยากรู้ว่ามีอะไรเพิ่มมาจาก Rails 1.1.6 <a href="http://weblog.rubyonrails.org/2006/11/23/rails-1-2-release-candidate-1">ดูได้ที่นี่</a><br />
ส่วนใครอยากเอามาลองใช้ดูก่อน ก็เปิด Ruby console ใส่คำสั่งตามนี้</p>
<blockquote><p><code>gem install rails --source <a href="http://gems.rubyonrails.org" rel="nofollow">http://gems.rubyonrails.org</a> -y</code></p></blockquote>
<p><a href="http://weblog.rubyonrails.org/2007/1/5/rails-1-2-release-candidate-2">Rails 1.2: Release Candidate 2</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Ruby On Rails Cheat Sheet]]></title>
<link>http://elixer.wordpress.com/2007/01/15/ruby-on-rails-cheat-sheet/</link>
<pubDate>Mon, 15 Jan 2007 15:03:31 +0000</pubDate>
<dc:creator>remedy</dc:creator>
<guid>http://elixer.wordpress.com/2007/01/15/ruby-on-rails-cheat-sheet/</guid>
<description><![CDATA[ค้นได้จาก searchmash มีเยอะเหมือนกันแฮะ Ruby on Rails Cheat Sheet &#8211; ILoveJackDaniels.com RubyO]]></description>
<content:encoded><![CDATA[<p><strong>ค้นได้จาก searchmash  มีเยอะเหมือนกันแฮะ </strong></p>
<ul>
<li><strong><a href="http://www.ilovejackdaniels.com/cheat-sheets/ruby-on-rails-cheat-sheet/">Ruby on Rails Cheat Sheet &#8211; ILoveJackDaniels.com</a></strong></li>
<li><a href="http://www.blainekendall.com/index.php/rubyonrailscheatsheet/" rel="bookmark" title="RubyOnRails-Cheatsheet">RubyOnRails-Cheatsheet &#8211; blainekendall.com<br />
</a></li>
<li><strong><a href="http://www.rubyonrailsblog.com/articles/2006/10/04/ruby-on-rails-cheat-sheet-collectors-edition">Ruby on Rails Cheat Sheet Collectors Edition</a></strong></li>
<li><a href="http://blog.invisible.ch/files/rails-reference-1.1.html">InVisible Ruby On Rails Reference 1.1.2 &#8211; </a><a href="http://blog.invisible.ch/">InVisible Blog</a></li>
<li><a href="http://slash7.com/cheats/rails_files_cheatsheet.pdf">a Ruby on Rails cheat sheet by Amy Hoy  </a></li>
<li><strong><a href="http://slash7.com/cheats/form_helpers.pdf" title="slash7.com/cheats/form_helpers.pdf">FORM HELPERS</a></strong></li>
<li><a href="http://nubyonrails.com/articles/2006/08/24/ruby-rails-test-rails-cheat-sheet">Ruby, Rails, Test::Rails Cheat Sheet &#8211; nuby on rails</a></li>
<li><a href="http://nubyonrails.com/articles/2006/10/09/peepcode-rest-basics">PeepCode: REST Basics &#8211; nuby on rails</a></li>
</ul>
<p><strong>แหล่งรวม Cheat Sheet</strong> <a href="http://lorelle.wordpress.com/2005/10/10/html-css-php-and-more-cheat-sheets/">lorelle</a>, <a href="http://www.ilovejackdaniels.com/">ILoveJackDaniels</a>, <a href="http://kpumuk.info/internet/ruby-on-rails-related-cheat-sheets/">DmytroShteflyuk&#8217;s Home</a>, <a href="http://www.smashingmagazine.com/2006/10/30/cheat-sheet-round-up-ajax-css-latex-ruby/">smashing magazine</a>, <a href="http://blog.negonation.com/es/getting-started-with-ruby-on-rails">NegonationBlog</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[RubyGems Tip]]></title>
<link>http://elixer.wordpress.com/2007/01/14/rubygem-tip/</link>
<pubDate>Sun, 14 Jan 2007 05:07:26 +0000</pubDate>
<dc:creator>remedy</dc:creator>
<guid>http://elixer.wordpress.com/2007/01/14/rubygem-tip/</guid>
<description><![CDATA[จดไว้เผื่อ มีใครเจอปัญหา แบบเดียวกัน กับการใช้ RubyGems ถ้าจะติดตั้ง gem ผ่าน proxy ให้เปิด ruby con]]></description>
<content:encoded><![CDATA[<p>จดไว้เผื่อ มีใครเจอปัญหา แบบเดียวกัน กับการใช้ <a href="http://rubygems.org/">RubyGems</a></p>
<ul>
<li>ถ้าจะติดตั้ง gem ผ่าน proxy ให้เปิด ruby console ขึ้นมา แล้วพิมพ์คำสั่งนี้<br />
<code>set HTTP_PROXY=URL #แทน URL ด้วย address ของ proxy server</code></li>
</ul>
<ul>
<li>ถ้าจะติดตั้ง gem แบบ local ให้โหลด gem file มาไว้ใน path เดียวกับ ruby คือ C:/ruby แล้วพิมพ์คำสั่งตามนี้<br />
<code>gem install [gem name] # gem name ต้องใส่ทั้งชื่อและนามสกุลของไฟล์</code></li>
</ul>
<ul>
<li>ถ้า gem ที่จะติดตั้งมี dependency เยอะ ให้ใส่คำสั่งตามนี้จะได้ไม่เสียเวลามาคอยกด y ทุก dependency<br />
<code>gem install [gem name] -y #ถ้าติตดั้ง แบบ remote gem name ใส่แค่ชื่ออย่างเดียว ไม่ต้องใส่เวอร์ชัน กับนามสกุล</code></li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Cream]]></title>
<link>http://elixer.wordpress.com/2007/01/13/cream/</link>
<pubDate>Sat, 13 Jan 2007 15:14:14 +0000</pubDate>
<dc:creator>remedy</dc:creator>
<guid>http://elixer.wordpress.com/2007/01/13/cream/</guid>
<description><![CDATA[หลังจากลองมาหลายตัวแล้วทั้ง text editor ทั้ง IDE ก็ยังหาที่ถูกใจ ไม่ได้อยู่ดี ก็เลยลองกลับมาดู ตัวที]]></description>
<content:encoded><![CDATA[<p>หลังจากลองมาหลายตัวแล้วทั้ง text editor ทั้ง IDE ก็ยังหาที่ถูกใจ ไม่ได้อยู่ดี ก็เลยลองกลับมาดู ตัวที่คนอื่นชอบใช้กัน ที่เห็นบ่อยๆก็มี <a href="http://www.gnu.org/software/emacs/">Emacs</a> , <a href="http://www.vim.org/">Vim</a> แล้วก็ <a href="http://www.jedit.org/">jEdit</a> นี่แหละ แต่หลังจากลองใช้ดู ก็รู้สึกว่าสองโปรแกรมแรก นี่เทพเกินไป โดยเฉพาะ Emacs อย่างเราคงต้องใช้เวลาเรียนรู้อีกนาน ส่วน jEdit ก็ลูกเล่นเยอะไป จนไม่รู้จะใช้อะไรดี แถมช้าอีก<br />
อ้าวแล้วเราจะได้ text editor มาใช้มั้ยนี่ ใช้ตัวหลักไม่ได้ ก็ลองเล่นเครือญาติมันแล้วกัน<br />
ดูที่ Emacs ก่อน นี่มันแตกมาเป็น <a href="http://www.xemacs.org/">XEmacs</a> แล้ว ก็ยังเทพอยู่ดี<br />
ลองดูสาย Vim บ้างดิ อะเจอแล้ว <a href="http://cream.sourceforge.net/index.html"><strong>Cream</strong> <em>a modern configuration of the Vim text editor</em> </a> ดูแล้วน่าจะใช้ง่ายดีนะ<br />
มี คนเขียน <a href="http://www.tpope.net/node/96">Plugin</a> สำหรับใช้กับ Ruby on Rails ไว้ซะด้วยสรุปแล้วใช้ Cream นี่แหละ<br />
แต่ที่สำคัญคือ อยากได้ ฟอนท์ bitstream vera อะ ทำไมค้นไม่เจอเลย ใครรู้บ้างว่ามันโหลดได้จากที่ไหนนี่</p>
<p><strong>แถม</strong><em> </em>ระหว่างที่ค้นข้อมูลก็บังเอิญไปเจอว่า <a href="http://www.crimsoneditor.com/" title="www.crimsoneditor.com/"><strong>Crimson Editor</strong></a> Open source แล้ว แถมเปลี่ยนชื่อใหม่เป็น <a href="http://www.emeraldeditor.com/" class="external text" title="http://www.emeraldeditor.com/">Emerald Editor</a> แล้วก็เจอ textmate inspired text editor (ผู้สร้างเค้า้บอกว่าไม่ได้โคลน) ที่ชื่อว่า <a href="http://intype.info/">Intype</a> ที่พึ่งออกแค่เวอร์ชันอัลฟามาเอง แถมไม่ใช่ freeware ด้วย</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Haml ]]></title>
<link>http://elixer.wordpress.com/2007/01/13/haml/</link>
<pubDate>Sat, 13 Jan 2007 02:17:19 +0000</pubDate>
<dc:creator>remedy</dc:creator>
<guid>http://elixer.wordpress.com/2007/01/13/haml/</guid>
<description><![CDATA[Haml เป็น template engine ตัวใหม่ของ Rails ที่ดูแล้วน่าจะเขียนง่ายกว่า ERB ซึ่งผู้สร้างได้ทำ Haml ออ]]></description>
<content:encoded><![CDATA[<p><acronym title="HTML Abstraction Markup Language">Haml</acronym> เป็น template engine ตัวใหม่ของ Rails ที่ดูแล้วน่าจะเขียนง่ายกว่า ERB ซึ่งผู้สร้างได้ทำ Haml ออกมา โดยยึดหลัก 4 ข้อตามนี้</p>
<ul>
<li>  Markup should be beautiful</li>
<li>   Markup should be DRY</li>
<li>   Markup should be well-indented</li>
<li>   XHTML structure should be clear</li>
</ul>
<p><!--more--><br />
โดยอันนี้จะเป็นโค้ดของ Haml</p>
<pre>%html  %head%title HAML Demo

%body

#container

.content

%p Stop. HAML time</pre>
<p>ซึ่งมันจะแปลงออกมาเป็นแบบนี้<br />
ี</p>
<pre>&#60;html&#62;  &#60;head&#62;&#60;title&#62;HAML Demo&#60;/title&#62;&#60;/head&#62;&#60;body&#62;

&#60;div id='container'&#62;

&#60;div class='content'&#62;

&#60;p&#62;Stop. HAML time&#60;/p&#62;

&#60;/div&#62;

&#60;/div&#62;

&#60;/body&#62;

&#60;/html&#62;</pre>
<p>ดูแล้ว จะเห็นว่ามันเขียนคล้ายๆ CSS เลย<br />
ใครอยากเอามาลองใช้ ให้เปิด ruby console ขึ้นมา แล้วใส่คำสั่งนี้เพื่อติดตั้ง Haml plugin ได้เลย<br />
<code>ruby script\plugin install svn://hamptoncatlin.com/haml/tags/stable</code></p>
<p><a href="http://haml.hamptoncatlin.com/">Haml &#8211; HTML Abstraction Markup Language </a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Twin Cities Code Camp Follow-up]]></title>
<link>http://subjunctive.us/2006/11/17/twin-cities-code-camp-follow-up/</link>
<pubDate>Fri, 17 Nov 2006 02:33:41 +0000</pubDate>
<dc:creator>Chris Sutton</dc:creator>
<guid>http://subjunctive.us/2006/11/17/twin-cities-code-camp-follow-up/</guid>
<description><![CDATA[I did my first Code Camp talk last weekend up in the Cities and had a great time. My time slot was 9]]></description>
<content:encoded><![CDATA[<p>I did my <a href="http://subjunctive.wordpress.com/2006/10/23/twin-cities-code-camp/">first  Code Camp talk</a> last weekend up in the Cities and had a great time.  My time slot was 9am and it was in a huge seminar room (which caught me a little off guard).  I was envisioning a smaller more intimate setting maybe 15 people, but I ended up with 30+.  I got good feedback from many of the people who attended and I&#8217;ve adjusted my talk to really show the value of <a href="http://wpf.netfx3.com/">WPF</a> more clearly.   I&#8217;m improving the demos to get to point a little quicker and cutting back on the time I spend talking about the background to WPF.</p>
<p>To be honest, working with WPF makes me want to do Windows programming for the first time.  I&#8217;ve done mostly web development for the last 7 years, so it pretty cool to find a new way to develop for the desktop and have it change my bias toward the web.  The whole stateless nature of the the web and web development has always made sense to me but I&#8217;m coming around.</p>
<p>The quality of the the speakers I listened to was fantastic.  For the price of the Code Camp ($0) I can&#8217;t say enough good things about the quality of the speakers.  I got to present in the same room as <a href="http://www.lhotka.net/weblog/">Rocky Lhotka</a> (only 7 hours earlier <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).  If you are interested in intelligent business objects and you work in the .Net world you really should look at his CSLA framework.  I&#8217;ve been reading his blog and books for about 3 years now and have learned a lot from him.</p>
<p><a href="http://www.ntschutta.com/jat/">Nathaniel Schutta</a>&#8216;s AJAX talk was great. I only got to talk with him briefly, but got a better view of what is going on with AJAX and got a great overview of the players involved (dojo, Google Web Toolkit, etc).</p>
<p><a href="http://www.thoughtstoblog.com/">Jake Good</a> is a Rails developer up in Minneapolis for Space 150.  I think Jake&#8217;s talk was the most entertaining, I got to see some good Ruby integration with the CLR, the hybrid monster and hear about Guitar Hero.</p>
<p>Michael Dunn gave a good talk on the <a href="http://www.microsoft.com/speech/default.mspx">Microsoft Speech</a> technologies.  I probably won&#8217;t use it any time soon, but it was pretty cool to see what it can do.</p>
<p>The best talk I heard was <a href="http://aspadvice.com/blogs/robertb/">Robert Boedigheimer</a>&#8216;s talk on cryptography.  He was presenting out at the Heartland Developers Conference, but I missed his talks so this was the first time I had heard him.  His knowledge of the topic, clarity and the ease of his talk was top notch.</p>
<p>Big thanks to <a href="http://www.jasonbock.net/JB/Default.aspx">Jason Bock</a> for organizing and coordinating the Code Camp.  Maybe we&#8217;ll have one in Iowa next year.</p>
]]></content:encoded>
</item>

</channel>
</rss>
