<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4314462642856995692</id><updated>2011-12-27T18:57:57.042+08:00</updated><category term='Connection Pool'/><category term='1.2.3'/><category term='CCH'/><category term='SQLite3'/><category term='2.3.7'/><category term='Edge Rails'/><category term='Nested Forms'/><category term='Adapter'/><category term='Rails IDE'/><category term='2.3.0'/><category term='Active Resource'/><category term='script/generate'/><category term='Testing'/><category term='Galileo'/><category term='3.0.3'/><category term='2.3.6'/><category term='Ganymade'/><category term='JRuby'/><category term='git'/><category term='Rails Basics'/><category term='Ruby 1.8.6'/><category term='Debugger'/><category term='Ruby 1.9'/><category term='acts_as_authenticated'/><category term='Action Pack'/><category term='MySQL'/><category term='2.3.2'/><category term='Scaffolding'/><category term='Rails Plugins'/><category term='1.2.5'/><category term='Interbase'/><category term='XML'/><category term='Active Scaffold'/><category term='CRUD'/><category term='Metal'/><category term='Guides'/><category term='Active Support'/><category term='2.3.9'/><category term='Templates'/><category term='Views'/><category term='2.0'/><category term='Eclipse'/><category term='DHH'/><category term='Internationalization'/><category term='2.38'/><category term='role_requirement'/><category term='Helpers'/><category term='session fixation attacks'/><category term='1.2.6'/><category term='Installation'/><category term='Capistrano'/><category term='Aptana Studio'/><category term='Instant Rails'/><category term='MVC'/><category term='2.3.4'/><category term='2.0.1'/><category term='3.05'/><category term='Advanced Rails'/><category term='AJAX'/><category term='Controllers'/><category term='eTag'/><category term='Active Record'/><category term='Thread Safety'/><category term='Tutorials'/><category term='restful_authentication'/><category term='Ubuntu 9.04'/><category term='Resources'/><category term='2.2'/><category term='2.3.3'/><category term='Terminal'/><category term='3.0.9'/><category term='JSON'/><category term='Rake'/><category term='touch'/><category term='Radrails'/><category term='Mongrel'/><category term='3rdRail'/><category term='Action Mailer'/><category term='Migration'/><category term='2.3.5'/><category term='active_scaffold_tools'/><category term='subclipse'/><category term='Announcements'/><category term='Models'/><category term='Mandriva'/><category term='Engines'/><category term='YAML'/><category term='2.39'/><category term='Ruby Gems'/><category term='role_requiremnt'/><category term='Rack'/><category term='Ruby'/><category term='Database'/><category term='Linux'/><category term='2.0.2'/><category term='3.0'/><category term='2.3'/><category term='acts_as_audited'/><category term='Ubuntu'/><category term='Validations'/><category term='Passenger'/><category term='record_select'/><category term='Books'/><title type='text'>Rails... Rails... Rails</title><subtitle type='html'>Chee Chong Hwa aka CCH, a Malaysian Chief Software Architect blogs on his experiences with Ruby on Rail running on Win2003 Server+Apache 2.26 environment since 2007 as well as on Ubuntu 9.04 since 2009</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>62</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-1851457562698318835</id><published>2011-07-12T22:44:00.000+08:00</published><updated>2011-07-12T22:44:40.360+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='3.0.9'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Rails 3.0.9 has been released!</title><content type='html'>CCH : From Riding Rails&lt;br /&gt;&lt;br /&gt;Posted by aaronp June 16, 2011 @ 10:27 AM       &lt;br /&gt;Hi everybody!&lt;br /&gt;Rails 3.0.9 has been released!  Since I am at Nordic Ruby, I will deem this Nordic Ruby Edition. ;-)&lt;br /&gt;The main boogs fixed in this release are problems dealing with modifications of SafeBuffers.&lt;br /&gt;&lt;code&gt;gem install rails&lt;/code&gt; or update your Gemfile and &lt;code&gt;bundle update&lt;/code&gt; while it's hot!&lt;br /&gt;&lt;h2&gt;CHANGES&lt;/h2&gt;The major changes in this release of Rails are bug fixes surrounding  modifications to SafeBuffer strings.  We had places that were modifying  SafeBuffers and those places raised exceptions after the security fixes  in the 3.0.8 release.&lt;br /&gt;We've since updated those code paths, and now we have this nice release for you today!&lt;br /&gt;Please check the CHANGELOG files in each section on github for more details.&lt;br /&gt;For an exhaustive list of the commits in this release, please see &lt;a href="https://github.com/rails/rails/compare/v3.0.8...v3.0.9"&gt;github&lt;/a&gt;.&lt;br /&gt;&lt;h2&gt;Gem checksums&lt;/h2&gt;SHA-1:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;fb8f3c0b6c866dbad05ec33baf2af7e851f9d745  actionmailer-3.0.9.gem&lt;/li&gt;&lt;li&gt;9bc2c05463962320d0497bb2e30f4ffa66ed4f79  actionpack-3.0.9.gem&lt;/li&gt;&lt;li&gt;2c1004747a22f756722cf95605398bf9ba6244ed  activemodel-3.0.9.gem&lt;/li&gt;&lt;li&gt;285759d41c79460a3f49d26d8a0b3f8c9279e868  activerecord-3.0.9.gem&lt;/li&gt;&lt;li&gt;28f2b296525caeca1341467b5f1bbb90de88aaa7  activesupport-3.0.9.gem&lt;/li&gt;&lt;li&gt;09d52fdcbeefba31dd267d3d7484332ec30f7539  rails-3.0.9.gem&lt;/li&gt;&lt;li&gt;8b46dbeddb56e2e4b4ebfb5312fe81eb865a47e7  railties-3.0.9.gem&lt;/li&gt;&lt;/ul&gt;Please enjoy this release of Rails!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-1851457562698318835?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/1851457562698318835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=1851457562698318835&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/1851457562698318835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/1851457562698318835'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2011/07/rails-309-has-been-released.html' title='Rails 3.0.9 has been released!'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-6276270839463938916</id><published>2011-03-22T17:45:00.000+08:00</published><updated>2011-03-22T17:45:06.195+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><category scheme='http://www.blogger.com/atom/ns#' term='3.05'/><title type='text'>Rails 3.0.5 has been released!</title><content type='html'>&amp;nbsp;CCH: From Riding Rails Blog&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="metaData"&gt;Posted by spastorino February 27, 2011 @ 03:52 PM&lt;/div&gt;Aaron Patterson showed us some tenderlove this week by releasing Rails &lt;a href="http://rubygems.org/gems/rails/versions/3.0.5"&gt;3.0.5&lt;/a&gt;. Have a peek at what got updated.&lt;br /&gt;&lt;h2&gt;Bugs Fixed&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Fix when gzip returns a &lt;span class="caps"&gt;UTF&lt;/span&gt;-8 string on Ruby 1.9, when it is actually binary. &lt;a href="https://github.com/rails/rails/commit/31690ea8b3420aea4ea4427e1599665d093c974f"&gt;commit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Active Record limit values will not escape Arel &lt;span class="caps"&gt;SQL&lt;/span&gt; Literal nodes. &lt;a href="https://github.com/rails/rails/commit/7530c5224c77202d62f44a26ae5036d1dc00f579"&gt;commit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Relation#where calls will always produce &lt;span class="caps"&gt;AND&lt;/span&gt; statements regardless of how conditions hashes behaves (&lt;a href="https://github.com/rails/rails/commit/41c35abed778a7a03e7a9c14009321cd6bc11c26"&gt;reverting 00693209ecc&lt;/a&gt;).&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Observer callbacks will only be executed once when using &lt;span class="caps"&gt;STI&lt;/span&gt; classes in ActiveRecord. &lt;a href="https://github.com/rails/rails/commit/ee491b064bff126a67600d694511986b8636d47b"&gt;commit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Deprecations Added:&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Deprecate Relation#&amp;amp; alias for Relation#merge. &lt;a href="https://github.com/rails/rails/commit/66003f596452aba927312c4218dfc8d408166d54"&gt;commit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Deprecated support for interpolated association conditions with the    :conditions =&amp;gt; ‘foo = #{bar}’ syntax, and added the new interpolation syntax    which is :conditions =&amp;gt; proc { “foo = #{bar}” }. &lt;a href="https://github.com/rails/rails/commit/756e70cb4492ded56b72b1601da7d198eaf7b840"&gt;commit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;This is not a complete list of changes.  The complete list of changes can be found &lt;a href="https://github.com/rails/rails/compare/v3.0.4...v3.0.5"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;&lt;span class="caps"&gt;SHA1&lt;/span&gt; Checksums:&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;actionmailer-3.0.5.gem b25750c8126aa21db27d7b0ee829b2e94e525ebc&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;actionpack-3.0.5.gem 0a6f7f9ac2960ff224c913877a2917e1bea80df3&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;activemodel-3.0.5.gem 1556900a7afa1cdcdf4641edbcdd2c24f98bb2de&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;activerecord-3.0.5.gem 33dd05d7362931564f6f15ea7130cc27a5fc09e8&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;activeresource-3.0.5.gem 758f893cbb7ef945c857bf4ca044b94017bdc437&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;activesupport-3.0.5.gem 195fa3f7fa044134703a655cdb906edb515286c4&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;rails-3.0.5.gem 32322bf9952d76c5fa0054c8533c0c58609f40aa&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;railties-3.0.5.gem 3dddf14736dec991c3dbbe2d89495613e72c19c7&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-6276270839463938916?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/6276270839463938916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=6276270839463938916&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/6276270839463938916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/6276270839463938916'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2011/03/rails-305-has-been-released.html' title='Rails 3.0.5 has been released!'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-2066457570373511642</id><published>2011-02-05T19:28:00.002+08:00</published><updated>2011-02-05T19:28:31.274+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><title type='text'>Rails for Zombies</title><content type='html'>&lt;b&gt;Posted by Gregg Pollack November 18, 2010 @ 07:01 PM on Riding Rails&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This morning my team over at Envy Labs &lt;a href="http://blog.envylabs.com/2010/11/rails-for-zombies-released/" title="Rails for Zombies Released!"&gt;released&lt;/a&gt; a free online tutorial called &lt;a href="http://railsforzombies.org/"&gt;Rails for Zombies&lt;/a&gt;.   The website combines screencasts with in-browser coding to provide an  interactive learning experience teaching the basics of Ruby on Rails.&lt;br /&gt;&lt;a href="http://railsforzombies.org/" title="Rails for Zombies"&gt;&lt;img alt="Rails for Zombies" src="http://weblog.rubyonrails.org/assets/2010/11/18/Rails_for_Zombies-1.jpg" style="border: medium none; float: right; margin: 0pt 0pt 5px 5px;" /&gt;&lt;/a&gt;&lt;br /&gt;Learning Rails for the first time should be fun, and &lt;a href="http://railsforzombies.org/"&gt;Rails for Zombies&lt;/a&gt;  allows you to get your feet wet without any setup or configuration.  At  the moment the application has five episodes.  Each episode consists of  a single screencast followed by a group of exercises which must be  completed before moving forward.  Once you complete all the labs, you  unlock a hidden video which shows you where to go to continue your Rails  learning.&lt;br /&gt;If you have any friends who need to get started with Rails, hopefully this will help.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-2066457570373511642?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/2066457570373511642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=2066457570373511642&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2066457570373511642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2066457570373511642'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2011/02/rails-for-zombies.html' title='Rails for Zombies'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-6545215231378781962</id><published>2011-02-05T19:27:00.000+08:00</published><updated>2011-02-05T19:27:24.438+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='3.0.3'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>.Rails 3.0.3: Faster Active Record plus fixes Released on 15 Nov 2010</title><content type='html'>&lt;b&gt;Posted by David November 15, 2010 @ 07:34 PM on Riding Rails&lt;/b&gt;       &lt;br /&gt;How about some free speed? Well, here you go. Rails 3.0.3  includes a much faster version of Active Record that reclaims the  performance lost when we went from Rails 2.3.x to 3.x and then some.  Aaron Patterson has done a phenomenal job benchmarking, tweaking, and  tuning the ARel engine that underpins Active Record 3 and the result is  Teh Snappy.&lt;br /&gt;You can read more about Aaron’s work in his &lt;a href="http://engineering.attinteractive.com/2010/10/arel-two-point-ohhhhh-yaaaaaa/"&gt;ARel 2.0 write-up&lt;/a&gt;. If you dare, you can also have a look at &lt;a href="http://www.slideshare.net/tenderlove/zomg-why-is-this-code-so-slow"&gt;his RubyConf slides&lt;/a&gt; that went over the rewrite and speed-up in even greater detail (warning: there are slides of boys kissing!).&lt;br /&gt;In addition to the free speed, we’ve also included a truckload of  minor fixes. So everything just works better and faster. What more can  you ask for? Oh, that it’s a drop-in replacement for Rails 3.0—there are  no &lt;span class="caps"&gt;API&lt;/span&gt; changes. You got it.&lt;br /&gt;See all &lt;a href="https://github.com/rails/rails/compare/v3.0.0...3-0-stable"&gt;the changes on Github&lt;/a&gt;. Install the latest version using &lt;code&gt;gem install rails&lt;/code&gt;. Or bind yourself to &lt;a href="https://github.com/rails/rails/tree/v3.0.3"&gt;the v3.0.3 tag&lt;/a&gt;.&lt;br /&gt;Enjoy!&lt;br /&gt;&lt;small&gt;Note: Active Record 3.0.3 is mistakenly reporting its tiny  version as 1 instead of 3. This has no impact on anything you do unless  you were specifically checking that tiny version. But if it bothers you  lots, it’s fixed on the 3-0-stable branch.&lt;/small&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-6545215231378781962?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/6545215231378781962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=6545215231378781962&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/6545215231378781962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/6545215231378781962'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2011/02/rails-303-faster-active-record-plus.html' title='.Rails 3.0.3: Faster Active Record plus fixes Released on 15 Nov 2010'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-5204236078205092763</id><published>2011-02-05T19:25:00.000+08:00</published><updated>2011-02-05T19:25:47.159+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='2.3.9'/><category scheme='http://www.blogger.com/atom/ns#' term='2.3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Security Vulnerability in Nested Attributes code in Ruby On Rails 2.3.9 and 3.0.0</title><content type='html'>&lt;b&gt;Posted by michael October 15, 2010 @ 02:35 AM on Riding Rails&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There is a vulnerability in the nested attributes handling code  in some versions of Ruby on Rails.  An attacker could manipulate form  parameters and make changes to records other than those the developer  intended. This vulnerability has been assigned the identifier &lt;span class="caps"&gt;CVE&lt;/span&gt;-2010-3933.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Versions Affected:  3.0.0, 2.3.9&lt;/li&gt;&lt;li&gt;Not affected:       Versions earlier than 2.3.9 and applications which do not use accepts_nested_attributes_for&lt;/li&gt;&lt;li&gt;Fixed Versions:     3.0.1, 2.3.10&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Impact&lt;/h2&gt;An attacker could change parameter names for form inputs and make  changes to arbitrary records in the system.  All users running an  affected release should upgrade immediately.&lt;br /&gt;&lt;h2&gt;Releases&lt;/h2&gt;The 3.0.1 and 2.3.10 releases are available at the normal locations.  The 3.0.1 release consists solely of 3.0.0 with the security issue  fixed, 3.0.2 will follow shortly and include other bugfixes as well as  this fix.  2.3.10 is a regular release in the 2.3 series.&lt;br /&gt;&lt;h2&gt;Workarounds&lt;/h2&gt;There are no feasible workarounds for this issue.&lt;br /&gt;&lt;h2&gt;Patches&lt;/h2&gt;To aid users who aren’t able to upgrade immediately we have provided  patches for the two supported release series.  They are in git-am  format and consist of a single changeset.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://weblog.rubyonrails.org/assets/2010/10/15/2-3-nested_attributes.patch"&gt;Patch for 2.3 series&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://weblog.rubyonrails.org/assets/2010/10/15/3-0-nested_attributes.patch"&gt;Patch for 3.0 series&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Please note that only the  2.3.x and 3.0.x series are supported at  present.  Users of earlier unsupported releases are advised to upgrade  as soon as possible.&lt;br /&gt;&lt;h2&gt;Credits&lt;/h2&gt;Thanks to Matti Paksula and Juha Suuraho of &lt;a href="http://enemy.fi/"&gt;Enemy &amp;amp; Sons Ltd&lt;/a&gt; for reporting the vulnerability to us and helping verify the fix.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-5204236078205092763?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/5204236078205092763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=5204236078205092763&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5204236078205092763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5204236078205092763'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2011/02/security-vulnerability-in-nested.html' title='Security Vulnerability in Nested Attributes code in Ruby On Rails 2.3.9 and 3.0.0'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-4753046720682946246</id><published>2011-02-05T19:24:00.000+08:00</published><updated>2011-02-05T19:24:03.789+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='2.3.9'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Ruby on Rails 2.3.9 Released on 4th September 2010</title><content type='html'>&lt;h2&gt;&lt;a href="http://weblog.rubyonrails.org/2010/9/4/ruby-on-rails-2-3-9-released"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;div class="metaData"&gt;&lt;b&gt;Posted by Jeremy Kemper September 04, 2010 @ 09:45 PM&lt;/b&gt;&lt;/div&gt;&lt;div class="metaData"&gt;&lt;br /&gt;&lt;/div&gt;We’ve released Ruby on Rails 2.3.9 (&lt;a href="http://rubygems.org/gems/rails/versions/2.3.9"&gt;gem&lt;/a&gt; and &lt;a href="http://github.com/rails/rails/tree/v2.3.9"&gt;git tag&lt;/a&gt;)  to extend the 2.3.8 bridge a few steps closer to Rails 3 and Ruby 1.9.  If your app runs on Rails 2.3.9 without deprecation warnings, you’re  looking good for an upgrade to Rails 3.&lt;br /&gt;&lt;h4&gt;Deprecations&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Changes i18n named-interpolation syntax from the deprecated &lt;code&gt;Hello {{name}}&lt;/code&gt; to the 1.9-native &lt;code&gt;Hello %{name}&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Replaces &lt;code&gt;Kernel#returning&lt;/code&gt; with &lt;code&gt;Object#tap&lt;/code&gt; which is native to Ruby 1.8.7.&lt;/li&gt;&lt;li&gt;Renames &lt;code&gt;Array#random_element&lt;/code&gt; to &lt;code&gt;Array#sample&lt;/code&gt; which is native to Ruby 1.9.&lt;/li&gt;&lt;li&gt;Renames &lt;code&gt;config.load_paths&lt;/code&gt; and &lt;code&gt;.load_once_paths&lt;/code&gt; to the more accurate &lt;code&gt;config.autoload_paths&lt;/code&gt; and &lt;code&gt;.autoload_once_paths&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;Along with these deprecations come a broad array of bugfixes and minor tweaks. Read the &lt;a href="http://github.com/rails/rails/compare/v2.3.8...v2.3.9"&gt;commit log&lt;/a&gt; for the full story.&lt;br /&gt;Onward to 3.1!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-4753046720682946246?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/4753046720682946246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=4753046720682946246&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/4753046720682946246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/4753046720682946246'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2011/02/ruby-on-rails-239-released-on-4th.html' title='Ruby on Rails 2.3.9 Released on 4th September 2010'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-827976119514819201</id><published>2010-10-05T11:44:00.000+08:00</published><updated>2010-10-05T11:44:26.795+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Rails 3.0: It's ready!</title><content type='html'>&lt;b&gt;CCH : As posted by DHH on Riding Rails&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;Posted by David August 29, 2010 @ 06:28 PM&lt;br /&gt;&lt;br /&gt;Rails  3.0 has been underway for a good two years, so it’s with  immense  pleasure that we can declare it’s finally here. We’ve brought  the work  of more than 1,600 contributors together to make everything  better,  faster, cleaner, and more beautiful.&lt;br /&gt;This third generation of  Rails has seen thousands of commits, so  picking what to highlight was  always going to be tough and incomplete.  But here’s a choice selection  of major changes for Rails 3:&lt;br /&gt;&lt;b&gt;New Active Record query engine&lt;/b&gt;&lt;br /&gt;Active Record has adopted &lt;a href="http://github.com/brynary/arel"&gt;the ARel query engine&lt;/a&gt;   to make scopes and queries more consistent and composable. This makes   it much easier to build complex queries over several iterations. We  also  delay the actual execution of the query until it’s needed. Here’s a   simple example:&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre style="font-size: 12px;"&gt;users = User.where(:name =&amp;gt; "david").limit(20)&lt;br /&gt;users = users.where("age &amp;gt; 29")&lt;br /&gt;&lt;br /&gt;# SELECT * FROM users &lt;br /&gt;# WHERE name = "david" AND age &amp;gt; 29 &lt;br /&gt;# ORDER BY name&lt;br /&gt;# LIMIT 20&lt;br /&gt;users.order(:name).each { |user| puts user.name }&lt;/pre&gt;Read more in &lt;a href="http://guides.rubyonrails.org/active_record_querying.html"&gt;new Active Record guide&lt;/a&gt; and watch the &lt;a href="http://rubyonrails.org/screencasts/rails3/active-relation-active-model"&gt;Dive into Rails 3: ARel video&lt;/a&gt;.&lt;br /&gt;&lt;b&gt;New router for Action Controller&lt;/b&gt;&lt;br /&gt;When we switched to a &lt;span class="caps"&gt;REST&lt;/span&gt;-based  approach for  controllers in Rails 2, we patched on the syntax to the  existing router  while we were waiting to see if the experiment panned  out.&lt;br /&gt;It did and for Rails 3 we’ve gone back and revamped the syntax completely to favor the &lt;span class="caps"&gt;REST&lt;/span&gt; style with less noise and more flexibility:&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre style="font-size: 12px;"&gt;resources :people do&lt;br /&gt;  resource :avatar&lt;br /&gt;&lt;br /&gt;  collection do&lt;br /&gt;    get :winners, :losers&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;# /sd34fgh/rooms&lt;br /&gt;scope ':token', :token =&amp;gt; /\w{5,5}/ do&lt;br /&gt;  resources :rooms&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;# /descriptions&lt;br /&gt;# /pl/descriptions&lt;br /&gt;# /en/descriptions&lt;br /&gt;scope '(:locale)', :locale =&amp;gt; /en|pl/ do&lt;br /&gt;  resources :descriptions&lt;br /&gt;  root :to =&amp;gt; 'projects#index'&lt;br /&gt;end&lt;/pre&gt;Read more in the &lt;a href="http://edgeguides.rubyonrails.org/routing.html"&gt;new routing guide&lt;/a&gt;.&lt;br /&gt;&lt;b&gt;New Action Mailer&lt;/b&gt;&lt;br /&gt;Action  Mailer was born with a split-personality of half model, half   controller. In Rails 3, we’ve made the choice to make it all controller.   This means that the feel and functionality will be much closer to   Action Controller and in fact they now share a bunch of underlying code.   Here’s a taste of what it looks like now:&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre style="font-size: 12px;"&gt;class Notifier &amp;lt; ActionMailer::Base&lt;br /&gt;  default :from =&amp;gt;&lt;br /&gt;    "Highrise &lt;system@#{application_domain}&gt;" &lt;br /&gt;&lt;br /&gt;  def new_project(digest, project, person)&lt;br /&gt;    @digest, @project, @person = digest, project, person&lt;br /&gt;&lt;br /&gt;    attachments['digest.pdf'] = digest.to_pdf&lt;br /&gt;    attachments['logo.jpg']   = File.read(project.logo_path)&lt;br /&gt;&lt;br /&gt;    mail(&lt;br /&gt;      :subject =&amp;gt; "Your digest for #{project.name}",&lt;br /&gt;      :to =&amp;gt; person.email_address_with_name&lt;br /&gt;    ) do |format|&lt;br /&gt;      format.text { render :text =&amp;gt; "Something texty" }&lt;br /&gt;      format.html { render :text =&amp;gt; "Something &lt;i&gt;texty&lt;/i&gt;" }&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;/system@#{application_domain}&gt;&lt;/pre&gt;The new Action Mailer is built on top of &lt;a href="http://github.com/mikel/mail"&gt;the new Mail gem&lt;/a&gt; as well. Say goodbye to TMail headaches.&lt;br /&gt;Read more in &lt;a href="http://edgeguides.rubyonrails.org/action_mailer_basics.html"&gt;new Action Mailer guide&lt;/a&gt;.&lt;br /&gt;&lt;b&gt;Manage dependencies with Bundler&lt;/b&gt;&lt;br /&gt;Managing  all the dependencies of a Rails application has long been a  hassle of  patchworks. We had config.gem, Capistrano externals, custom  rake setup  tasks, and other incomplete solutions.&lt;br /&gt;Bundler cleans all that up  and allows you to specify the libraries,  frameworks, and plugins that  your application depends on. All Rails 3  applications are born with a  Gemfile to control it all. See more on &lt;a href="http://gembundler.com/"&gt;the Bundler site&lt;/a&gt;.&lt;br /&gt;&lt;b&gt;&lt;span class="caps"&gt;XSS&lt;/span&gt; protection by default&lt;/b&gt;&lt;br /&gt;The internet is a scary place and Rails 3 is watching out for you by default. We’ve had &lt;a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery"&gt;&lt;span class="caps"&gt;CRSF&lt;/span&gt;&lt;/a&gt; protection with form signing for a while and &lt;a href="http://en.wikipedia.org/wiki/SQL_injection"&gt;&lt;span class="caps"&gt;SQL&lt;/span&gt;-injection&lt;/a&gt; protection since the beginning, but Rails 3 ups the anté with &lt;span class="caps"&gt;XSS&lt;/span&gt; protection as well (hat tip to Django for convincing us).&lt;br /&gt;See the &lt;a href="http://railscasts.com/episodes/204-xss-protection-in-rails-3"&gt;Railscast on &lt;span class="caps"&gt;XSS&lt;/span&gt; video&lt;/a&gt; and &lt;a href="http://rubyonrails.org/screencasts/rails3/xss-ujs"&gt;the Dive into Rails 3: Cross-site scripting video&lt;/a&gt; for more.&lt;br /&gt;&lt;b&gt;Say goodbye to encoding issues&lt;/b&gt;&lt;br /&gt;If you browse the Internet with any frequency, you will likely encounter the � character. This problem is &lt;a href="http://imysql.cn/docs/MySQL_51_en/ch10s10.html"&gt;extremely pervasive&lt;/a&gt;, and is caused by mixing and matching content with different encodings.&lt;br /&gt;In  a system like Rails, content comes from the database, your  templates,  your source files, and from the user. Ruby 1.9 gives us the  raw tools  to eliminate these problems, and in combination with Rails 3, �  should  be a thing of the past in Rails applications. Never struggle  with  corrupted data pasted by a user from Microsoft Word again!&lt;br /&gt;&lt;b&gt;Active Model: Validations, callbacks, etc for all models&lt;/b&gt;&lt;br /&gt;We’ve extracted quite a bit of commonly requested Active Record components into the new Active Model framework. This allows an &lt;span class="caps"&gt;ORM&lt;/span&gt; like &lt;a href="http://github.com/mongoid/mongoid/blob/master/lib/mongoid/validations.rb#L11"&gt;Mongoid&lt;/a&gt; to use Active Record’s validations, callbacks, serialization, and i18n support.&lt;br /&gt;Additionally, in the rewrite of Action Controller, we removed any direct references to Active Record, defining a clean, simple &lt;span class="caps"&gt;API&lt;/span&gt; that ORMs can implement. If you use an &lt;span class="caps"&gt;API&lt;/span&gt;-compliant &lt;span class="caps"&gt;ORM&lt;/span&gt;   (like DataMapper, Sequel, or Mongoid), you will be able to use  features  like form_for, link_to and redirect_to with objects from those  ORMs  without any additional work.&lt;br /&gt;&lt;b&gt;Official plugin APIs&lt;/b&gt;&lt;br /&gt;We also rewrote Railties with the express goal of using the new plugin &lt;span class="caps"&gt;API&lt;/span&gt; for all Rails frameworks like &lt;a href="http://github.com/rails/rails/blob/master/activerecord/lib/active_record/railtie.rb#L13"&gt;Active Record&lt;/a&gt; and &lt;a href="http://github.com/rails/rails/blob/master/actionmailer/lib/action_mailer/railtie.rb#L5"&gt;Action Mailer&lt;/a&gt;. This means that Rails plugins like the ones for &lt;a href="http://github.com/datamapper/dm-rails/blob/master/lib/dm-rails/railtie.rb#L23"&gt;DataMapper&lt;/a&gt; and &lt;a href="http://github.com/rspec/rspec-rails/blob/master/lib/rspec-rails.rb#L3"&gt;RSpec&lt;/a&gt; have access to all of the integration as the built-in support for Active Record and Test::Unit.&lt;br /&gt;The new Railtie &lt;span class="caps"&gt;API&lt;/span&gt;  makes it possible to  modify the built-in generators, add rake tasks,  configure default Rails  options, and specify code to run as early, or  as late as you need. Rails  plugins like &lt;a href="http://github.com/plataformatec/devise"&gt;Devise&lt;/a&gt;   were able to add much better integration in the Rails 3 version of   their plugin. Expect to see a lot more of that in the months ahead.&lt;br /&gt;&lt;b&gt;Rewritten internals&lt;/b&gt;&lt;br /&gt;We  rewrote the internals of Action Pack and Railties, making them much   more flexible and easier to extend. Instead of a single monolithic   ActionController::Base, Rails 3 exposes a number of modules, each with   defined APIs, that you can mix and match to create special-purpose   controllers for your own use. Both &lt;a href="http://github.com/rails/rails/blob/master/actionmailer/lib/action_mailer/base.rb#L333"&gt;Action Mailer in Rails&lt;/a&gt; and &lt;a href="http://github.com/apotonick/cells/blob/master/lib/cell/rails.rb#L5"&gt;the Cells project&lt;/a&gt; make heavy use of this new functionality.&lt;br /&gt;You can also take a look a &lt;a href="http://yehudakatz.com/2009/12/26/the-rails-3-router-rack-it-up/"&gt;this blog post by Yehuda&lt;/a&gt;   (from last year) to see how the new architecture makes it easy to   implement Django-style generic actions in Rails by leveraging Rack and   ActionController::Metal.&lt;br /&gt;The Rails generator system is got a  revamp as well. Instead of  monolithic generators that know about all of  the Rails frameworks, each  generator calls a series of hooks, such as  :test_framework and :orm,  that plugins can register handlers for. This  means that generating a  scaffold when using rSpec, DataMapper and Haml  will generate a scaffold  customized for those plugins.&lt;br /&gt;&lt;b&gt;Agnosticism with jQuery, rSpec, and Data Mapper&lt;/b&gt;&lt;br /&gt;The  rewritten internals and the new plugin APIs have brought true   agnosticism to Rails 3 for all components of the framework. Prefer   DataMapper to Active Record? &lt;a href="http://github.com/datamapper/dm-rails"&gt;No problem&lt;/a&gt;. Want to use jQuery instead of Prototype? &lt;a href="http://github.com/rails/jquery-ujs"&gt;Go ahead&lt;/a&gt;. Eager to test with rSpec instead of test/unit? &lt;a href="http://github.com/rspec/rspec-rails"&gt;You got it&lt;/a&gt;.&lt;br /&gt;It’s  never been easier to Have It Your Way™ with Rails 3. And at the  same  time, we’ve made that happen without making using the excellent  default  stack any more complicated.&lt;br /&gt;&lt;b&gt;Documentation&lt;/b&gt;&lt;br /&gt;Rails 3  has had a long development cycle and while that might have lead  to some  impatience, it has also given book and tutorial authors a chance  to  catch up and be ready. There’s a wealth of great Rails 3  documentation  available already and more is coming shortly.&lt;br /&gt;The &lt;a href="http://pragprog.com/titles/rails4/agile-web-development-with-rails"&gt;Agile Web Development with Rails 4th Ed&lt;/a&gt; book is almost ready and there are &lt;a href="http://www.amazon.com/s/ref=nb_sb_ss_c_1_7?url=search-alias%3Dstripbooks&amp;amp;field-keywords=rails+3&amp;amp;x=0&amp;amp;y=0&amp;amp;sprefix=rails+3&amp;amp;ih=5_1_1_0_0_0_0_0_0_1.38_159&amp;amp;fsc=5"&gt;plenty more books coming&lt;/a&gt;. Check out all the &lt;a href="http://guides.rubyonrails.org/"&gt;new guides&lt;/a&gt;, the &lt;a href="http://rubyonrails.org/screencasts/rails3"&gt;new official videos&lt;/a&gt;, &lt;a href="http://railscasts.com/"&gt;new Railscasts&lt;/a&gt;, and a &lt;a href="http://railstutorial.org/book"&gt;new tutorial&lt;/a&gt;. See the recent &lt;a href="http://weblog.rubyonrails.org/2010/8/28/rails-has-great-documentation"&gt;recap of documentation sources&lt;/a&gt; for more.&lt;br /&gt;&lt;b&gt;Installation&lt;/b&gt;&lt;br /&gt;&lt;code&gt;gem install rails --version 3.0.0&lt;/code&gt;.   We also have a Rails &lt;a href="http://github.com/rails/rails/tree/v3.0.0"&gt;v3.0.0 tag&lt;/a&gt; and a &lt;a href="http://github.com/rails/rails/tree/3-0-stable"&gt;3-0-stable branch&lt;/a&gt;.&lt;br /&gt;Rails 3.0 has been designed to work with Ruby 1.8.7, Ruby 1.9.2, and JRuby 1.5.2+.&lt;br /&gt;&lt;b&gt;Gratitude and next steps&lt;/b&gt;&lt;br /&gt;I’m  personally incredibly proud of this release. I’ve been working on   Rails for more than 7 years and the quality of the framework we have   today is just astounding. This is only possible as a community effort   and Rails 3 has seen so many incredible developers step up and help make   this &lt;i&gt;our best release ever&lt;/i&gt; (wink). Many thanks to all of you.&lt;br /&gt;We’ll continue to develop Rails 3.0 with fixes and tweaks via the stable branch and Rails 3.1 is already cooking on master.&lt;br /&gt;&lt;b&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;:&lt;/b&gt; We’re raising money for Charity:Water in the name of Rails 3.0. Please donate and help us &lt;a href="http://weblog.rubyonrails.org/2010/8/30/appreciate-rails-3-with-charity"&gt;bring clean water to 5,000 people in the name of the Rails community&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-827976119514819201?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/827976119514819201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=827976119514819201&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/827976119514819201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/827976119514819201'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2010/10/rails-30-its-ready.html' title='Rails 3.0: It&apos;s ready!'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-576852524933908095</id><published>2010-10-05T11:41:00.001+08:00</published><updated>2010-10-05T11:42:57.629+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><category scheme='http://www.blogger.com/atom/ns#' term='2.39'/><title type='text'>Ruby on Rails 2.39 Released on 4th September 2010</title><content type='html'>&lt;div class="metaData"&gt;&lt;b&gt;CCH : As posted on Riding Rails&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="metaData"&gt;&lt;/div&gt;&lt;div class="metaData"&gt;Posted by Jeremy Kemper September 04, 2010 @ 09:45 PM&lt;/div&gt;We’ve released Ruby on Rails 2.3.9 (&lt;a href="http://rubygems.org/gems/rails/versions/2.3.9"&gt;gem&lt;/a&gt; and &lt;a href="http://github.com/rails/rails/tree/v2.3.9"&gt;git tag&lt;/a&gt;)  to extend the 2.3.8 bridge a few steps closer to Rails 3 and Ruby 1.9.  If your app runs on Rails 2.3.9 without deprecation warnings, you’re  looking good for an upgrade to Rails 3.&lt;br /&gt;&lt;h4&gt;Deprecations&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Changes i18n named-interpolation syntax from the deprecated &lt;code&gt;Hello {{name}}&lt;/code&gt; to the 1.9-native &lt;code&gt;Hello %{name}&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Replaces &lt;code&gt;Kernel#returning&lt;/code&gt; with &lt;code&gt;Object#tap&lt;/code&gt; which is native to Ruby 1.8.7.&lt;/li&gt;&lt;li&gt;Renames &lt;code&gt;Array#random_element&lt;/code&gt; to &lt;code&gt;Array#sample&lt;/code&gt; which is native to Ruby 1.9.&lt;/li&gt;&lt;li&gt;Renames &lt;code&gt;config.load_paths&lt;/code&gt; and &lt;code&gt;.load_once_paths&lt;/code&gt; to the more accurate &lt;code&gt;config.autoload_paths&lt;/code&gt; and &lt;code&gt;.autoload_once_paths&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;Along with these deprecations come a broad array of bugfixes and minor tweaks. Read the &lt;a href="http://github.com/rails/rails/compare/v2.3.8...v2.3.9"&gt;commit log&lt;/a&gt; for the full story.&lt;br /&gt;Onward to 3.1!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-576852524933908095?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/576852524933908095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=576852524933908095&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/576852524933908095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/576852524933908095'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2010/10/ruby-on-rails-239-released-on-4th.html' title='Ruby on Rails 2.39 Released on 4th September 2010'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-3756360605024581719</id><published>2010-06-10T19:38:00.003+08:00</published><updated>2010-06-10T19:39:19.118+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='2.38'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Ruby on Rails Version 2.3.8 released on 25th May 2010</title><content type='html'>CCH : An update from Riding Rails &lt;br /&gt;&lt;br /&gt;The &lt;a href="http://weblog.rubyonrails.org/2010/5/24/ruby-on-rails-2-3-7-released"&gt;2.3.7  release&lt;/a&gt; slipped out the door too hastily. Fixing compatibility with  the rails_xss plugin inadvertently forced everyone to use it. Facepalm.&lt;br /&gt;&lt;br /&gt;I apologize for wasting a chunk of your day on installing what ought  to have been a patch-level update only to find it breaks your app.  That’s well out of line with our stable release process and it’s my  fault for stepping out of it. I got caught up in a sky-is-falling  response to a 2.3.6 bug that affected a handful of users and responded  with a fix that exposed a new flaw to nearly all users, despite testing  and sanity checking.&lt;br /&gt;&lt;br /&gt;Thanks for all your feedback today. We hear you, and yes, a thousand  times yes. Every stable release, including point releases, deserves the  same methodical drumbeat on its march from git stable to to .pre gem to  final gem. Expect no less.&lt;br /&gt;&lt;br /&gt;Now, on to the gem-cutting: Rails &lt;a href="http://rubygems.org/gems/rails/versions/2.3.8"&gt;2.3.8&lt;/a&gt; is  available now, &lt;a href="http://github.com/rails/rails/compare/v2.3.7...v2.3.8"&gt;bringing us  back&lt;/a&gt; to stable ground.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-3756360605024581719?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/3756360605024581719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=3756360605024581719&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3756360605024581719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3756360605024581719'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2010/06/ruby-on-rails-version-238-released-on.html' title='Ruby on Rails Version 2.3.8 released on 25th May 2010'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-9125164290880645913</id><published>2010-06-10T19:37:00.001+08:00</published><updated>2010-06-10T19:40:00.172+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='2.3.7'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Ruby on Rails Version 2.3.7 released on 23rd May 2010</title><content type='html'>CCH : Update from Riding Rails &lt;br /&gt;&lt;br /&gt;With the &lt;a href="http://weblog.rubyonrails.org/2010/5/23/ruby-on-rails-2-3-6-released"&gt;2.3.6  release&lt;/a&gt; hot out of the oven, Nathan Weizenbaum began updating &lt;a href="http://haml-lang.com/"&gt;&lt;span class="caps"&gt;HAML&lt;/span&gt;&lt;/a&gt; to  support it.&lt;br /&gt;&lt;br /&gt;He uncovered a couple of bugs in the &lt;span class="caps"&gt;HTML&lt;/span&gt;-safety  changes backported from Rails 3, so we’re cutting a &lt;a href="http://rubygems.org/gems/rails/versions/2.3.7"&gt;2.3.7&lt;/a&gt; release  to &lt;a href="http://github.com/rails/rails/compare/v2.3.6...v2.3.7"&gt;fix  them&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you use the &lt;a href="http://github.com/rails/rails_xss#readme"&gt;rails_xss&lt;/a&gt;  plugin for automatic &lt;span class="caps"&gt;HTML&lt;/span&gt; escaping, you  should upgrade to Rails 2.3.7 and the latest rails_xss plugin.&lt;br /&gt;&lt;br /&gt;If you don’t use the rails_xss plugin yet, now’s the time to start.  It’s baked in to Rails 3.&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt; fixing compatibility with the rails_xss  plugin broke &lt;span class="caps"&gt;HTML&lt;/span&gt;-safety for apps that don’t  use rails_xss. We’re sorry, all: &lt;span class="caps"&gt;HTML&lt;/span&gt;-safety  is meant to be opt-in! The fix is available now in &lt;a href="http://rubygems.org/gems/rails/versions/2.3.8.pre1"&gt;2.3.8.pre1&lt;/a&gt;  and will be released shortly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-9125164290880645913?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/9125164290880645913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=9125164290880645913&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/9125164290880645913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/9125164290880645913'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2010/06/ruby-on-rails-version-237-released-on.html' title='Ruby on Rails Version 2.3.7 released on 23rd May 2010'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-172655427362220517</id><published>2010-06-08T18:28:00.000+08:00</published><updated>2010-06-08T18:28:35.569+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='2.3.6'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Ruby on Rails Version 2.3.6 released on 23rd May 2010</title><content type='html'>CCH : Ruby on Rails Version 2.3.6 released on 23rd May 2010 &lt;br /&gt;&lt;br /&gt;We’ve released Ruby on Rails &lt;a href="http://rubygems.org/gems/rails/versions/2.3.6"&gt;2.3.6&lt;/a&gt;: six  months of bug fixes, a handful of new features, and a strong bridge to  Rails 3.&lt;br /&gt;We deprecated some obscure and ancient features in Rails 2.3.6 so we  could cut them entirely from Rails 3. If your app runs on Rails 2.3.6  without deprecation warnings, you’re in good shape for a smooth sail  onward.&lt;br /&gt;This slow-cooked dish is brought to you some &lt;a href="http://github.com/rails/rails/compare/v2.3.5...v2.3.6"&gt;87  committers&lt;/a&gt; from our all-volunteer kitchen.&lt;br /&gt;Now, let’s open the goodie bag!&lt;br /&gt;&lt;h4&gt;Action Pack&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Upgrade Rack from 1.0.1 to 1.1.0.&lt;/li&gt;&lt;li&gt;&lt;span class="caps"&gt;XSS&lt;/span&gt; prevention: update to match Rails 3  and move to the official plugin at &lt;a href="http://github.com/rails/rails_xss"&gt;http://github.com/rails/rails_xss&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Cookies: convenient cookie jar add-ons to set permanent or signed  cookies, or both at once: &lt;code&gt;cookies.permanent.signed[:remember_me] =  current_user.id&lt;/code&gt;. &lt;a href="http://github.com/rails/rails/commit/0200e20f148c96afceeebc4da7b5985643f9f707"&gt;Read  more&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Flash: promote &lt;code&gt;alert&lt;/code&gt; and &lt;code&gt;notice&lt;/code&gt;, the  most common flash keys in many apps, to &lt;code&gt;self.alert = '...'&lt;/code&gt;  and &lt;code&gt;self.notice = '...'&lt;/code&gt;. Add &lt;code&gt;redirect_to url, :alert  =&amp;gt; '...'&lt;/code&gt; and &lt;code&gt;:notice =&amp;gt; '...'&lt;/code&gt;. &lt;a href="http://github.com/rails/rails/commit/e6cadd422b72ba9818cc2f3b22243a6aa754c9f8"&gt;Read  more&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;i18n: localize the &lt;code&gt;label&lt;/code&gt; helper.&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Active Record&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Namespacing: support optional table name prefixes on modules by  defining &lt;code&gt;self.table_name_prefix&lt;/code&gt;. &lt;a href="http://github.com/rails/rails/commit/03d5d0b5f50161d8ec1b2b627e483aad7100494a"&gt;Read  more&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Destroy uses optimistic locking.&lt;/li&gt;&lt;li&gt;Counter cache: use &lt;code&gt;Post.reset_counters(1234, :comments)&lt;/code&gt;  to count the number of comments for post 1234 and reset its  comments_count cache.&lt;/li&gt;&lt;li&gt;PostgreSQL: always use standard-conforming strings, if supported.&lt;/li&gt;&lt;li&gt;MySQL: add index length support. &lt;a href="http://github.com/rails/rails/commit/3616141fa2d2f35675d5962a1b329c8c51a5e9a3"&gt;Read  more&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;MySQL: &lt;code&gt;add_&lt;/code&gt; and &lt;code&gt;change_column&lt;/code&gt; support  column positioning using &lt;code&gt;:first =&amp;gt; true&lt;/code&gt; and &lt;code&gt;:after  =&amp;gt; :other_column&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Active Support&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Upgrade i18n from 1.3.3 to 1.3.7.&lt;/li&gt;&lt;li&gt;Upgrade TZInfo from 0.3.12 to 0.3.16.&lt;/li&gt;&lt;li&gt;Multibyte: speed up string verification and cleaning.&lt;/li&gt;&lt;li&gt;&lt;span class="caps"&gt;JSON&lt;/span&gt;: use &lt;a href="http://github.com/brianmario/yajl-ruby"&gt;&lt;span class="caps"&gt;YAJL&lt;/span&gt;&lt;/a&gt;  for &lt;span class="caps"&gt;JSON&lt;/span&gt; decoding, if available. &lt;code&gt;gem  install yajl-ruby&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Testing: add &lt;code&gt;assert_blank&lt;/code&gt; and &lt;code&gt;assert_present&lt;/code&gt;.  &lt;a href="http://github.com/rails/rails/commit/4b08679ba9627884d531cf59a9bb2fd1d2c86d62"&gt;Read  more&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Core: backport &lt;code&gt;Object#singleton_class&lt;/code&gt; from Ruby  1.8.8, deprecating our &lt;code&gt;Object#metaclass&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Core: add &lt;code&gt;Object#presence&lt;/code&gt; that returns the object if  it’s &lt;code&gt;#present?&lt;/code&gt; otherwise returns &lt;code&gt;nil&lt;/code&gt;. Example:  &lt;code&gt;region = params[:state].presence || params[:country].presence ||  'US'&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Core: add &lt;code&gt;Enumerable#exclude?&lt;/code&gt; to match &lt;code&gt;include?&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Core: rename &lt;code&gt;Array#rand&lt;/code&gt; to &lt;code&gt;Array#random_element&lt;/code&gt;  to avoid collision with &lt;code&gt;Kernel#rand&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Core: rename &lt;code&gt;Date#&lt;/code&gt; and &lt;code&gt;Time#last_(month|year)&lt;/code&gt;  to &lt;code&gt;#prev_(month|year)&lt;/code&gt; for Ruby 1.9 forward compatibility.&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Active Resource&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="caps"&gt;JSON&lt;/span&gt;: set &lt;code&gt;ActiveResource::Base.include_root_in_json  = true&lt;/code&gt; to serialize as a hash of model name -&amp;gt; attributes  instead of a bare attributes hash. Defaults to false.&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Action Mailer&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Upgrade TMail from 1.2.3 to 1.2.7.&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Railties&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Silence RubyGems 1.3.6 deprecation warnings.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-172655427362220517?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/172655427362220517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=172655427362220517&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/172655427362220517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/172655427362220517'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2010/06/ruby-on-rails-version-236-released-on.html' title='Ruby on Rails Version 2.3.6 released on 23rd May 2010'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-2015350076084425245</id><published>2010-02-13T18:45:00.001+08:00</published><updated>2010-02-13T18:45:34.767+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DHH'/><category scheme='http://www.blogger.com/atom/ns#' term='2.3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Rails 3 Beta Release on 5th February 2010</title><content type='html'>&lt;div class="metaData"&gt;&lt;b&gt;Posted by David HH February 05, 2010 @ 03:33 AM on Riding Rails&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;You thought we were never going to get to this day, didn’t you? Ye of little faith. Because here is the first real, public release of Rails 3.0 in the form of a beta package that we’ve toiled long and hard over.&lt;br /&gt;It’s surely not perfect yet, but we were out of blockers on the list, so here we go. Please give it a run around the block, try to update some old applications, try to start some new ones, and report back all the issues you find.&lt;br /&gt;I’m really proud of this moment, actually. We’ve had more than 250 people help with the release and we’ve been through almost 4,000 commits since 2.3 to get here. Yet still the new version feels lighter, more agile, and easier to understand. It’s a great day to be a Rails developer.&lt;br /&gt;There’s plenty to get excited about here. A few of the headliner features are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Brand new router with an emphasis on RESTful declarations&lt;/li&gt;&lt;li&gt;New Action Mailer &lt;span class="caps"&gt;API&lt;/span&gt; modelled after Action Controller (now without the agonizing pain of sending multipart messages!)&lt;/li&gt;&lt;li&gt;New Active Record chainable query language built on top of relational algebra&lt;/li&gt;&lt;li&gt;Unobtrusive JavaScript helpers with drivers for Prototype, jQuery, and more coming (end of inline JS)&lt;/li&gt;&lt;li&gt;Explicit dependency management with Bundler&lt;/li&gt;&lt;/ul&gt;But please take a look at the &lt;a href="http://guides.rails.info/3_0_release_notes.html"&gt;full release notes&lt;/a&gt; and enjoy the latest!&lt;br /&gt;To install:&lt;br /&gt;&lt;pre&gt;gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n&lt;br /&gt;gem install rails --pre&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-2015350076084425245?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/2015350076084425245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=2015350076084425245&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2015350076084425245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2015350076084425245'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2010/02/rails-3-beta-release.html' title='Rails 3 Beta Release on 5th February 2010'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-2897221612528231685</id><published>2009-12-14T13:53:00.000+08:00</published><updated>2009-12-14T13:53:14.122+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='2.3.5'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Ruby on Rails 2.3.5 Released on 30th November 2009</title><content type='html'>CCH : From Riding Rails&lt;br /&gt;&lt;br /&gt;&lt;div class="post"&gt;     &lt;h2&gt;Ruby on Rails 2.3.5 Released&lt;/h2&gt;&lt;div class="auth"&gt;Posted by Gregg Pollack November 30, 2009 @ 07:58 PM&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Rails 2.3.5 was released over the weekend which provides several bug-fixes and one &lt;a href="http://groups.google.com/group/rubyonrails-security/browse_thread/thread/4d4f71f2aef4c0ab"&gt;security fix&lt;/a&gt;. It should be fully compatible with all prior 2.3.x releases and can be easily upgraded to with “gem update rails”. The most interesting bits can be summarized in three points.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Improved compatibility with Ruby 1.9&lt;/strong&gt;&lt;br /&gt;There were a few small bugs preventing full compatibility with Ruby 1.9. However, we wouldn’t be surprised you were already running Rails 2.3.X successfully before these bugs were fixed (they were small).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;RailsXss plugin availability&lt;/strong&gt;&lt;br /&gt;As you may have heard, in Rails 3 we are now automatically escaping all string content in erb (where as before you needed to use “h()” to escape). If you want to have this functionality today you can install Koz’s &lt;a href="http://github.com/nzkoz/rails_xss"&gt;RailsXss plugin&lt;/a&gt; in Rails 2.3.5.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Fixes for the Nokogiri backend for XmlMini&lt;/strong&gt;&lt;br /&gt;With Rails 2.3 we were given the ability to switch out the default &lt;span class="caps"&gt;XML&lt;/span&gt; parser from &lt;span class="caps"&gt;REXML&lt;/span&gt; to other faster parsers like Nokogiri. There were a few issues with using Nokogiri which are now resolved, so if your application is parsing lots of xml you may want to switch to this faster &lt;span class="caps"&gt;XML&lt;/span&gt; parser.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;And that’s the gist of it&lt;/strong&gt;&lt;br /&gt;Feel free to browse through the &lt;a href="http://github.com/rails/rails/commits/v2.3.5/"&gt;commit history&lt;/a&gt; if you’d like to see what else has been fixed (but it’s mostly small stuff).&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="comments"&gt;     &lt;a href="" id="comments" name="comments"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-2897221612528231685?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/2897221612528231685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=2897221612528231685&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2897221612528231685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2897221612528231685'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/12/ruby-on-rails-235-released-on-30th.html' title='Ruby on Rails 2.3.5 Released on 30th November 2009'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-5575174656556374050</id><published>2009-11-01T12:57:00.000+08:00</published><updated>2009-11-01T12:57:12.133+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Edge Rails'/><title type='text'>What's New in Edge Rails - 12th October 2009</title><content type='html'>&lt;b&gt;CCH : From Riding Rails&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So, Edge Rails is still chugging right along. There are new and interesting fixes, changes, and refactors going on all of the time. So, lets take a look at just a few that've gone in since the last post (it's been a while, I know, I'm sorry!).&lt;br /&gt;ActionView and Helpers&lt;br /&gt;&lt;br /&gt;XSS escaping is now enabled by default. This means that if you want to explicitly output HTML to your views, you'll probably have to mark it as html_safe! before sending it through.&lt;br /&gt;&lt;br /&gt;&amp;lt;%= 'my &lt;a href="http://www.rubyonrails.org/"&gt;safe&lt;/a&gt; string'.html_safe! %&amp;gt;&lt;br /&gt;&lt;br /&gt;Many of the built-in helpers have been updated for this change and if you see an issues with the Rails helpers being incorrectly sanitized, you should create a new ticket.&lt;br /&gt;&lt;br /&gt;distance_of_time_in_words has gained 'over', 'about', and 'almost' keywords, thanks to Jay Pignata and John Trupiano. This provides you with an improved level of granularity when approximating the amount time passed. So, instead of just "2 years ago", it can now also report "almost 2 years ago," "about 2 years ago," and "over 2 years ago," depending on the proximity to being exactly 2 years old.&lt;br /&gt;&lt;br /&gt;assert_equal "almost 2 years",&amp;nbsp; distance_of_time_in_words(from, to + 2.years - 3.months + 1.day)&lt;br /&gt;assert_equal "about 2 years",&amp;nbsp;&amp;nbsp; distance_of_time_in_words(from, to + 2.years + 3.months - 1.day)&lt;br /&gt;assert_equal "over 2 years",&amp;nbsp;&amp;nbsp;&amp;nbsp; distance_of_time_in_words(from, to + 2.years + 3.months + 1.day)&lt;br /&gt;assert_equal "over 2 years",&amp;nbsp;&amp;nbsp;&amp;nbsp; distance_of_time_in_words(from, to + 2.years + 9.months - 1.day)&lt;br /&gt;assert_equal "almost 3 years",&amp;nbsp; distance_of_time_in_words(from, to + 2.years + 9.months + 1.day)&lt;br /&gt;&lt;br /&gt;The HTML form helper, fields_for - generally used for nesting additional model forms - now allows for explicit collections to be used, thanks to Andrew France. So, instead of just including all of your blog.posts, you should have it only display your published blog.posts, for example. Or:&lt;br /&gt;&lt;br /&gt;&amp;lt;% form_for @person, :url =&amp;gt; { :action =&amp;gt; "update" } do |person_form| %&amp;gt;&lt;br /&gt;&amp;nbsp; ...&lt;br /&gt;&amp;nbsp; &amp;lt;% person_form.fields_for :projects, @active_projects do |project_fields| %&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name: &amp;lt;%= project_fields.text_field :name %&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;% end %&amp;gt;&lt;br /&gt;&amp;lt;% end %&amp;gt;&lt;br /&gt;&lt;br /&gt;API Change for content_tag_for: The third argument - being the optional CSS prefix - will now also affect the generated CSS class. This prefix will now be appended to the generated element's CLASS attribute.&lt;br /&gt;&lt;br /&gt;&amp;lt;%= content_tag_for(:li, @post, :published) %&amp;gt;&lt;br /&gt;# =&amp;gt; &lt;br /&gt;&lt;li class="published_post" id="published_post_123"&gt;...&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ActiveResource and ActiveRecord&lt;br /&gt;&lt;br /&gt;Taryn East has added update_attribute(s) methods to ActiveResource. These methods act very similarly to the ActiveRecord methods we already know and love.&lt;br /&gt;&lt;br /&gt;Building or creating an object through a has_one association that contains conditionals will now automatically append those conditions to the newly created object, thanks to Luciano Panaro.&lt;br /&gt;&lt;br /&gt;class Blog&lt;br /&gt;&amp;nbsp; has_author :commit_author, :class_name =&amp;gt; 'Author', :conditions =&amp;gt; {:name =&amp;gt; "Luciano Panaro"}&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;@blog.build_commit_author&lt;br /&gt;# =&amp;gt; #&lt;author ...="" luciano="" name:="" panaro=""&gt;&lt;br /&gt;&lt;br /&gt;Pratik Naik added a new option to ActiveRecord's accepts_nested_attributes_for to :limit the number of records that are allowed to be processed. Also, while we're covering accepts_nested_attributes_for, José Valim as renamed the _delete option to _destroy to better follow what is actually occurring. A deprecation warning has been added to _delete, for the time being.&lt;br /&gt;&lt;br /&gt;Jacob Burkhart updated the new autosave option in Rails 2.3 to allow for an :autosave =&amp;gt; false, which will disallow saving of associated objects, even when they are new_record?s.&lt;br /&gt;Some Internals&lt;br /&gt;&lt;br /&gt;Previously, CDATA elements could be ignored when converting from XML to a Hash, so now, thanks to John Pignata, Hash#from_xml will now properly parse and include CDATA elements values.&lt;br /&gt;&lt;br /&gt;Josh Peek has relocated global exception handling into ActionDispatch::Rescue. So, this is now being handled at the Rack middleware level.&lt;br /&gt;&lt;br /&gt;And finally, Yehuda Katz and Carl Lerche began work on a Rails::Application object to better encapsulate some of the application start up and configuration details. Also, a good bit of initialization has now gone on to move into this new object.&lt;br /&gt;&lt;br /&gt;Remember, if you prefer to have a shorter audio summary of some of this content and more, you should check out the Ruby5 podcast over at Envy Labs; it's released every Tuesday and Friday with the latest news in the Ruby and Rails community.&lt;br /&gt;&lt;br /&gt;Photo: Clock Tower by Brian Taylor&lt;br /&gt;&lt;br /&gt;Posted in Edge |&amp;nbsp; 17 comments&lt;br /&gt;&lt;br /&gt;&lt;/author&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-5575174656556374050?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/5575174656556374050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=5575174656556374050&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5575174656556374050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5575174656556374050'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/11/whats-new-in-edge-rails-12th-october.html' title='What&apos;s New in Edge Rails - 12th October 2009'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-9025627799272909753</id><published>2009-10-03T15:01:00.005+08:00</published><updated>2009-11-01T12:58:03.698+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Edge Rails'/><title type='text'>What's New in Edge Rails ?</title><content type='html'>&lt;div class="metaData"&gt;&lt;b&gt;CCH : From the Riding Rails Blog&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Posted by Nathaniel Bibler September 06, 2009 @ 05:07 PM&lt;br /&gt;&lt;/div&gt;It's been a bit over two weeks since the last WNiER ("winner"?) post and in the time since our last visit, &lt;a href="http://weblog.rubyonrails.org/2009/9/4/ruby-on-rails-2-3-4"&gt;Ruby on Rails 2.3.4 was released&lt;/a&gt; to fix some reported security issues. It is important that you try to upgrade your applications as soon as possible, or even just apply the &lt;a href="http://weblog.rubyonrails.org/2009/9/4/timing-weakness-in-ruby-on-rails"&gt;provided&lt;/a&gt; &lt;a href="http://weblog.rubyonrails.org/2009/9/4/xss-vulnerability-in-ruby-on-rails"&gt;patches&lt;/a&gt; if a full upgrade isn't easily accomplished in your situation.&lt;br /&gt;Along with this release, you're also going to see several bug fixes and enhancements to the Rails framework, coming from many contributors, that have been discussed here over the previous weeks and even a few that are mentioned just below.&lt;br /&gt;&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;&lt;h2&gt;Security updates&lt;/h2&gt;Michael Koziarski posted fixes (&lt;a href="http://github.com/rails/rails/commit/b16e0c922344da256ab977fd5e7a7f69e0be90fc"&gt;here&lt;/a&gt; and &lt;a href="http://github.com/rails/rails/commit/9a73630d935e360f3dc896e50dd673afb97cf3b5"&gt;here&lt;/a&gt;) for cleaning and verifying multibyte (unicode) strings. The problem was reported by Brian Mastenbrook and Manfred Stienstra provided input for the fix. These changes should disallow malformed unicode strings from getting past the HTML escaping logic provided by the form helpers.&lt;br /&gt;Coda Hale reported and also &lt;a href="http://github.com/rails/rails/commit/5e6dab8b34152bc48c89032d20e5bda1511e28fb"&gt;added a patch&lt;/a&gt; to Rails, fixing a timing attack vulnerability in &lt;code&gt;ActiveSupport::MessageVerifier&lt;/code&gt;. Although not likely to be exploited in the wild, the vulnerability may allow an attacker to forge the signatures which encode your application's cookie store. If successfully broken, an attacker could modify their session objects without altering your application to the change.&lt;br /&gt;There have been some issues reported around the Rails 2.3.4 release, specifically with regard to Ruby 1.9 support. While they have not all yet been fully substantiated, this certainly underscores the importance of having proper test coverage and both a staging and production environment for your applications.&lt;br /&gt;&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;&lt;h2&gt;Down to the metal&lt;/h2&gt;Yehuda Katz and Carl Lerche put in quite a bit of work around &lt;code&gt;ActionController::Metal&lt;/code&gt; and Rack's Middleware, recently.  &lt;code&gt;ActionController::Metal&lt;/code&gt; now &lt;a href="http://github.com/rails/rails/commit/c7ba911a43e513bd1adbee93f16d2b8efea7cc88"&gt;acts as a Rack middleware&lt;/a&gt; and at the same time, there is a new &lt;a href="http://github.com/rails/rails/commit/9408fcd2e858ae48dd30d9e8d1bb1dcbbfffb840"&gt;&lt;code&gt;ActionController::Middleware&lt;/code&gt;&lt;/a&gt; class that operates as normal Rack middleware.&lt;br /&gt;And, if that wasn't enough, Yehuda went on to add &lt;a href="http://github.com/rails/rails/commit/dbf20c2dbb5d1f2640517c468aa7c269d93414b9"&gt;&lt;code&gt;ActiveModel::Lint&lt;/code&gt;&lt;/a&gt;.  &lt;code&gt;ActiveModel::Lint&lt;/code&gt; allows you to determine whether or not an object is compliant with the ActiveModel API, via:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;    ActiveModel::Compliance.test(object)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The output is similar to a Test::Unit output and will indicate with which portions of the ActiveModel API the given object is - or more importantly is not - compliant.&lt;br /&gt;If Metal is your thing, you may want to take a look at Yehuda Katz's recent blog post, &lt;a href="http://yehudakatz.com/2009/08/26/how-to-build-sinatra-on-rails-3/"&gt;How to Build Sinatra on Rails 3&lt;/a&gt;.&lt;br /&gt;&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;&lt;h2&gt;Pour some sugar on me&lt;/h2&gt;Quite a few changes, small and large, occurred around ActiveRecord and friends. Most of these cleaned up some existing functionality, either making it easier to use, perform more closely to what would be expected, or even adding some new features that will soon feel like old friends. &lt;br /&gt;Taryn East added a little ActiveRecord-like love to ActiveResource.  In &lt;a href="http://github.com/rails/rails/commit/ce61a6bd551a96205892a125c8835c4bc69c4fad"&gt;this patch&lt;/a&gt;, ActiveResource received the familiar &lt;code&gt;first&lt;/code&gt;, &lt;code&gt;last&lt;/code&gt;, and &lt;code&gt;all&lt;/code&gt; shortcut methods for wrapping the basic &lt;code&gt;find&lt;/code&gt; method.&lt;br /&gt;&lt;a href="http://github.com/rails/rails/commit/cf9f361699d72b5b34a655f8940c024cba0f0e09"&gt;Proc and symbol support&lt;/a&gt; was added to the &lt;code&gt;validates_numericality_of&lt;/code&gt; ActiveRecord validation, by Kane.&lt;br /&gt;For those of you who use the &lt;code&gt;:anchor&lt;/code&gt; option when generating URLs, you may notice that after &lt;a href="http://github.com/rails/rails/commit/05b529ca57f75ce64540b9d34597e0c3bfe1fca7"&gt;this patch&lt;/a&gt; by Jeffrey Hardy, Rails will now execute the &lt;code&gt;to_param&lt;/code&gt; method on the object provided as an &lt;code&gt;:anchor&lt;/code&gt;.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;    @post       = Post.first&lt;br /&gt;    @comment    = Comment.first&lt;br /&gt;    post_url(@post, :anchor =&amp;gt; @comment) # =&amp;gt; http://www.example.com/posts/1#comment-1&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Well, something similar to that, anyway.  :)  This updates the &lt;code&gt;:anchor&lt;/code&gt; options to follow a similar functionality as the other options provided when generating URLs.&lt;br /&gt;José Valim cleaned up some bits in the Rails scaffold.  The generated &lt;code&gt;new&lt;/code&gt; and &lt;code&gt;edit&lt;/code&gt; views will &lt;a href="http://github.com/rails/rails/commit/5d645c271b350c2a3ed7fd835e539322cda61d8c"&gt;now reference&lt;/a&gt; a new &lt;code&gt;_form&lt;/code&gt; partial. This is a much DRYer way to go about it, and more closely follows what would likely happen if you were to code it yourself. Also, while he was there, he &lt;a href="http://github.com/rails/rails/commit/5096ba961c49e5b419c3400acd7c87373a36d6d4"&gt;removed a bit&lt;/a&gt; of inline CSS (specifically, a green flash message), in favor of a CSS class and updating the default scaffold stylesheet.&lt;br /&gt;And, probably the most interesting change in this group is the addition of a &lt;a href="http://github.com/rails/rails/commit/80989437dc1502f9194b0600941b6d70a3efa3b2"&gt;new &lt;code&gt;ActivRecord#previous_changes&lt;/code&gt; method&lt;/a&gt;, by Scott Barr.  &lt;code&gt;previous_changes&lt;/code&gt; allows you to see what changed before the last save in your local ActiveRecord object instance. This is particularly useful when calling &lt;code&gt;after_save&lt;/code&gt; methods which might need to know what exactly had changed.  I'll let him give you a code sample:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;    person          = Person.find_by_name('bob')&lt;br /&gt;  person.name = 'robert'&lt;br /&gt;  person.changes                        # =&amp;gt; {'name' =&amp;gt; ['bob, 'robert']}&lt;br /&gt;  person.save&lt;br /&gt;  person.changes                        # =&amp;gt; {}&lt;br /&gt;  person.previous_changes   # =&amp;gt; {'name' =&amp;gt; ['bob, 'robert']}&lt;br /&gt;  person.reload&lt;br /&gt;  person.previous_changes   # =&amp;gt; {}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;&lt;h2&gt;Okay, let's do it your way&lt;/h2&gt;While a lot of us prefer US English, we (begrudgingly) recognize that we aren't &lt;i&gt;always&lt;/i&gt; the center of the universe.  As such, there are some more localization updates to report in Edge Rails:&lt;br /&gt;Sven Fuchs added &lt;a href="http://github.com/rails/rails/commit/d672a14ee766e86c606db566dd073a3d2332cc60"&gt;localization support&lt;/a&gt; to the ActiveRecord::RecordInvalid exception's error message. Then, Akira Matsuda followed Sven with support for localizing the SELECT tag helper's &lt;a href="http://github.com/rails/rails/commit/cc9af20da7af98464ece18d4abc6a22ef3f00b5d"&gt;prompt text&lt;/a&gt; (the default being, "Please select").&lt;br /&gt;Finally, this is certainly a welcome addition and potentially a major player in localization support within Rails: Antonio Tapiador del Dujo added a patch which allows Rails plugins to define and maintain &lt;a href="http://github.com/rails/rails/commit/cf4846c6ae991143afaef987a63c3ad9a3a2546b"&gt;their own locale files&lt;/a&gt;.  All that is necessary for the plugin developer to do is to provide a &lt;code&gt;config/locales/&lt;/code&gt; directory within their plugin and then create their own &lt;code&gt;.rb&lt;/code&gt; or &lt;code&gt;.yml&lt;/code&gt; files (i.e. &lt;code&gt;en.yml&lt;/code&gt;). That means that plugins can now be much more responsible for their own localization support and do not have to modify the application's locale files after installation.&lt;br /&gt;&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;&lt;h2&gt;Food for thought&lt;/h2&gt;Finally, just a small note that the default, preferred table collation for MySQL &lt;a href="http://github.com/rails/rails/commit/f6ca7e4e75408bc42f515fc7206d6c6ff0dce7c6"&gt;has been changed&lt;/a&gt;.  Previously, Rails defaulted to &lt;code&gt;utf8_general_ci&lt;/code&gt; when either the database or the table creation script did not dictate otherwise.  Now, that has been changed to &lt;code&gt;utf8_unicode_ci&lt;/code&gt;.  Certainly worth a note with so many Rails applications using MySQL in their back-end.&lt;br /&gt;&lt;b&gt;Update&lt;/b&gt;: Set the attribution of &lt;code&gt;previous_changes&lt;/code&gt; to Scott Barr.  Sorry, Scott!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-9025627799272909753?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/9025627799272909753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=9025627799272909753&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/9025627799272909753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/9025627799272909753'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/10/whats-new-in-edge-rails.html' title='What&apos;s New in Edge Rails ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-6202107748751300534</id><published>2009-09-06T21:15:00.002+08:00</published><updated>2009-10-03T15:05:27.336+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='2.3.4'/><title type='text'>Ubuntu 9.04 : Upgrading from Rails 2.3.3 to Rails 2.3.4</title><content type='html'>This is how I have upgraded Rails 2.3.3 to Rails 2.3.4 in Ubuntu 9.04&lt;br /&gt;&lt;br /&gt;chee@ibm4linux:~$ sudo gem install rails&lt;br /&gt;[sudo] password for chee: &lt;br /&gt;Successfully installed activesupport-2.3.4&lt;br /&gt;Successfully installed activerecord-2.3.4&lt;br /&gt;Successfully installed actionpack-2.3.4&lt;br /&gt;Successfully installed actionmailer-2.3.4&lt;br /&gt;Successfully installed activeresource-2.3.4&lt;br /&gt;Successfully installed rails-2.3.4&lt;br /&gt;6 gems installed&lt;br /&gt;Installing ri documentation for activesupport-2.3.4...&lt;br /&gt;Installing ri documentation for activerecord-2.3.4...&lt;br /&gt;Installing ri documentation for actionpack-2.3.4...&lt;br /&gt;Installing ri documentation for actionmailer-2.3.4...&lt;br /&gt;Installing ri documentation for activeresource-2.3.4...&lt;br /&gt;Installing ri documentation for rails-2.3.4...&lt;br /&gt;Installing RDoc documentation for activesupport-2.3.4...&lt;br /&gt;Installing RDoc documentation for activerecord-2.3.4...&lt;br /&gt;Installing RDoc documentation for actionpack-2.3.4...&lt;br /&gt;Installing RDoc documentation for actionmailer-2.3.4...&lt;br /&gt;Installing RDoc documentation for activeresource-2.3.4...&lt;br /&gt;Installing RDoc documentation for rails-2.3.4...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-6202107748751300534?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/6202107748751300534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=6202107748751300534&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/6202107748751300534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/6202107748751300534'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/09/ubuntu-904-upgrading-from-rails-233-to.html' title='Ubuntu 9.04 : Upgrading from Rails 2.3.3 to Rails 2.3.4'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-3193895475916792268</id><published>2009-09-06T21:13:00.000+08:00</published><updated>2009-09-06T21:13:27.656+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><category scheme='http://www.blogger.com/atom/ns#' term='2.3.4'/><title type='text'>Announcement : Rails 2.3.4 is released on 4th Sept 2009</title><content type='html'>The Rails Team has just announced the release of Rails 2.3.4 as follows :-&lt;br /&gt;&lt;br /&gt;We’ve released Ruby on Rails 2.3.4, this release fixes bugs and introduces a few minor features. Due to the inclusion of two security fixes, all users of the 2.3 series are recommended to upgrade as soon as possible.&lt;br /&gt;&lt;h4&gt;Security Fixes&lt;/h4&gt;2.3.4 contains fixes for two security issues which were reported to us.   For more details see the security announcements:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://weblog.rubyonrails.org/2009/9/4/xss-vulnerability-in-ruby-on-rails"&gt;&lt;span class="caps"&gt;CVE&lt;/span&gt;-2009-3009 – &lt;span class="caps"&gt;XSS&lt;/span&gt; vulnerability&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://weblog.rubyonrails.org/2009/9/4/timing-weakness-in-ruby-on-rails"&gt;Timing Weakness in MessageVerifier and the Cookie Store&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Bug Fixes&lt;/h4&gt;Thanks to the success of the &lt;a href="http://weblog.rubyonrails.org/2009/7/28/rails-bugmash"&gt;BugMash&lt;/a&gt; we have around 100 bug fixes as part of this release. Of particular not is the fix to reloading problems related to rack middleware and rails metals when running in development mode.&lt;br /&gt;&lt;h4&gt; New Features&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Support for bundling I18n translations in plugins, Rails will now automatically add locale files found in any engine’s locale directory to the I18n.load_path. &lt;a href="http://github.com/rails/rails/commit/49342d1745dd0e6c4ebebe9e535e374783ac2c10"&gt;commit&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Added db/seeds.rb as a default file for storing seed data for the database. Can be loaded with rake db:seed &lt;a href="http://github.com/rails/rails/commit/f3c7bbeedd81d2f379c5e6a9e8739d3b3784ca5f"&gt;commit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-3193895475916792268?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/3193895475916792268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=3193895475916792268&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3193895475916792268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3193895475916792268'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/09/announcement-rails-234-is-released-on.html' title='Announcement : Rails 2.3.4 is released on 4th Sept 2009'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-8291705881653066536</id><published>2009-09-06T12:18:00.004+08:00</published><updated>2009-11-20T11:14:20.609+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Basics'/><title type='text'>Rails Basics : link_to</title><content type='html'>It is an almost Rails convention that you should use Ruby code rather than HTML to create links as a mater of style and flexibility via routes.rb&lt;br /&gt;&lt;br /&gt;link_to is an example of a Rails function&amp;nbsp; for html generation and is typically used to add site-wide navigation. For example, &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;%= link_to('Home',&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;     { :action = 'index'}) %&amp;gt; |&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;&amp;lt;%= link_to('About Us', { :action ='about'}) %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You may be interested to note that curly braces are optional in hashes where they are the final argument to a function as follows :-&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;&amp;lt;%= link_to('About Us',:action ='about') %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How does one not link to a page that is currently displayed ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;%= link_to_unless_current('Home',&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;     { :action = 'index'}) %&amp;gt; |&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;&amp;lt;%= link_to_unless_current('About Us', { :action ='about'}) %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Are there other related link_to functions ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Rails adheres to a naming convention whereby a group of related functions have related names, usually of the form original_function_name and original_function_name_with_modification&lt;br /&gt;&lt;br /&gt;Let's check to the Rails API via the Rails API Tab in Aptana Radrails or&amp;nbsp; at http://api.rubyonrails.org and this is what you should find&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;link_to&lt;/li&gt;&lt;li&gt;link_to_if&lt;/li&gt;&lt;li&gt;link_to_remote&lt;/li&gt;&lt;li&gt;link_to_unless&lt;/li&gt;&lt;li&gt;&lt;span style="color: red;"&gt;link_to_unless_current&lt;/span&gt; &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;How to display an image inside a link_to&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color: red;"&gt;&amp;lt;%=&lt;/span&gt;&lt;span style="color: red;"&gt; link_to image_tag("about.gif", :border&lt;/span&gt;&lt;span style="color: red;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: red;"&gt;0&lt;/span&gt;&lt;span style="color: red;"&gt;),&lt;/span&gt;&lt;span style="color: red;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;:action&lt;/span&gt;&lt;span style="color: red;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: red;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;'&lt;/span&gt;&lt;span style="color: red;"&gt;about&lt;/span&gt;&lt;span style="color: red;"&gt;'&lt;/span&gt;&lt;span style="color: red;"&gt;&lt;/span&gt;&lt;span style="color: red;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-8291705881653066536?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/8291705881653066536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=8291705881653066536&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8291705881653066536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8291705881653066536'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/09/rails-basics-linkto.html' title='Rails Basics : link_to'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-9003120098415670469</id><published>2009-09-02T00:06:00.001+08:00</published><updated>2009-09-02T00:06:33.231+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='script/generate'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Basics'/><title type='text'>Rail Basics : What happens when you script/generate ?</title><content type='html'>&lt;span style="color: blue;"&gt;chee@ibm4linux:~/workspace/crm4test$ script/generate&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Usage: script/generate generator [options] [args]&lt;br /&gt;Rails Info:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -v, --version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Show the Rails version number and quit.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -h, --help&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Show this help message and quit.&lt;br /&gt;General Options:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -p, --pretend&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Run but do not make any changes.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -f, --force&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Overwrite files that already exist.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -s, --skip&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Skip files that already exist.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -q, --quiet&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Suppress normal output.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -t, --backtrace&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debugging: show backtrace on errors.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -c, --svn&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Modify files with subversion. (Note: svn must be in path)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -g, --git&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Modify files with git. (Note: git must be in path)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Installed Generators&lt;br /&gt;&amp;nbsp; Plugins (vendor/plugins): authenticated, roles&lt;br /&gt;&amp;nbsp; Builtin: controller, helper, integration_test, mailer, metal, migration, model, observer, performance_test, plugin, resource, scaffold, session_migration&lt;br /&gt;&lt;br /&gt;More are available at http://wiki.rubyonrails.org/rails/pages/AvailableGenerators&lt;br /&gt;&amp;nbsp; 1. Download, for example, login_generator.zip&lt;br /&gt;&amp;nbsp; 2. Unzip to directory /home/chee/.rails/generators/login&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to use the generator with all your Rails apps&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or to /home/chee/workspace/crm4test/lib/generators/login&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to use with this app only.&lt;br /&gt;&amp;nbsp; 3. Run generate with no arguments for usage information&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script/generate login&lt;br /&gt;&lt;br /&gt;Generator gems are also available:&lt;br /&gt;&amp;nbsp; 1. gem search -r generator&lt;br /&gt;&amp;nbsp; 2. gem install login_generator&lt;br /&gt;&amp;nbsp; 3. script/generate login&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-9003120098415670469?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/9003120098415670469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=9003120098415670469&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/9003120098415670469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/9003120098415670469'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/09/rail-basics-what-happens-when-you.html' title='Rail Basics : What happens when you script/generate ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-1042261128186159320</id><published>2009-09-02T00:00:00.001+08:00</published><updated>2009-09-02T00:07:39.415+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='script/generate'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Basics'/><category scheme='http://www.blogger.com/atom/ns#' term='Models'/><title type='text'>Rails Basics : What happens when you script/generate model ?</title><content type='html'>&lt;span style="color: blue;"&gt;chee@ibm4linux:~/workspace/crm4test$ script/generate model&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Usage: script/generate model ModelName [field:type, field:type]&lt;br /&gt;Options:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --skip-timestamps&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Don't add timestamps to the migration file for this model&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --skip-migration&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Don't generate a migration file for this model&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --skip-fixture&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Don't generation a fixture file for this model&lt;br /&gt;Rails Info:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -v, --version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Show the Rails version number and quit.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -h, --help&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Show this help message and quit.&lt;br /&gt;General Options:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -p, --pretend&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Run but do not make any changes.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -f, --force&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Overwrite files that already exist.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -s, --skip&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Skip files that already exist.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -q, --quiet&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Suppress normal output.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -t, --backtrace&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debugging: show backtrace on errors.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -c, --svn&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Modify files with subversion. (Note: svn must be in path)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -g, --git&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Modify files with git. (Note: git must be in path)&lt;br /&gt;&lt;br /&gt;Description:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stubs out a new model. Pass the model name, either CamelCased or&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; under_scored, and an optional list of attribute pairs as arguments.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attribute pairs are column_name:sql_type arguments specifying the&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; model's attributes. Timestamps are added by default, so you don't have to&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; specify them by hand as 'created_at:datetime updated_at:datetime'.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You don't have to think up every attribute up front, but it helps to&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sketch out a few so you can start working with the model immediately.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This generates a model class in app/models, a unit test in test/unit,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a test fixture in test/fixtures/singular_name.yml, and a migration in&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; db/migrate.&lt;br /&gt;&lt;br /&gt;Examples:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `./script/generate model account`&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; creates an Account model, test, fixture, and migration:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Model:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app/models/account.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Test:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test/unit/account_test.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fixtures:&amp;nbsp;&amp;nbsp; test/fixtures/accounts.yml&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Migration:&amp;nbsp; db/migrate/XXX_add_accounts.rb&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `./script/generate model post title:string body:text published:boolean`&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; creates a Post model with a string title, text body, and published flag.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-1042261128186159320?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/1042261128186159320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=1042261128186159320&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/1042261128186159320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/1042261128186159320'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/09/rails-basics-what-happens-when-you.html' title='Rails Basics : What happens when you script/generate model ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-5141328419861302329</id><published>2009-08-31T12:19:00.003+08:00</published><updated>2009-08-31T12:36:47.208+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='role_requirement'/><title type='text'>Rails Plugins : How to Install role_requirement ?</title><content type='html'>&lt;b&gt;Step 1 - Grab role_requirement form github.com&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;chee@ibm4linux:~/workspace/crm4test$ script/plugin install git://github.com/timcharper/role_requirement.git&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;Result&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;br /&gt;Initialized empty Git repository in /home/chee/workspace/crm4test/vendor/plugins/role_requirement/.git/&lt;br /&gt;remote: Counting objects: 32, done.&lt;br /&gt;remote: Compressing objects: 100% (30/30), done.&lt;br /&gt;remote: Total 32 (delta 3), reused 10 (delta 0)&lt;br /&gt;Unpacking objects: 100% (32/32), done.&lt;br /&gt;From git://github.com/timcharper/role_requirement&lt;br /&gt;&amp;nbsp;* branch&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HEAD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; FETCH_HEAD&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2 - Run the generator&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;chee@ibm4linux:~/workspace/crm4test$ script/generate roles Role User&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Generating Role against User&lt;br /&gt;Added the following to the top of app/models/user.rb:&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; # ---------------------------------------&lt;br /&gt;&amp;nbsp; # The following code has been generated by role_requirement.&lt;br /&gt;&amp;nbsp; # You may wish to modify it to suit your need&lt;br /&gt;&amp;nbsp; has_and_belongs_to_many :roles&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; # has_role? simply needs to return true or false whether a user has a role or not.&amp;nbsp; &lt;br /&gt;&amp;nbsp; # It may be a good idea to have "admin" roles return true always&lt;br /&gt;&amp;nbsp; def has_role?(role_in_question)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @_list ||= self.roles.collect(&amp;amp;:name)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true if @_list.include?("admin")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (@_list.include?(role_in_question.to_s) )&lt;br /&gt;&amp;nbsp; end&lt;br /&gt;&amp;nbsp; # ---------------------------------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;Added ApplicationController include to /home/chee/workspace/crm4test/app/controllers/application_controller.rb&lt;br /&gt;Added RoleRequirement include to /home/chee/workspace/crm4test/app/controllers/application_controller.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; test/fixtures/roles.yml&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; app/models/role.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; lib/role_requirement_system.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; lib/role_requirement_test_helper.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; lib/hijacker.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; db/migrate&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; db/migrate/20090831042625_create_roles.rb&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 3 - rake db:migrate&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;chee@ibm4linux:~/workspace/crm4test$ rake db:migrate&lt;br /&gt;(in /home/chee/workspace/crm4test)&lt;br /&gt;==&amp;nbsp; CreateRoles: migrating ====================================================&lt;br /&gt;-- create_table("roles")&lt;br /&gt;&amp;nbsp;&amp;nbsp; -&amp;gt; 0.0037s&lt;br /&gt;-- create_table("roles_users", {:id=&amp;gt;false})&lt;br /&gt;&amp;nbsp;&amp;nbsp; -&amp;gt; 0.0027s&lt;br /&gt;-- add_index("roles_users", "role_id")&lt;br /&gt;&amp;nbsp;&amp;nbsp; -&amp;gt; 0.0122s&lt;br /&gt;-- add_index("roles_users", "user_id")&lt;br /&gt;&amp;nbsp;&amp;nbsp; -&amp;gt; 0.0016s&lt;br /&gt;==&amp;nbsp; CreateRoles: migrated (0.0229s) ===========================================&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="wikiheader" style="margin-bottom: 1em;"&gt;&lt;span style="font-size: 120%; font-weight: bold;"&gt;What does the Generators do ?&lt;/span&gt;  &amp;nbsp;      &lt;/div&gt;&lt;ul&gt;&lt;li&gt;Only if many roles are used: &lt;/li&gt;&lt;ul&gt;&lt;li&gt;Generates habtm table, creates role.rb with the habtm declaration.  Adds declaration in user.rb (scans the code for &lt;b&gt;"class User &amp;lt; ActiveRecord::Base"&lt;/b&gt;, and puts the new code right after it. &lt;/li&gt;&lt;li&gt;Creates an admin user in users.yml, with a role named admin in roles.yml, including a fixture to demonstrate how to relate roles to users in roles_users.yml &lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Modify the user.rb (or corresponding user model) file, add the instance method has_role? &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Generates RoleRequirementSystem against for the corresponding user model. &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Generates a migration to make the necessary database changes &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Scans ApplicationController, inserts the lines "include &lt;a href="http://code.google.com/p/rolerequirement/wiki/AuthenticatedSystem"&gt;AuthenticatedSystem&lt;/a&gt;", and "include RoleRequirementSystem", if not already included. &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Scans test_helper.rb and adds "includes RoleRequirementTestHelpers", if not already included. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt; &amp;nbsp;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-5141328419861302329?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/5141328419861302329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=5141328419861302329&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5141328419861302329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5141328419861302329'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/rails-plugins-how-to-install_31.html' title='Rails Plugins : How to Install role_requirement ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-4585936175111998594</id><published>2009-08-31T11:50:00.003+08:00</published><updated>2009-08-31T12:22:52.224+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='restful_authentication'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Plugins'/><title type='text'>Rails Plugins : How to Install restful_authentication ?</title><content type='html'>To use role_requirement, the prerequisite is to install the restful_authentication plugin. These are the 3 steps that I took to achieve a succesful installation.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1 - Grab the plugin from github.com &lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;chee@ibm4linux:~/workspace/crm4test$ script/plugin install git://github.com/technoweenie/restful-authentication.git&lt;br /&gt;&lt;br /&gt;Result&lt;br /&gt;&lt;br /&gt;Initialized empty Git repository in /home/chee/workspace/crm4test/vendor/plugins/restful-authentication/.git/&lt;br /&gt;remote: Counting objects: 89, done.&lt;br /&gt;remote: Compressing objects: 100% (77/77), done.&lt;br /&gt;remote: Total 89 (delta 5), reused 31 (delta 2)&lt;br /&gt;Unpacking objects: 100% (89/89), done.&lt;br /&gt;From git://github.com/technoweenie/restful-authentication&lt;br /&gt;&amp;nbsp;* branch&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HEAD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; FETCH_HEAD&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2 - Generate user and sessions controllers&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;chee@ibm4linux:~/workspace/crm4test$ script/generate authenticated user sessions&lt;br /&gt;&lt;br /&gt;This is what you will see in the command line editor (in Ubuntu 9.04, a Gnome Terminal Window) &lt;br /&gt;&lt;br /&gt;Ready to generate.&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;Once finished, don't forget to:&lt;br /&gt;&lt;br /&gt;- Add routes to these resources. In config/routes.rb, insert routes like:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.signup '/signup', :controller =&amp;gt; 'users', :action =&amp;gt; 'new'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.login&amp;nbsp; '/login',&amp;nbsp; :controller =&amp;gt; 'sessions', :action =&amp;gt; 'new'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.logout '/logout', :controller =&amp;gt; 'sessions', :action =&amp;gt; 'destroy'&lt;br /&gt;&lt;div style="color: blue;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;CCH : No need to do so as the latest version automatically includes these routes to routes.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&lt;/span&gt;----------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;We've create a new site key in config/initializers/site_keys.rb.&amp;nbsp; If you have existing&lt;br /&gt;user accounts their passwords will no longer work (see README). As always,&lt;br /&gt;keep this file safe but don't post it in public.&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; app/models/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; app/controllers/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; app/controllers/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; app/helpers/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;create&amp;nbsp; app/views/sessions&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; app/controllers/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; app/helpers/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;create&amp;nbsp; app/views/users&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; config/initializers&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; test/functional/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; test/functional/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; test/unit/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; test/fixtures/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;create&amp;nbsp; app/models/user.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; app/controllers/sessions_controller.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; app/controllers/users_controller.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; lib/authenticated_system.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; lib/authenticated_test_helper.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; config/initializers/site_keys.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; test/functional/sessions_controller_test.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; test/functional/users_controller_test.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; test/unit/user_test.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; test/fixtures/users.yml&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; app/helpers/sessions_helper.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; app/helpers/users_helper.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; app/views/sessions/new.html.erb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; app/views/users/new.html.erb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; app/views/users/_user_bar.html.erb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &lt;span style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; db/migrate&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; db/migrate/20090831032706_create_users.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; route&amp;nbsp; map.resource :session&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; route&amp;nbsp; map.resources :users&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; route&amp;nbsp; map.signup '/signup', :controller =&amp;gt; 'users', :action =&amp;gt; 'new'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; route&amp;nbsp; map.register '/register', :controller =&amp;gt; 'users', :action =&amp;gt; 'create'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; route&amp;nbsp; map.login '/login', :controller =&amp;gt; 'sessions', :action =&amp;gt; 'new'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; route&amp;nbsp; map.logout '/logout', :controller =&amp;gt; 'sessions', :action =&amp;gt; 'destroy&lt;/span&gt;'&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 3 - Modify the Project Database&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;chee@ibm4linux:~/workspace/crm4test$ rake db:migrate&lt;br /&gt;(in /home/chee/workspace/crm4test)&lt;br /&gt;==&amp;nbsp; CreateUsers: migrating ====================================================&lt;br /&gt;-- create_table("users", {:force=&amp;gt;true})&lt;br /&gt;&amp;nbsp;&amp;nbsp; -&amp;gt; 0.0074s&lt;br /&gt;-- add_index(:users, :login, {:unique=&amp;gt;true})&lt;br /&gt;&amp;nbsp;&amp;nbsp; -&amp;gt; 0.0374s&lt;br /&gt;==&amp;nbsp; CreateUsers: migrated (0.0464s) ===========================================&lt;br /&gt;&lt;br /&gt;You may be interested to look at the contents of the migration file as follows :-&lt;br /&gt;&lt;br /&gt;class CreateUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;&amp;nbsp; def self.up&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; create_table "users", :force =&amp;gt; true do |t|&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.column :login, :string, :limit =&amp;gt; 40&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.column :name, :string, :limit =&amp;gt; 100, :default =&amp;gt; '', :null =&amp;gt; true&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.column :email, :string, :limit =&amp;gt; 100&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.column :crypted_password,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :string, :limit =&amp;gt; 40&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.column :salt,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :string, :limit =&amp;gt; 40&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.column :created_at,&amp;nbsp; :datetime&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.column :updated_at, :datetime&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.column :remember_token, :string, :limit =&amp;gt; 40&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.column :remember_token_expires_at, :datetime&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; add_index :users, :login, :unique =&amp;gt; true&lt;br /&gt;&amp;nbsp; end&lt;br /&gt;&lt;br /&gt;&amp;nbsp; def self.down&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop_table "users"&lt;br /&gt;&amp;nbsp; end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Generated User &amp;amp; Sessions Controllers&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;User.rb&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;class UsersController &amp;lt; ApplicationController&lt;br /&gt;&amp;nbsp; # Be sure to include AuthenticationSystem in Application Controller instead&lt;br /&gt;&amp;nbsp; include AuthenticatedSystem&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&amp;nbsp; # render new.rhtml&lt;br /&gt;&amp;nbsp; def new&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @user = User.new&lt;br /&gt;&amp;nbsp; end&lt;br /&gt;&lt;br /&gt;&amp;nbsp; def create&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logout_keeping_session!&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @user = User.new(params[:user])&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; success = @user &amp;amp;&amp;amp; @user.save&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if success &amp;amp;&amp;amp; @user.errors.empty?&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Protects against session fixation attacks, causes request forgery&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # protection if visitor resubmits an earlier form using back&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # button. Uncomment if you understand the tradeoffs.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # reset session&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.current_user = @user # !! now logged in&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; redirect_back_or_default('/')&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flash[:notice] = "Thanks for signing up!&amp;nbsp; We're sending you an email with your activation code."&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flash[:error]&amp;nbsp; = "We couldn't set up that account, sorry.&amp;nbsp; Please try again, or contact an admin (link is above)."&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; render :action =&amp;gt; 'new'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;&amp;nbsp; end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;b&gt;sessions.rb&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;# This controller handles the login/logout function of the site.&amp;nbsp; &lt;br /&gt;class SessionsController &amp;lt; ApplicationController&lt;br /&gt;&amp;nbsp; # Be sure to include AuthenticationSystem in Application Controller instead&lt;br /&gt;&amp;nbsp; include AuthenticatedSystem&lt;br /&gt;&lt;br /&gt;&amp;nbsp; # render new.rhtml&lt;br /&gt;&amp;nbsp; def new&lt;br /&gt;&amp;nbsp; end&lt;br /&gt;&lt;br /&gt;&amp;nbsp; def create&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logout_keeping_session!&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; user = User.authenticate(params[:login], params[:password])&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if user&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Protects against session fixation attacks, causes request forgery&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # protection if user resubmits an earlier form using back&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # button. Uncomment if you understand the tradeoffs.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # reset_session&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.current_user = user&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new_cookie_flag = (params[:remember_me] == "1")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handle_remember_cookie! new_cookie_flag&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; redirect_back_or_default('/')&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flash[:notice] = "Logged in successfully"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; note_failed_signin&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @login&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = params[:login]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @remember_me = params[:remember_me]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; render :action =&amp;gt; 'new'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;&amp;nbsp; end&lt;br /&gt;&lt;br /&gt;&amp;nbsp; def destroy&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logout_killing_session!&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; flash[:notice] = "You have been logged out."&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; redirect_back_or_default('/')&lt;br /&gt;&amp;nbsp; end&lt;br /&gt;&lt;br /&gt;protected&lt;br /&gt;&amp;nbsp; # Track failed login attempts&lt;br /&gt;&amp;nbsp; def note_failed_signin&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; flash[:error] = "Couldn't log you in as '#{params[:login]}'"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logger.warn "Failed login for '#{params[:login]}' from #{request.remote_ip} at #{Time.now.utc}"&lt;br /&gt;&amp;nbsp; end&lt;br /&gt;end&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-4585936175111998594?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/4585936175111998594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=4585936175111998594&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/4585936175111998594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/4585936175111998594'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/rails-plugins-how-to-install.html' title='Rails Plugins : How to Install restful_authentication ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-5050172460972574818</id><published>2009-08-30T19:36:00.003+08:00</published><updated>2009-09-02T00:08:33.447+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='script/generate'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Basics'/><category scheme='http://www.blogger.com/atom/ns#' term='Controllers'/><title type='text'>Rail Basics : What happens when you script/generate controller ?</title><content type='html'>What do you think will happen if you script/generate controller&amp;nbsp; ?&lt;br /&gt;&lt;br /&gt;Why wonder, just do it :-)&lt;br /&gt;&lt;br /&gt;If you are using Ubuntu 9.04, just open a Terminal Window and cd to the root of your Rails applications and type script/generate controller -- as follows :-&lt;br /&gt;&lt;br /&gt;chee@ibm4linux:~/workspace/crm2009$ script/generate controller &lt;br /&gt;&lt;br /&gt;After pressing Enter, this is what you will see. &lt;br /&gt;&lt;br /&gt;Usage: script/generate controller ControllerName [options]&lt;br /&gt;Rails Info:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -v, --version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Show the Rails version number and quit.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -h, --help&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Show this help message and quit.&lt;br /&gt;General Options:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -p, --pretend&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Run but do not make any changes.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -f, --force&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Overwrite files that already exist.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -s, --skip&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Skip files that already exist.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -q, --quiet&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Suppress normal output.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -t, --backtrace&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debugging: show backtrace on errors.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -c, --svn&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Modify files with subversion. (Note: svn must be in path)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -g, --git&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Modify files with git. (Note: git must be in path)&lt;br /&gt;&lt;br /&gt;Description:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stubs out a new controller and its views. Pass the controller name, either&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CamelCased or under_scored, and a list of views as arguments.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; To create a controller within a module, specify the controller name as a&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; path like 'parent_module/controller_name'.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This generates a controller class in app/controllers, view templates in&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app/views/controller_name, a helper class in app/helpers, a functional&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; test suite in test/functional and a helper test suite in test/unit/helpers.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `./script/generate controller CreditCard open debit credit close`&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Credit card controller with URLs like /credit_card/debit.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Controller:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app/controllers/credit_card_controller.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Functional Test: test/functional/credit_card_controller_test.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Views:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app/views/credit_card/debit.html.erb [...]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Helper:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app/helpers/credit_card_helper.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Helper Test:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test/unit/helpers/credit_card_helper_test.rb&lt;br /&gt;&lt;br /&gt;Modules Example:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `./script/generate controller 'admin/credit_card' suspend late_fee`&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Credit card admin controller with URLs /admin/credit_card/suspend.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Controller:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app/controllers/admin/credit_card_controller.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Functional Test: test/functional/admin/credit_card_controller_test.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Views:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app/views/admin/credit_card/debit.html.erb [...]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Helper:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app/helpers/admin/credit_card_helper.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Helper Test:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test/unit/helpers/admin/credit_card_helper_test.rb&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-5050172460972574818?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/5050172460972574818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=5050172460972574818&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5050172460972574818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5050172460972574818'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/rail-basics-what-happens-when-you.html' title='Rail Basics : What happens when you script/generate controller ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-4002434585315643991</id><published>2009-08-30T12:10:00.002+08:00</published><updated>2009-08-30T16:47:43.230+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Basics'/><title type='text'>Rails Basics : How to Install a Plugin from the Command Line ?</title><content type='html'>Although &lt;a href="http://cch4rails.blogspot.com/2009/08/how-to-install-plugin-in-aptana.html"&gt;Aptana Radrails and other Rails IDE usually have a Rails Plugin Tab&lt;/a&gt; or its equivalent, I personally feel that it easier and more flexible to do so using the Command Line.&lt;br /&gt;&lt;br /&gt;To do so in Ubuntu 9.04, click Applications/Accessories/Terminal to open a terminal window and cd to the root of your Rails Project as follows :-&lt;br /&gt;&lt;br /&gt;chee@ibm4linux:~$ cd workspace&lt;br /&gt;chee@ibm4linux:~/workspace$ cd crm2009&lt;br /&gt;&lt;br /&gt;chee@ibm4linux:~/workspace/crm2009$ script/plugin install &lt;url git="" location="" of="" plugin="" repository&amp;nbsp;="" svn="" target="" the="" your=""&gt;&lt;/url&gt;&lt;br /&gt;&lt;br /&gt;To discover the various options available in script/plugin&lt;br /&gt;&lt;br /&gt;chee@ibm4linux:~/workspace/crm2009$ script/plugin --&lt;br /&gt;Unknown command: &lt;br /&gt;Usage: plugin [OPTIONS] command&lt;br /&gt;Rails plugin manager.&lt;br /&gt;GENERAL OPTIONS&lt;br /&gt;&amp;nbsp; -r, --root=DIR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set an explicit rails app directory.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Default: /home/chee/workspace/crm2009&lt;br /&gt;&amp;nbsp; -s, --source=URL1,URL2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use the specified plugin repositories instead of the defaults.&lt;br /&gt;&amp;nbsp; -v, --verbose&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Turn on verbose output.&lt;br /&gt;&amp;nbsp; -h, --help&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Show this help message.&lt;br /&gt;COMMANDS&lt;br /&gt;&amp;nbsp; discover&amp;nbsp;&amp;nbsp; Discover plugin repositories.&lt;br /&gt;&amp;nbsp; list&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List available plugins.&lt;br /&gt;&amp;nbsp; install&amp;nbsp;&amp;nbsp;&amp;nbsp; Install plugin(s) from known repositories or URLs.&lt;br /&gt;&amp;nbsp; update&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Update installed plugins.&lt;br /&gt;&amp;nbsp; remove&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Uninstall plugins.&lt;br /&gt;&amp;nbsp; source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add a plugin source repository.&lt;br /&gt;&amp;nbsp; unsource&amp;nbsp;&amp;nbsp; Remove a plugin repository.&lt;br /&gt;&amp;nbsp; sources&amp;nbsp;&amp;nbsp;&amp;nbsp; List currently configured plugin repositories.&lt;br /&gt;&lt;br /&gt;EXAMPLES&lt;br /&gt;&amp;nbsp; Install a plugin:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin install continuous_builder&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Install a plugin from a subversion URL:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin install http://dev.rubyonrails.com/svn/rails/plugins/continuous_builder&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Install a plugin from a git URL:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin install git://github.com/SomeGuy/my_awesome_plugin.git&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Install a plugin and add a svn:externals entry to vendor/plugins&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin install -x continuous_builder&lt;br /&gt;&lt;br /&gt;&amp;nbsp; List all available plugins:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin list&lt;br /&gt;&lt;br /&gt;&amp;nbsp; List plugins in the specified repository:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin list --source=http://dev.rubyonrails.com/svn/rails/plugins/&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Discover and prompt to add new repositories:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin discover&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Discover new repositories but just list them, don't add anything:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin discover -l&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Add a new repository to the source list:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin source http://dev.rubyonrails.com/svn/rails/plugins/&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Remove a repository from the source list:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin unsource http://dev.rubyonrails.com/svn/rails/plugins/&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Show currently configured repositories:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin sources&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-4002434585315643991?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/4002434585315643991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=4002434585315643991&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/4002434585315643991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/4002434585315643991'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/how-to-install-plugin-from-command-line.html' title='Rails Basics : How to Install a Plugin from the Command Line ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-5828532955486693148</id><published>2009-08-29T18:20:00.004+08:00</published><updated>2009-08-30T16:48:24.101+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Basics'/><category scheme='http://www.blogger.com/atom/ns#' term='Models'/><title type='text'>Rails Basics : What is a Model ?</title><content type='html'>&lt;b&gt;What is a Model ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The Model is the 'M' in the MVC (Model/Views/Controller) concept integral to a Rails application.&lt;br /&gt;&lt;br /&gt;Models should :-&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Constitute most of your application codes.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Provide&amp;nbsp; a persistent storage mechanism to your database&lt;/li&gt;&lt;li&gt;Define all business logic&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;In a nutshell, Models should be the brains that operate on your application's database, determine and change the state of other objects and co-ordinate the overall business logic of your applications.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Conventions for Models&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Model classes in Rails are  all inherited from the ActiveRecord base class ActiveRecord::Base and  map one-to-one to a table in your database.&lt;br /&gt;&lt;br /&gt;Residing in the &lt;span style="color: red;"&gt;app/models&lt;/span&gt; directory, Models should following the following convention :-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Only one class per file&lt;/li&gt;&lt;li&gt;Class name should be singular and camel-cased eg.Customer or BillNo&lt;/li&gt;&lt;li&gt;Corresponding table name should be lowercased, plural and underscored eg. customers or bill_nos&lt;/li&gt;&lt;li&gt;Corresponding table must have an auto-incrementing integer field called id&lt;/li&gt;&lt;li&gt;Column names shoudl also be lowercased&lt;/li&gt;&lt;li&gt;Model filename should be lowercased and underscored version of the class name eg. customer.rb or bill_no.rb &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;To represent the relationship between tables and columns in your application, ActiveRecord provides the following set of methods called associations :-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: red;"&gt;has_many&lt;/span&gt;  represents a zero-to-many relationship between the Parent &amp;amp; Child Class&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: red;"&gt;belongs_to&lt;/span&gt; is the reciprocal child method to parent has_many method &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: red;"&gt;has_one&amp;nbsp;&lt;/span&gt; is  like a belongs_to and represents a one-to-one relationship in your database&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;More to come... &lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-5828532955486693148?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/5828532955486693148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=5828532955486693148&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5828532955486693148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5828532955486693148'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/rails-basics-what-is-model.html' title='Rails Basics : What is a Model ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-5713788560174710535</id><published>2009-08-28T13:59:00.017+08:00</published><updated>2009-09-01T23:14:54.256+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Views'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Basics'/><category scheme='http://www.blogger.com/atom/ns#' term='Controllers'/><category scheme='http://www.blogger.com/atom/ns#' term='Models'/><title type='text'>Rails Basics : What is a Controller ?</title><content type='html'>&lt;b&gt;What is a Controller ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The Controller is an integral component of the MVC (Model/View/Controller) concept that is central to Rails. Controllers are normal Ruby classes that inherit from ActionController:Base or more frequently the generated ApplicationController Class&lt;br /&gt;&lt;br /&gt;Controllers have public action methods that can be called from the dispatcher as well as their own protected and private methods. Typically, action methods follow this pattern :-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Manipulate the domain model in some way&lt;/li&gt;&lt;li&gt;Refers to the response format requested by the user&lt;/li&gt;&lt;li&gt;Generate a response in the correct form by rendering a view template&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Controllers are more closely linked to Views than Models in that you can work on a Model in your application before even creating a Controller. That is why script/generate controller will also automatically create helpers and views folders but not a model folder as follows :-&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: white; color: red;"&gt;script/generate controller Concepts&lt;/div&gt;&lt;div style="background-color: white; color: red;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; app/controllers/&lt;/div&gt;&lt;div style="background-color: white; color: red;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;exists&amp;nbsp; app/helpers/&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: white; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; app/views/concepts&lt;/div&gt;&lt;div style="background-color: white; color: red;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; test/functional/&lt;/div&gt;&lt;div style="background-color: white; color: red;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists&amp;nbsp; test/unit/helpers/&lt;/div&gt;&lt;div style="background-color: white; color: red;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; app/controllers/concepts_controller.rb&lt;/div&gt;&lt;div style="background-color: white; color: red;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; test/functional/concepts_controller_test.rb&lt;/div&gt;&lt;div style="background-color: white; color: red;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; app/helpers/concepts_helper.rb&lt;/div&gt;&lt;div style="background-color: white; color: red;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create&amp;nbsp; test/unit/helpers/concepts_helper_test.rb&lt;/div&gt;&lt;div style="background-color: white; color: red;"&gt;&lt;/div&gt;&lt;br /&gt;As such, you should remove all Business Logic from your Controllers and put in the corresponding Model.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;So what does the Controllers in your Rails application&amp;nbsp; do ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Well, your controllers are only responsible for mapping between URLs, co-ordinating with your Models and your Views and channeling back to a HTTP response. In addition, it may do Access Control as well.&lt;br /&gt;&lt;br /&gt;Basically, when someone connects to your Rails Application via an URL, they are ly asking your Application to execute a Controller Action. Typically, action methods follow this pattern :-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Interact with the  domain model in some way such as selecting, inserting or updating data based on incoming parameters or using one or more classes form the app/model directory&lt;/li&gt;&lt;li&gt;Generate a response by rendering a view template with the same name as the action method&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Controller Conventions&lt;/b&gt;&lt;br /&gt;As you may be aware, Rails works magically so long as you adhere to the all important concepl of Convention over Configuration. In this respect Controller Conventions include :-&lt;br /&gt;&lt;br /&gt;a)&amp;nbsp; The Controller's class name should be camel cased and pluralised and be followed by the word controller. eg.CustomersControllers or BillNosControllers &lt;br /&gt;&lt;br /&gt;b)&amp;nbsp; Similar to Models, the controller filename should be lowercased and underscored versions of the class name. eg. customers_controllers.rb or bill_nos_controllers.rb &lt;br /&gt;&lt;br /&gt;c)&amp;nbsp; An action is a Public Method of a controller class. For example&lt;br /&gt;&lt;ul&gt;&lt;li&gt;index&lt;/li&gt;&lt;li&gt; show&lt;/li&gt;&lt;li&gt;new&lt;/li&gt;&lt;li&gt;create&lt;/li&gt;&lt;li&gt;edit&lt;/li&gt;&lt;li&gt;update&lt;/li&gt;&lt;li&gt; destroy&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;BTW, the above-mentioned actions are RESTful Rails actions. Each one of these methods connects the data in the Model layer to what you allow the user to see.&lt;br /&gt;&lt;br /&gt;What is fascinating is that unless explicitly told to do , Rails will render the views with the same name as the actions!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to remove a controller and all previously generated files ?&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;chee@ibm4linux:~/workspace/crm2009$ script/destroy controller concepts&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rm&amp;nbsp; test/unit/helpers/concepts_helper_test.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rm&amp;nbsp; app/helpers/concepts_helper.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rm&amp;nbsp; test/functional/concepts_controller_test.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rm&amp;nbsp; app/controllers/concepts_controller.rb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; notempty&amp;nbsp; test/unit/helpers&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; notempty&amp;nbsp; test/unit&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; notempty&amp;nbsp; test&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; notempty&amp;nbsp; test/functional&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; notempty&amp;nbsp; test&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rmdir&amp;nbsp; app/views/concepts&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; notempty&amp;nbsp; app/views&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; notempty&amp;nbsp; app&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; notempty&amp;nbsp; app/helpers&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; notempty&amp;nbsp; app&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; notempty&amp;nbsp; app/controllers&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; notempty&amp;nbsp; app&lt;br /&gt;chee@ibm4linux:~/workspace/crm2009$&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-5713788560174710535?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/5713788560174710535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=5713788560174710535&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5713788560174710535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5713788560174710535'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/rails-basics-what-is-controller.html' title='Rails Basics : What is a Controller ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-8300018396377058991</id><published>2009-08-23T15:18:00.017+08:00</published><updated>2009-08-30T16:58:07.040+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rails IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Radrails'/><category scheme='http://www.blogger.com/atom/ns#' term='Aptana Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='Installation'/><category scheme='http://www.blogger.com/atom/ns#' term='Galileo'/><title type='text'>Rails IDE : Installing Aptana Radrails 1.30 into Eclipse Galileo</title><content type='html'>For Radrail users who would like to use it within Eclipse Galileo, you may want to follow this simple tutorial :-&lt;br /&gt;&lt;br /&gt;1. Download Eclipse 3.50 aka Galileo&lt;br /&gt;&lt;br /&gt;2. Launch Eclipse&lt;br /&gt;&lt;br /&gt;3. Click Help/Install Software&lt;br /&gt;&lt;br /&gt;4. Install Aptana Studio 1.5 as a plug into Eclipse&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_8Fmgkr0dcSo/SpDt45skhhI/AAAAAAAAASs/4ihC1JKUZgU/s1600-h/AptanaStudio2EclipseGalileo.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5373055917269222930" src="http://2.bp.blogspot.com/_8Fmgkr0dcSo/SpDt45skhhI/AAAAAAAAASs/4ihC1JKUZgU/s320/AptanaStudio2EclipseGalileo.png" style="cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_8Fmgkr0dcSo/SpDuT7QcuGI/AAAAAAAAAS0/ld8m65u_4vU/s1600-h/AptanaStudio2EclipseGalileo2.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5373056381544609890" src="http://2.bp.blogspot.com/_8Fmgkr0dcSo/SpDuT7QcuGI/AAAAAAAAAS0/ld8m65u_4vU/s320/AptanaStudio2EclipseGalileo2.png" style="cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;5. Install Aptana Radrails via Aptana Studio&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_8Fmgkr0dcSo/SpDvuPQ-xxI/AAAAAAAAATE/0ER6QaYMbJI/s1600-h/RadRails2AptanaStudio.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5373057933103777554" src="http://1.bp.blogspot.com/_8Fmgkr0dcSo/SpDvuPQ-xxI/AAAAAAAAATE/0ER6QaYMbJI/s320/RadRails2AptanaStudio.png" style="cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_8Fmgkr0dcSo/SpDvaqleBOI/AAAAAAAAAS8/DDmmpA7vwtk/s1600-h/Radrails2AptanaStudio2.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5373057596840084706" src="http://3.bp.blogspot.com/_8Fmgkr0dcSo/SpDvaqleBOI/AAAAAAAAAS8/DDmmpA7vwtk/s320/Radrails2AptanaStudio2.png" style="cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_8Fmgkr0dcSo/SpDwMPkIxuI/AAAAAAAAATM/RXxQtKyn9Cc/s1600-h/Radrails2AptanaStudio3.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5373058448580200162" src="http://3.bp.blogspot.com/_8Fmgkr0dcSo/SpDwMPkIxuI/AAAAAAAAATM/RXxQtKyn9Cc/s320/Radrails2AptanaStudio3.png" style="cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_8Fmgkr0dcSo/SpDwoKIfRPI/AAAAAAAAATU/NQidtpfaI4w/s1600-h/Radrails2AptanaStudio4.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5373058928158393586" src="http://2.bp.blogspot.com/_8Fmgkr0dcSo/SpDwoKIfRPI/AAAAAAAAATU/NQidtpfaI4w/s320/Radrails2AptanaStudio4.png" style="cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;6. Open Aptana Radrails Perspective via Windows/Open Perspective/Others&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_8Fmgkr0dcSo/SpD1B_be2mI/AAAAAAAAATc/XlfceuYUSyU/s1600-h/AptanaRails_Perspective.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5373063770008377954" src="http://4.bp.blogspot.com/_8Fmgkr0dcSo/SpD1B_be2mI/AAAAAAAAATc/XlfceuYUSyU/s320/AptanaRails_Perspective.png" style="cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;7. After opening a Rails Project&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_8Fmgkr0dcSo/SpD1nPUZP4I/AAAAAAAAATk/DuMJnC3mBYE/s1600-h/Radrails_Perspective2.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5373064409928777602" src="http://4.bp.blogspot.com/_8Fmgkr0dcSo/SpD1nPUZP4I/AAAAAAAAATk/DuMJnC3mBYE/s320/Radrails_Perspective2.png" style="cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-8300018396377058991?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/8300018396377058991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=8300018396377058991&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8300018396377058991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8300018396377058991'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/installing-aptana-radrails-130-into.html' title='Rails IDE : Installing Aptana Radrails 1.30 into Eclipse Galileo'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_8Fmgkr0dcSo/SpDt45skhhI/AAAAAAAAASs/4ihC1JKUZgU/s72-c/AptanaStudio2EclipseGalileo.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-4513259977015155832</id><published>2009-08-23T00:46:00.010+08:00</published><updated>2009-08-30T18:04:50.963+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu 9.04'/><category scheme='http://www.blogger.com/atom/ns#' term='record_select'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='acts_as_audited'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Scaffold'/><category scheme='http://www.blogger.com/atom/ns#' term='restful_authentication'/><category scheme='http://www.blogger.com/atom/ns#' term='2.3.3'/><category scheme='http://www.blogger.com/atom/ns#' term='active_scaffold_tools'/><category scheme='http://www.blogger.com/atom/ns#' term='role_requiremnt'/><category scheme='http://www.blogger.com/atom/ns#' term='acts_as_authenticated'/><category scheme='http://www.blogger.com/atom/ns#' term='Migration'/><category scheme='http://www.blogger.com/atom/ns#' term='Radrails'/><title type='text'>Migration : Migrating an Application from Rails 1.2.5  to Rails 2.3.3</title><content type='html'>Since Nov 2007, I had a Rails 1.2 e-CRM application running on Windows Server 2003 and powered by Apache 2 and a pack of Mongrels web servers.&lt;br /&gt;&lt;br /&gt;A couple of weeks ago, I discovered Ubuntu 9.04 and decided to migrate the e-CRM to Rails 2.3.3 running on Ubuntu 9.04.&lt;br /&gt;&lt;br /&gt;What have I achieved thus far ?&lt;br /&gt;&lt;br /&gt;1. Installing Rails 2.3.3 on Ubuntu 9.04&lt;br /&gt;2. Installing Mongrel, Capistrano, Passenger and Apache on Ubuntu 9.04.&lt;br /&gt;3. Installing Aptana Radrails on Ubuntu 9.04&lt;br /&gt;4. Since Aptana Radrails was slow, I then installed Eclipse Ganymade (3.4.2) and managed to install the latest Aptana Radrails .1.30 as a plugin to Eclipse&lt;br /&gt;&lt;br /&gt;When I attempted to run e-CRM on Rails 1.2, I ran into a number of incompatibilities including the need to update the following Rails Plugins&lt;br /&gt;&lt;br /&gt;1. active_scaffold&lt;br /&gt;2. active_scaffold_export&lt;br /&gt;3. active_scaffold_tools (still unable to get a version compatible with Rails 2.3.3)&lt;br /&gt;4. role_requirement&lt;br /&gt;5. use restful_authentication instead of acts_as_authenticated&lt;br /&gt;6. record_select&lt;br /&gt;7. acts_as_audited&lt;br /&gt;&lt;br /&gt;Then after wasting a couple of days, I discovered that Ubunti 9.04 being a Linux distro is case-sensitive and I had to pay attention to renaming the images files in the public\images folder.&lt;br /&gt;&lt;br /&gt;Also, I used this script (command line) to auto-convert my rhtml files to html.erb as recommended for Rails 2.x&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;for f in $(find . -name '*.rhtml') ; do c=$(dirname $f)/$(basename $f .rhtml).html.erb ; mv $f $c ; done&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Why the need to change rhtml to html.erb ?&lt;br /&gt;&lt;br /&gt;Apparently in Rails 2.x, it’s been revealed that the &lt;code&gt;.rhtml&lt;/code&gt; and &lt;code&gt;.rxml&lt;/code&gt; file extensions will be deprecated in favor of &lt;code&gt;.erb&lt;/code&gt; and &lt;code&gt;.builder&lt;/code&gt;, respectively.&lt;br /&gt;Why such a change – well, &lt;code&gt;.rhtml&lt;/code&gt; files are not strictly html files. They are generic embedded ruby files that can be used for email templates, csv files, vcards etc… &lt;code&gt;.erb&lt;/code&gt; is just a more generic, accurate extension for the file type.  The same goes for &lt;code&gt;.rxml&lt;/code&gt; – it can be used for more than just xml files. Think of all the rss feeds you’ve written with rxml files. Now you can stop being tied down by the limited &lt;code&gt;.rxml&lt;/code&gt; file extension and can start using &lt;code&gt;.builder&lt;/code&gt;.&lt;br /&gt;FYI, the ‘old’ extensions won’t be fully deprecated until Rails 3.0.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;BTW, this &lt;a href="http://marklunds.com/articles/one/409"&gt;site&lt;/a&gt; was also useful reference in my quest to upgrade from Rails 1.2 to 2.3.3&lt;br /&gt;&lt;br /&gt;Some additional plugins needed by active_scaffold include&lt;br /&gt;&lt;br /&gt;a) in_place_editing - git://github.com/rails/in_place_editing.git&lt;br /&gt;b) render_component&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More to come...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-4513259977015155832?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/4513259977015155832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=4513259977015155832&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/4513259977015155832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/4513259977015155832'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/migrating-application-from-rails-12-to.html' title='Migration : Migrating an Application from Rails 1.2.5  to Rails 2.3.3'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-7088371716447222818</id><published>2009-08-22T21:00:00.009+08:00</published><updated>2009-08-30T17:30:25.329+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rails IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Ganymade'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Radrails'/><category scheme='http://www.blogger.com/atom/ns#' term='Aptana Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='Installation'/><title type='text'>Rails IDE: Can Radrails be installed into Eclipse ? {Updated 30th August 2009]</title><content type='html'>I would answer Yes and No this question :-)&lt;br /&gt;&lt;br /&gt;Yes, you can install Radrails directly to Eclipse (I use Eclipse Ganymade aka 3.4.2) but you ended up with the obsolete 0.72 version :-(&lt;br /&gt;&lt;br /&gt;To install the latest 1.30 developed by Aptana and known as Aptana radrails, I was forced to install Aptana Studio and then Install Aptana Radrails&lt;br /&gt;&lt;br /&gt;Still, the effort was worth it as the loading time for Eclipse Ganymade SDK version + Aptana Radrails loads much faster and runs faster than Aptana 1.51 Studio + Aptana Radrails.&lt;br /&gt;&lt;br /&gt;BTW, take a look at my actual experience in &lt;a href="http://cch4rails.blogspot.com/2009/08/installing-aptana-radrails-130-into.html"&gt;installing Aptana Radrails into Eclipse Galileo aka 3.50&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-7088371716447222818?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/7088371716447222818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=7088371716447222818&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/7088371716447222818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/7088371716447222818'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/can-radrails-be-installed-into-eclipse.html' title='Rails IDE: Can Radrails be installed into Eclipse ? {Updated 30th August 2009]'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-8612539260073452911</id><published>2009-08-19T15:03:00.006+08:00</published><updated>2009-11-20T11:16:18.622+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Advanced Rails'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><title type='text'>Advanced Rails : How do you create a New Database from schema.db ?</title><content type='html'>1. Select your Project&lt;br /&gt;&lt;br /&gt;2. Edit config\database.yml&lt;br /&gt;development:&lt;br /&gt;database: SourceDatabaseName&lt;br /&gt;&lt;br /&gt;3. Delete schema.db&lt;br /&gt;&lt;br /&gt;4. Right-click and select Rake\db\schema\load which basically the same as typing into the Rails Shell&lt;br /&gt;&lt;br /&gt;5. Edit config\database.yml&lt;br /&gt;development:&lt;br /&gt;database: ProjectDatabaseName&lt;br /&gt;&lt;br /&gt;Nb. Assume that you had already create an empty database for your project&lt;br /&gt;&lt;br /&gt;6. rake db:schema:load&lt;br /&gt;&lt;br /&gt;That's it, when you check your project database, it is already populated with the Source Schema.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-8612539260073452911?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/8612539260073452911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=8612539260073452911&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8612539260073452911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8612539260073452911'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/how-do-you-create-new-database-from.html' title='Advanced Rails : How do you create a New Database from schema.db ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-2993211712512198482</id><published>2009-08-18T18:14:00.013+08:00</published><updated>2009-08-30T17:01:21.530+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rails IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='Radrails'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Rails IDE: Programming a Rails Project Using Aptana Radrails</title><content type='html'>Here are the steps that I took when programming a RoR project using Aptana Rails 1.5 on Ubuntu 9.04&lt;br /&gt;&lt;br /&gt;1. Use MySQL Administrator to create a new database crm2009&lt;br /&gt;2. Use Aptana Radrails(defaulted to Radrails perspective) to create new project via&lt;br /&gt;a) File&lt;br /&gt;b) New&lt;br /&gt;c) Rails Project&lt;br /&gt;and the standard Rail Page was launched apparently without any error&lt;br /&gt;&lt;br /&gt;d) Checked Console and found the folowing error message&lt;br /&gt;/!\ FAILSAFE /!\  Tue Aug 18 18:03:01 +0800 2009&lt;br /&gt;Status: 500 Internal Server Error&lt;br /&gt;Access denied for user 'root'@'localhost' (using password: NO)&lt;br /&gt;&lt;br /&gt;3. Edited config\database.yml to put in mysql password and the problem went away&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_8Fmgkr0dcSo/SoqF-bShzSI/AAAAAAAAASc/ADWQo_XxPSc/s1600-h/crm2009-1.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5371252813116591394" src="http://3.bp.blogspot.com/_8Fmgkr0dcSo/SoqF-bShzSI/AAAAAAAAASc/ADWQo_XxPSc/s320/crm2009-1.png" style="cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;Installing Rails Plugin&lt;br /&gt;&lt;br /&gt;The problem with Aptana Radrails is that being Eclippse 3.2-based, it does not support installing from the github although using the Rails Plugin Tab works with svn. Worst still, using console script/plugin install &lt;git repository=""&gt; also does not work :-(&lt;br /&gt;&lt;br /&gt;So what's the workaround ?&lt;br /&gt;&lt;br /&gt;Opening a Terminal Window, i was force to type&lt;br /&gt;git clone &lt;git name="" repository=""&gt; to download to&lt;br /&gt;crm2009\vendor\plugins&lt;br /&gt;&lt;br /&gt;In this manner, I installed restul_authentication,role_requirement,acts_as_audited,active_scaffold etc&lt;br /&gt;&lt;br /&gt;Then, I selected vendor\plugins and right-clicked to Refresh and the desired plugins are now in the Ruby Explorer&lt;br /&gt;&lt;br /&gt;&lt;/git&gt;&lt;/git&gt;&lt;a href="http://1.bp.blogspot.com/_8Fmgkr0dcSo/SoqJzO3AjLI/AAAAAAAAASk/heM8nqVq6t8/s1600-h/crm2009-plugins.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5371257018847890610" src="http://1.bp.blogspot.com/_8Fmgkr0dcSo/SoqJzO3AjLI/AAAAAAAAASk/heM8nqVq6t8/s320/crm2009-plugins.png" style="cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;git repository=""&gt;&lt;git name="" repository=""&gt;&lt;span style="font-weight: bold;"&gt;Installing restful_authentication&lt;/span&gt;&lt;br /&gt;a) Select Generate Tab&lt;br /&gt;b) Select authenticated&lt;br /&gt;c)Type user session in parameters&lt;br /&gt;d) Click OK&lt;br /&gt;&lt;br /&gt;In the Console, we can see this&lt;br /&gt;&lt;br /&gt;script/generate authenticated user sessions&lt;br /&gt;Ready to generate.&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;Once finished, don't forget to:&lt;br /&gt;&lt;br /&gt;- Add routes to these resources. In config/routes.rb, insert routes like:&lt;br /&gt;map.signup '/signup', :controller =&amp;gt; 'users', :action =&amp;gt; 'new'&lt;br /&gt;map.login  '/login',  :controller =&amp;gt; 'sessions', :action =&amp;gt; 'new'&lt;br /&gt;map.logout '/logout', :controller =&amp;gt; 'sessions', :action =&amp;gt; 'destroy'&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;We've create a new site key in config/initializers/site_keys.rb.  If you have existing&lt;br /&gt;user accounts their passwords will no longer work (see README). As always,&lt;br /&gt;keep this file safe but don't post it in public.&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;exists  app/models/&lt;br /&gt;exists  app/controllers/&lt;br /&gt;exists  app/controllers/&lt;br /&gt;exists  app/helpers/&lt;br /&gt;create  app/views/sessions&lt;br /&gt;exists  app/controllers/&lt;br /&gt;exists  app/helpers/&lt;br /&gt;create  app/views/users&lt;br /&gt;exists  config/initializers&lt;br /&gt;exists  test/functional/&lt;br /&gt;exists  test/functional/&lt;br /&gt;exists  test/unit/&lt;br /&gt;exists  test/fixtures/&lt;br /&gt;create  app/models/user.rb&lt;br /&gt;create  app/controllers/sessions_controller.rb&lt;br /&gt;create  app/controllers/users_controller.rb&lt;br /&gt;create  lib/authenticated_system.rb&lt;br /&gt;create  lib/authenticated_test_helper.rb&lt;br /&gt;create  config/initializers/site_keys.rb&lt;br /&gt;create  test/functional/sessions_controller_test.rb&lt;br /&gt;create  test/functional/users_controller_test.rb&lt;br /&gt;create  test/unit/user_test.rb&lt;br /&gt;create  test/fixtures/users.yml&lt;br /&gt;create  app/helpers/sessions_helper.rb&lt;br /&gt;create  app/helpers/users_helper.rb&lt;br /&gt;create  app/views/sessions/new.html.erb&lt;br /&gt;create  app/views/users/new.html.erb&lt;br /&gt;create  app/views/users/_user_bar.html.erb&lt;br /&gt;create  db/migrate&lt;br /&gt;create  db/migrate/20090818114130_create_users.rb&lt;br /&gt;route  map.resource :session&lt;br /&gt;route  map.resources :users&lt;br /&gt;route  map.signup '/signup', :controller =&amp;gt; 'users', :action =&amp;gt; 'new'&lt;br /&gt;route  map.register '/register', :controller =&amp;gt; 'users', :action =&amp;gt; 'create'&lt;br /&gt;route  map.login '/login', :controller =&amp;gt; 'sessions', :action =&amp;gt; 'new'&lt;br /&gt;route  map.logout '/logout', :controller =&amp;gt; 'sessions', :action =&amp;gt; 'destroy'&lt;br /&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;Then, select db/migrate/yymmddhhmmss_create_users.rb&lt;br /&gt;Right-click, select Rake/db/migrate and hit enter an in the Rails Console&lt;br /&gt;&lt;br /&gt;rake db:migrate&lt;br /&gt;==  CreateUsers: migrating ====================================================&lt;br /&gt;-- create_table("users", {:force=&amp;gt;true})&lt;br /&gt;-&amp;gt; 0.0108s&lt;br /&gt;-- add_index(:users, :login, {:unique=&amp;gt;true})&lt;br /&gt;-&amp;gt; 0.0122s&lt;br /&gt;==  CreateUsers: migrated (0.0246s) ===========================================&lt;br /&gt;&lt;br /&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;script/generate mailer user&lt;br /&gt;exists  app/models/&lt;br /&gt;create  app/views/user&lt;br /&gt;exists  test/unit/&lt;br /&gt;create  test/fixtures/user&lt;br /&gt;overwrite app/models/user.rb? (enter "h" for help) [Ynaqdh] Y&lt;br /&gt;force  app/models/user.rb&lt;br /&gt;overwrite test/unit/user_test.rb? (enter "h" for help) [Ynaqdh] Y&lt;br /&gt;force  test/unit/user_test.rb&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Installing role_requirement&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;script/generate roles Role User&lt;br /&gt;Generating Role against User&lt;br /&gt;Added the following to the top of app/models/user.rb:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# ---------------------------------------&lt;br /&gt;# The following code has been generated by role_requirement.&lt;br /&gt;# You may wish to modify it to suit your need&lt;br /&gt;has_and_belongs_to_many :roles&lt;br /&gt;&lt;br /&gt;# has_role? simply needs to return true or false whether a user has a role or not.&lt;br /&gt;# It may be a good idea to have "admin" roles return true always&lt;br /&gt;def has_role?(role_in_question)&lt;br /&gt;@_list ||= self.roles.collect(&amp;amp;:name)&lt;br /&gt;return true if @_list.include?("admin")&lt;br /&gt;(@_list.include?(role_in_question.to_s) )&lt;br /&gt;end&lt;br /&gt;# ---------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Added ApplicationController include to /home/chee/Aptana Studio Workspace/crm2009/app/controllers/application_controller.rb&lt;br /&gt;Added RoleRequirement include to /home/chee/Aptana Studio Workspace/crm2009/app/controllers/application_controller.rb&lt;br /&gt;create  test/fixtures/roles.yml&lt;br /&gt;create  app/models/role.rb&lt;br /&gt;create  lib/role_requirement_system.rb&lt;br /&gt;create  lib/role_requirement_test_helper.rb&lt;br /&gt;create  lib/hijacker.rb&lt;br /&gt;exists  db/migrate&lt;br /&gt;create  db/migrate/20090818131928_create_roles.rb&lt;br /&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/git&gt;&lt;/git&gt;Then, select db/migrate/yymmddhhmmss_create_roles.rb&lt;br /&gt;Right-click, select Rake/db/migrate and hit enter an in the Rails Console&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;git repository=""&gt;&lt;git name="" repository=""&gt;rake db:migrate&lt;br /&gt;==  CreateRoles: migrating ====================================================&lt;br /&gt;-- create_table("roles")&lt;br /&gt;-&amp;gt; 0.0652s&lt;br /&gt;-- create_table("roles_users", {:id=&amp;gt;false})&lt;br /&gt;-&amp;gt; 0.0066s&lt;br /&gt;-- add_index("roles_users", "role_id")&lt;br /&gt;-&amp;gt; 0.0123s&lt;br /&gt;-- add_index("roles_users", "user_id")&lt;br /&gt;-&amp;gt; 0.0486s&lt;br /&gt;==  CreateRoles: migrated (0.1342s) ===========================================&lt;br /&gt;&lt;br /&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;More to come...&lt;/git&gt;&lt;/git&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-2993211712512198482?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/2993211712512198482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=2993211712512198482&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2993211712512198482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2993211712512198482'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/programming-rails-project-using-aptana.html' title='Rails IDE: Programming a Rails Project Using Aptana Radrails'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_8Fmgkr0dcSo/SoqF-bShzSI/AAAAAAAAASc/ADWQo_XxPSc/s72-c/crm2009-1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-5570596453334899412</id><published>2009-08-17T18:25:00.010+08:00</published><updated>2009-08-30T17:13:48.621+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='touch'/><category scheme='http://www.blogger.com/atom/ns#' term='JSON'/><category scheme='http://www.blogger.com/atom/ns#' term='2.3.3'/><category scheme='http://www.blogger.com/atom/ns#' term='DHH'/><category scheme='http://www.blogger.com/atom/ns#' term='YAML'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Record'/><title type='text'>Announcements : Latest Rails version 2.3.3 Released on 20th July 2009</title><content type='html'>&lt;h2&gt;&lt;span style="font-size: 85%;"&gt;Rails 2.3.3: Touching, faster JSON, bug fixes&lt;/span&gt;&lt;/h2&gt;&lt;div class="auth"&gt;Posted by David July 20, 2009 @ 05:28 PM&lt;/div&gt;We’ve released Ruby on Rails version 2.3.3. This release fixes a lot of bugs and introduces a handful of new features.&lt;br /&gt;&lt;h4&gt;Active Record&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;touch&lt;/code&gt; is a convenient method to update a record’s timestamp and nothing else. This is extracted from apps whose models “touch” others when they change, such as a comment updating the parent.replies_changed_at timestamp after save and destroy. Timestamping an entire has_many association makes it easy to build a key for fragment caching that covers changes to the parent object and any of its children. This pattern is wrapped up as &lt;code&gt;belongs_to :parent, :touch =&amp;gt; :replies_changed_at&lt;/code&gt;. When the child changes, &lt;code&gt;parent.replies_changed_at&lt;/code&gt; is touched. &lt;code&gt;:touch =&amp;gt; true&lt;/code&gt; is defaults to &lt;code&gt;:touch =&amp;gt; :updated_at&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;code&gt;:primary_key&lt;/code&gt; option for &lt;code&gt;belongs_to&lt;/code&gt; for broader support of legacy schemas and those using a separate UUID primary key: &lt;code&gt;belongs_to :employee, :primary_key =&amp;gt; 'SSN', :foreign_key =&amp;gt; 'EMPID'&lt;/code&gt; &lt;a href="http://github.com/rails/rails/commit/b3ec7b2d03a52e43a4451d522eea7e6499289daa"&gt;changeset&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;JSON&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;decoding backends for the json and yajl libraries. Both are significantly faster than the default YAML backend. To get started, install the json gem and set &lt;code&gt;ActiveSupport::JSON.backend = 'JSONGem'&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;leaner user-facing encoding API. Since a JSON libraries implement &lt;code&gt;to_json&lt;/code&gt; with varying compatibility, safely overriding it is difficult. Most custom &lt;code&gt;to_json&lt;/code&gt; looks like &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;def to_json(*encoder_specific_args)&lt;br /&gt;{ :some =&amp;gt; "json representation" }.to_json(*encoder_specific_args)&lt;br /&gt;end&lt;/code&gt;&lt;/pre&gt;so we DRYed the user-facing API down to a more natural &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;def as_json(options = {})&lt;br /&gt;{ :some =&amp;gt; "json representation" }&lt;br /&gt;end&lt;/code&gt;&lt;/pre&gt;without the ugly internal state exposed by overloading &lt;code&gt;to_json&lt;/code&gt; as both public-facing and internal builder API. Rails 3 splits the API explicitly, so prepare now by switching from &lt;code&gt;to_json&lt;/code&gt; to &lt;code&gt;as_json&lt;/code&gt;.     &lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Other Features&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Add :concat option to asset tag helpers to force concatenation. &lt;a href="http://github.com/rails/rails/commit/a491b19502781266b05918cf99b6ba67898e3be9"&gt;changeset&lt;/a&gt; &lt;/li&gt;&lt;li&gt;Restore backwards compatibility for AR::Base#to_xml. &lt;a href="http://github.com/rails/rails/commit/7bf9bf3dd6b4c4d78214917f0877536d222098bb"&gt;changeset&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Move from BlueCloth to Markdown for the markdown helper. Users using BlueCloth to provide their markdown functionality should upgrade to version 1.0.1 or 2.0.5 in order to restore compatibility.&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Notable Bug Fixes&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Fix errors caused by class-reloading with streaming responses in development mode.  &lt;/li&gt;&lt;li&gt;Several fixes to the gem bundling, unpacking and installing system.&lt;/li&gt;&lt;li&gt;Make text_area_tag escape contents by default.&lt;/li&gt;&lt;li&gt;Make filter_parameters work correctly with array parameters.&lt;/li&gt;&lt;li&gt;Thread-safety fixes for postgresql string quoting.&lt;/li&gt;&lt;li&gt;Performance fixes for large response bodies.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-5570596453334899412?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/5570596453334899412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=5570596453334899412&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5570596453334899412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5570596453334899412'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/ruby-on-rails-version-233-released-on.html' title='Announcements : Latest Rails version 2.3.3 Released on 20th July 2009'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-4349526090992037207</id><published>2009-08-17T13:42:00.004+08:00</published><updated>2009-08-30T17:38:34.409+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu 9.04'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Scaffold'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='Terminal'/><title type='text'>Ubuntu 9.04 : How to Clone a Remote git Repository ?</title><content type='html'>What I did was :-&lt;br /&gt;&lt;br /&gt;1. Installed git in Ubuntu 8.04&lt;br /&gt;2. Launch a Terminal Window&lt;br /&gt;3. cd to MyRailsProject\vendor\plugins&lt;br /&gt;4. clone git http://github.com/activescaffld/active_scaffold.git&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-4349526090992037207?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/4349526090992037207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=4349526090992037207&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/4349526090992037207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/4349526090992037207'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/ubuntu-904-how-to-clone-remote-git.html' title='Ubuntu 9.04 : How to Clone a Remote git Repository ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-3639717371836953513</id><published>2009-08-16T16:22:00.008+08:00</published><updated>2009-08-30T17:03:55.524+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rails IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Scaffold'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='Radrails'/><category scheme='http://www.blogger.com/atom/ns#' term='Aptana Studio'/><title type='text'>Rails IDE : How to Install a Plugin in Aptana RadRails Professional ?</title><content type='html'>My last project using RoR was completed in Nov 2007 on a Windows 2003 Server and it has been functioning perfectly 24x7x365 till todate&lt;br /&gt;&lt;br /&gt;Having installed Ubuntu 9.04 on a dated IBM R40e (1G RAM &amp;amp; 75G HDD), I had earlier&lt;br /&gt;a) Installed &lt;a href="http://cch4rails.blogspot.com/2009/08/ubuntu-904-how-to-install-ruby-in-rails.html"&gt;Ruby on Rails&lt;/a&gt;&lt;br /&gt;b) Installed Aptana Studio 1.5 (based on Eclipse 3.2) and found that it needed Sun JRE&lt;br /&gt;c) Installed Sun JRE via Ubuntu's Terminal&lt;br /&gt;d) Installed the RADRails Plugin into Aptana Studio 1.5&lt;br /&gt;e) I then defaulted Aptana Studio to the RadRails Perspective&lt;br /&gt;&lt;br /&gt;Since ActiveScaffold was intensively used, I naturally downloaded it and was at a loss as how to install it :-( Then, I remembered that there was a Plugins Tab which should be visible but it wasn;t there :-(&lt;br /&gt;&lt;br /&gt;With a bit of exploring Aptana, I click Window/Show View and clicked Rails Plugin and bingo, the Rails Plugin Tab became visible. It was a breeze after that :-(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-3639717371836953513?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/3639717371836953513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=3639717371836953513&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3639717371836953513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3639717371836953513'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/how-to-install-plugin-in-aptana.html' title='Rails IDE : How to Install a Plugin in Aptana RadRails Professional ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-300803718633653987</id><published>2009-08-15T23:22:00.011+08:00</published><updated>2009-08-30T17:37:36.018+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu 9.04'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Mongrel'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLite3'/><category scheme='http://www.blogger.com/atom/ns#' term='2.3.3'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Capistrano'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby Gems'/><category scheme='http://www.blogger.com/atom/ns#' term='Passenger'/><title type='text'>Ubuntu 9.04 : How to Install Ruby on Rails 2.3.3  [15th August 2009]</title><content type='html'>&lt;h3 style="font-weight: normal;"&gt;CCH : These are the steps that I took to install Ruby on Rails to an IBM Thinkpad with 1G RAM and a 75G Hard Disk and installed with Ubuntu 9.04.&lt;br /&gt;&lt;/h3&gt;&lt;h3 style="font-weight: bold;"&gt;Ruby installation&lt;/h3&gt;Firstly, I clicked Applications/Accessories/Terminal to launch the Terminal and typed the following command to update the repositories.&lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;sudo apt-get update&lt;/div&gt;&lt;/div&gt;next, to upgrade the system :-&lt;br /&gt;&lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;sudo apt-get dist-upgrade&lt;/div&gt;&lt;/div&gt;The installation took afew minutes and also required approximately 100 MB disk space.&lt;br /&gt;On succesful updating, I started to install Rails.&lt;br /&gt;&lt;span style="color: #3333ff;"&gt;sudo apt-get install ruby ri rdoc irb libopenssl-ruby ruby-dev&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note : Rails prerequisites include :-&lt;br /&gt;ruby = An interpreter of object-oriented scripting language Ruby&lt;br /&gt;ri = Ruby Interactive reference&lt;br /&gt;rdoc = Generate documentation from ruby source files&lt;br /&gt;irb = Interactive Ruby&lt;br /&gt;&lt;h3&gt;Ruby Gem installation&lt;/h3&gt;Next, I started to install the Ruby gem package manager by firstly downloading ad the latest Ruby gems .35 via the  following link.&lt;br /&gt;&lt;a href="http://rubyforge.org/projects/rubygems/" target="_blank"&gt;http://rubyforge.org/projects/rubygems/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Download and extract the files. &lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;tar xvzf  rubygems-1.3.5.tgz&lt;br /&gt;cd rubygems-1.3.5&lt;br /&gt;sudo ruby setup.rb&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;I then deleted the .tgz file and rubygems directory.&lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;cd ..&lt;br /&gt;rm -r rubygems-1.3.5 rubygems-1.3.5.tgz&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Next, I set out to  create a set of simlinks. Otherwise it will be a tedious task to type commands with the version (1.8).  For an example if we need to call the gem command we’ve to type gem1.8.&lt;br /&gt;&lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;sudo ln -s /usr/bin/gem1.8 /usr/local/bin/gem&lt;br /&gt;sudo ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby&lt;br /&gt;sudo ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc&lt;br /&gt;sudo ln -s /usr/bin/ri1.8 /usr/local/bin/ri&lt;br /&gt;sudo ln -s /usr/bin/irb1.8 /usr/local/bin/irb&lt;/div&gt;&lt;/div&gt;&lt;h3&gt;Rails Installation&lt;/h3&gt;I then installed Rails using gem.&lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;sudo gem install rails&lt;/div&gt;&lt;/div&gt;&lt;h3&gt;Server Installation&lt;/h3&gt;FYI, Rails by default comes with the WEBrick server. But like most Rails developers, I prefer the Mongrel server and typed the following command to install Mongrel server as well as passenger 2.2.4 and capistrano 2.5.8 for deployemnt purposes&lt;br /&gt;&lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;sudo gem install mongrel passenger capistrano&lt;/div&gt;&lt;/div&gt;TIP : If you got any error while installing the Mongrel server, install the ruby-dev / ruby1.8-dev and try again.&lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;sudo apt-get install ruby-dev&lt;/div&gt;&lt;/div&gt;Database Installation &lt;br /&gt;Rails 2.3 shipped with  SQLite3 as it’s default database instead of  MySQL. You can install SQLite3 libraries by following commands.&lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;sudo apt-get install sqlite3 swig libsqlite3-ruby libsqlite3-dev&lt;br /&gt;sudo gem install sqlite3-ruby&lt;/div&gt;&lt;/div&gt;&lt;span style="color: #3333ff;"&gt;Si&lt;/span&gt;nce I prefer MySQL,&lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;sudo apt-get install mysql-client libmysqlclient15-dev&lt;br /&gt;sudo gem install mysql&lt;/div&gt;&lt;/div&gt;&lt;h3&gt;Create Ruby on Rails App&lt;/h3&gt;With no error mesages, I proceeded to create a new Ruby on Rail application by following command :-&lt;br /&gt;&lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;rails test_app&lt;/div&gt;&lt;/div&gt;As I needed MySQL support, I typed :&lt;br /&gt;&lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;rails test-app -d mysql&lt;/div&gt;&lt;/div&gt;&lt;h3&gt;Run the app&lt;/h3&gt;&lt;div class="codecolorer-container text vibrant" style="color: #3333ff; overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;cd test_app&lt;br /&gt;script/server&lt;/div&gt;&lt;/div&gt;I then point FireFox to http://localhost:3000&lt;br /&gt;and bingo I succeeded in launching my first RoR apps on Ubuntu :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-300803718633653987?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/300803718633653987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=300803718633653987&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/300803718633653987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/300803718633653987'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/ubuntu-904-how-to-install-ruby-in-rails.html' title='Ubuntu 9.04 : How to Install Ruby on Rails 2.3.3  [15th August 2009]'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-3275819086052806987</id><published>2009-08-15T17:45:00.005+08:00</published><updated>2009-08-30T17:39:18.484+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu 9.04'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Terminal'/><title type='text'>Ubuntu 9.04 : How to use the Terminal ?</title><content type='html'>Finally, after my last foray (in 2007)  into developing RoR applications in Windows, I finally decided to do so in Linux.&lt;br /&gt;&lt;br /&gt;Would you believe it, it took a retiree who loves to try out new operating systems to convince me to try out Ubuntu 9.04 ? He actually prefers Mandriva Spring 2009 :-)&lt;br /&gt;&lt;br /&gt;So using my usual modus operandi, I googled for 'How to install ruby and ruby on rails on ubuntu 9.04" and got &lt;a href="http://mohamedaslam.com/install-ruby-on-rails-on-ubuntu-904-jaunty-jacklope/"&gt;http://mohamedaslam.com/install-ruby-on-rails-on-ubuntu-904-jaunty-jacklope/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let's see what are the steps&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Ruby installation&lt;/h3&gt;First we need to update the repositories.&lt;br /&gt;&lt;div class="codecolorer-container text vibrant" style="overflow: auto; white-space: nowrap; width: 435px;"&gt;&lt;div class="text codecolorer" style="white-space: nowrap;"&gt;sudo apt-get update&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Er... what's sudo and more importantly where do I type it ?&lt;br /&gt;&lt;br /&gt;Did a further search and came across something called the Terminal and landed on &lt;a href="https://help.ubuntu.com/community/UsingTheTerminal"&gt;https://help.ubuntu.com/community/UsingTheTerminal &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;which says :-&lt;br /&gt;&lt;div class="line867"&gt;&lt;i&gt;"Under Linux there are GUIs (graphical user interfaces), where you can point and click and drag, and hopefully get work done without first reading lots of documentation. The traditional Unix environment is a CLI (command line interface), where you type commands to tell the computer what to do. That is faster and more powerful, but requires finding out what the commands are." &lt;span id="line-6"&gt;&lt;/span&gt;&lt;br /&gt;-- from &lt;b&gt;man intro(1)&lt;/b&gt; &lt;/i&gt;  &lt;span id="line-7"&gt;&lt;/span&gt;&lt;span id="line-8"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line862"&gt;For some tasks, especially things like system configuration, it makes sense to use the terminal, and you'll probably have seen instructions on help pages or &lt;a class="http" href="http://www.ubuntuforums.org/"&gt;forums&lt;/a&gt; similar to: &lt;span id="line-9"&gt;&lt;/span&gt;&lt;span id="line-10"&gt;&lt;/span&gt;&lt;span id="line-11"&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;sudo gobbledegook blah_blah -w -t -f aWkward/ComBinationOf/mixedCase/underscores_strokes/and.dots&lt;/pre&gt;&lt;span id="line-12"&gt;&lt;/span&gt;&lt;span id="line-13"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line874"&gt;It is often assumed that you know how to use the terminal - and anyone can manage typing and backspacing. But there are some crafty shortcuts which can make your life a lot easier: &lt;span id="line-14"&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;How to move around in a terminal window and edit the text that you type there.  &lt;span id="line-15"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Some Linux commands for basic tasks. &lt;span id="line-16"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Different ways to open a terminal, how to work with multiple terminals, etc. &lt;span id="line-17"&gt;&lt;/span&gt;&lt;span id="line-18"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h2 id="Using this page"&gt;Using this page&lt;/h2&gt;&lt;span id="line-19"&gt;&lt;/span&gt;&lt;span id="line-20"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;This page will help familiarize you with basic GNU/Linux shell commands. &lt;span id="line-21"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;It is not intended to be a complete guide to the command line, just an introduction to complement Ubuntu's graphical tools. &lt;span id="line-22"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line862"&gt;All command names will be in &lt;b&gt;bold&lt;/b&gt;. &lt;span id="line-23"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line862"&gt;Commands needing to be typed will be in &lt;b&gt;"bold with quotes"&lt;/b&gt;. &lt;span id="line-24"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;All of the commands on this page are to be issued from a command prompt in a terminal. &lt;span id="line-25"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;Note that the terminal is case sensitive.&lt;/b&gt; User, user, and USER are all different to Linux. &lt;span id="line-26"&gt;&lt;/span&gt;&lt;span id="line-27"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h2 id="Starting a Terminal"&gt;Starting a Terminal&lt;/h2&gt;&lt;span id="line-28"&gt;&lt;/span&gt;&lt;span id="line-29"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h3 id="In Gnome (Ubuntu)"&gt;In Gnome (Ubuntu)&lt;/h3&gt;&lt;span id="line-30"&gt;&lt;/span&gt;&lt;span id="line-31"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;The terminal can be found at &lt;b&gt;Applications menu&lt;/b&gt; -&amp;gt; &lt;b&gt;Accessories&lt;/b&gt; -&amp;gt; &lt;b&gt;Terminal&lt;/b&gt;. &lt;span id="line-32"&gt;&lt;/span&gt;&lt;span id="line-33"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h3 id="In Xfce (Xubuntu)"&gt;In Xfce (Xubuntu)&lt;/h3&gt;&lt;span id="line-34"&gt;&lt;/span&gt;&lt;span id="line-35"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;The terminal can be found at &lt;b&gt;Applications menu&lt;/b&gt; -&amp;gt; &lt;b&gt;System&lt;/b&gt; -&amp;gt; &lt;b&gt;Terminal&lt;/b&gt;. &lt;span id="line-36"&gt;&lt;/span&gt;&lt;span id="line-37"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h3 id="In KDE (Kubuntu)"&gt;In KDE (Kubuntu)&lt;/h3&gt;&lt;span id="line-38"&gt;&lt;/span&gt;&lt;span id="line-39"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;The terminal can be found at &lt;b&gt;KMenu&lt;/b&gt; -&amp;gt; &lt;b&gt;System&lt;/b&gt; -&amp;gt; &lt;b&gt;Terminal Program (Konsole)&lt;/b&gt;. &lt;span id="line-40"&gt;&lt;/span&gt;&lt;span id="line-41"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h2 id="Commands"&gt;Commands&lt;/h2&gt;&lt;span id="line-42"&gt;&lt;/span&gt;&lt;span id="line-43"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h3 id="sudo: Executing Commands with Elevated Privileges"&gt;sudo: Executing Commands with Elevated Privileges&lt;/h3&gt;&lt;span id="line-44"&gt;&lt;/span&gt;&lt;span id="line-45"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line862"&gt;Most of the following commands will need to be prefaced with the &lt;b&gt;sudo&lt;/b&gt; command if you will be working with directories or files not owned by your account. This is a special command which temporarily gives you access to change computer settings. The terminal will ask you for your password. Please see &lt;a href="https://help.ubuntu.com/community/RootSudo"&gt;RootSudo&lt;/a&gt; for information on using sudo. &lt;span id="line-46"&gt;&lt;/span&gt;&lt;span id="line-47"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h3 id="File &amp;amp; Directory Commands"&gt;File &amp;amp; Directory Commands&lt;/h3&gt;&lt;span id="line-48"&gt;&lt;/span&gt;&lt;span id="line-49"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;pwd&lt;/b&gt;: The &lt;b&gt;pwd&lt;/b&gt; command will allow you to know in which directory you're located (&lt;b&gt;pwd&lt;/b&gt; stands for "print working directory").  Example: &lt;b&gt;"pwd"&lt;/b&gt; in the Desktop directory will show "~/Desktop". Note that the Gnome Terminal also displays this information in the title bar of its window. &lt;span id="line-50"&gt;&lt;/span&gt;&lt;span id="line-51"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="gap"&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;ls&lt;/b&gt;:  The &lt;b&gt;ls&lt;/b&gt; command will show you the files in your current directory. Used with certain options, you can see sizes of files, when files were made, and permissions of files. Example: &lt;b&gt;"ls ~"&lt;/b&gt; will show you the files that are in your home directory. &lt;span id="line-52"&gt;&lt;/span&gt;&lt;span id="line-53"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="gap"&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;cd&lt;/b&gt;: The &lt;b&gt;cd&lt;/b&gt; command will allow you to change directories. When you open a terminal you will be in your home directory. To move around the file system you will use &lt;b&gt;cd&lt;/b&gt;.  Examples: &lt;span id="line-54"&gt;&lt;/span&gt;&lt;span id="line-55"&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line862"&gt;To navigate into the root directory, use &lt;b&gt;"cd /"&lt;/b&gt; &lt;span id="line-56"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line862"&gt;To navigate to your home directory, use &lt;b&gt;"cd"&lt;/b&gt; or &lt;b&gt;"cd ~"&lt;/b&gt; &lt;span id="line-57"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line862"&gt;To navigate up one directory level, use &lt;b&gt;"cd .."&lt;/b&gt; &lt;span id="line-58"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line862"&gt;To navigate to the previous directory (or back), use &lt;b&gt;"cd -"&lt;/b&gt; &lt;span id="line-59"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line862"&gt;To navigate through multiple levels of directory at once, specify the full directory path that you want to go to. For example, use, &lt;b&gt;"cd /var/www"&lt;/b&gt; to go directly to the /www subdirectory of /var/. As another example, &lt;b&gt;"cd ~/Desktop"&lt;/b&gt; will move you to the Desktop subdirectory inside your home directory. &lt;span id="line-60"&gt;&lt;/span&gt;&lt;span id="line-61"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li class="gap"&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;cp&lt;/b&gt;: The &lt;b&gt;cp&lt;/b&gt; command will make a copy of a file for you.  Example:  &lt;b&gt;"cp file foo"&lt;/b&gt; will make a exact copy of "file" and name it "foo", but the file "file" will still be there. If you are copying a directory, you must use &lt;b&gt;"cp -r directory foo"&lt;/b&gt; (copy recursively). &lt;span id="line-62"&gt;&lt;/span&gt;&lt;span id="line-63"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="gap"&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;mv&lt;/b&gt;: The &lt;b&gt;mv&lt;/b&gt; command will move a file to a different location or will rename a file.   Examples are as follows:  &lt;b&gt;"mv file foo"&lt;/b&gt; will rename the file "file" to "foo".  &lt;b&gt;"mv foo ~/Desktop"&lt;/b&gt; will move the file "foo" to your Desktop directory but will not rename it.  You must specify a new file name to rename a file. &lt;span id="line-64"&gt;&lt;/span&gt;&lt;span id="line-65"&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;To save on typing, you can substitute '~' in place of the home directory. &lt;span id="line-66"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line862"&gt;Note that if you are using &lt;b&gt;mv&lt;/b&gt; with &lt;b&gt;sudo&lt;/b&gt; you can use the ~ shortcut, because the terminal expands the ~ to your home directory. However, when you open a root shell with &lt;b&gt;sudo -i&lt;/b&gt; or &lt;b&gt;sudo -s&lt;/b&gt;, ~ will refer to the root account's home directory, not your own. &lt;span id="line-67"&gt;&lt;/span&gt;&lt;span id="line-68"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li class="gap"&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;rm&lt;/b&gt;: Use this command to remove or delete a file in your directory. &lt;span id="line-69"&gt;&lt;/span&gt;&lt;span id="line-70"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="gap"&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;rmdir&lt;/b&gt;: The &lt;b&gt;rmdir&lt;/b&gt; command will delete an &lt;i&gt;empty&lt;/i&gt; directory.  To delete a directory and all of its contents recursively, use &lt;b&gt;rm -r&lt;/b&gt; instead. &lt;span id="line-71"&gt;&lt;/span&gt;&lt;span id="line-72"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="gap"&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;mkdir&lt;/b&gt;: The &lt;b&gt;mkdir&lt;/b&gt; command will allow you to create directories.  Example: &lt;b&gt;"mkdir music"&lt;/b&gt; will create a directory called "music". &lt;span id="line-73"&gt;&lt;/span&gt;&lt;span id="line-74"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="gap"&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;man&lt;/b&gt;: The &lt;b&gt;man&lt;/b&gt; command is used to show you the manual of other commands.  Try &lt;b&gt;"man man"&lt;/b&gt; to get the man page for &lt;b&gt;man&lt;/b&gt; itself. See the "&lt;b&gt;Man&lt;/b&gt; &amp;amp; Getting Help" section down the page for more information. &lt;span id="line-75"&gt;&lt;/span&gt;&lt;span id="line-76"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h3 id="System Information Commands"&gt;System Information Commands&lt;/h3&gt;&lt;span id="line-77"&gt;&lt;/span&gt;&lt;span id="line-78"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;df&lt;/b&gt;: The &lt;b&gt;df&lt;/b&gt; command displays filesystem disk space usage for all mounted partitions. "&lt;b&gt;df -h&lt;/b&gt;" is probably the most useful - it uses megabytes (M) and gigabytes (G) instead of blocks to report. (&lt;b&gt;-h&lt;/b&gt; means "human-readable") &lt;span id="line-79"&gt;&lt;/span&gt;&lt;span id="line-80"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="gap"&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;du&lt;/b&gt;: The &lt;b&gt;du&lt;/b&gt; command displays the disk usage for a directory. It can either display the space used for all subdirectories or the total for the directory you run it on. Example: &lt;span id="line-81"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="line867"&gt;&lt;span id="line-82"&gt;&lt;/span&gt;&lt;span id="line-83"&gt;&lt;/span&gt;&lt;span id="line-84"&gt;&lt;/span&gt;&lt;span id="line-85"&gt;&lt;/span&gt;&lt;span id="line-86"&gt;&lt;/span&gt;&lt;span id="line-87"&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;user@users-desktop:~$ du /media/floppy&lt;br /&gt;1032    /media/floppy/files&lt;br /&gt;1036    /media/floppy/&lt;br /&gt;user@users-desktop:~$ du -sh /media/floppy&lt;br /&gt;1.1M    /media/floppy/&lt;/pre&gt;&lt;span id="line-88"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;-s&lt;/b&gt; means "Summary" and &lt;b&gt;-h&lt;/b&gt; means "Human Readable" &lt;span id="line-89"&gt;&lt;/span&gt;&lt;span id="line-90"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;free&lt;/b&gt;: The &lt;b&gt;free&lt;/b&gt; command displays the amount of free and used memory in the system. &lt;b&gt;"free -m"&lt;/b&gt; will give the information using megabytes, which is probably most useful for current computers. &lt;span id="line-91"&gt;&lt;/span&gt;&lt;span id="line-92"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="gap"&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;top&lt;/b&gt;: The &lt;b&gt;top&lt;/b&gt; command displays information on your Linux system, running processes and system resources, including CPU, RAM &amp;amp; swap usage and total number of tasks being run. To exit &lt;b&gt;top&lt;/b&gt;, press &lt;b&gt;"q"&lt;/b&gt;. &lt;span id="line-93"&gt;&lt;/span&gt;&lt;span id="line-94"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="gap"&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;uname -a&lt;/b&gt;: The &lt;b&gt;uname&lt;/b&gt; command with the &lt;b&gt;-a&lt;/b&gt; option prints all system information, including machine name, kernel name &amp;amp; version, and a few other details. Most useful for checking which kernel you're using. &lt;span id="line-95"&gt;&lt;/span&gt;&lt;span id="line-96"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="gap"&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;lsb_release -a&lt;/b&gt;: The &lt;b&gt;lsb_release&lt;/b&gt; command with the &lt;b&gt;-a&lt;/b&gt; option prints version information for the Linux release you're running, for example: &lt;span id="line-97"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="line867"&gt;&lt;span id="line-98"&gt;&lt;/span&gt;&lt;span id="line-99"&gt;&lt;/span&gt;&lt;span id="line-100"&gt;&lt;/span&gt;&lt;span id="line-101"&gt;&lt;/span&gt;&lt;span id="line-102"&gt;&lt;/span&gt;&lt;span id="line-103"&gt;&lt;/span&gt;&lt;span id="line-104"&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;user@computer:~$ lsb_release -a&lt;br /&gt;No LSB modules are available.&lt;br /&gt;Distributor ID: Ubuntu&lt;br /&gt;Description:    Ubuntu 6.06 LTS&lt;br /&gt;Release:        6.06&lt;br /&gt;Codename:       dapper&lt;/pre&gt;&lt;span id="line-105"&gt;&lt;/span&gt;&lt;span id="line-106"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;ifconfig&lt;/b&gt; reports on your system's network interfaces. &lt;span id="line-107"&gt;&lt;/span&gt;&lt;span id="line-108"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h3 id="Adding A New User"&gt;Adding A New User&lt;/h3&gt;&lt;span id="line-109"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;"adduser newuser"&lt;/b&gt; command will create a new general user called "newuser" on your system, and to assign a password for the newuser account use &lt;b&gt;"passwd newuser"&lt;/b&gt;. &lt;span id="line-110"&gt;&lt;/span&gt;&lt;span id="line-111"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h2 id="Options"&gt;Options&lt;/h2&gt;&lt;span id="line-112"&gt;&lt;/span&gt;&lt;span id="line-113"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;The default behaviour for a command may usually be modified by adding a &lt;b&gt;--&lt;i&gt;option&lt;/i&gt;&lt;/b&gt; to the command. The &lt;b&gt;ls&lt;/b&gt; command for example has an &lt;b&gt;-s&lt;/b&gt; option so that &lt;b&gt;"ls -s"&lt;/b&gt; will include file sizes in the listing. There is also a &lt;b&gt;-h&lt;/b&gt; option to get those sizes in a "human readable" format. &lt;span id="line-114"&gt;&lt;/span&gt;&lt;span id="line-115"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line862"&gt;Options can be grouped in clusters so &lt;b&gt;"ls -sh"&lt;/b&gt; is exactly the same command as &lt;b&gt;"ls -s -h"&lt;/b&gt;. Most options have a long version, prefixed with two dashes instead of one, so even &lt;b&gt;"ls --size --human-readable"&lt;/b&gt; is the same command. &lt;span id="line-116"&gt;&lt;/span&gt;&lt;span id="line-117"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h2 id="&amp;quot;Man&amp;quot; and getting help"&gt;"Man" and getting help&lt;/h2&gt;&lt;span id="line-118"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line867"&gt;&lt;img alt="/!\" height="15" src="https://help.ubuntu.com/htdocs/ubuntunew/img/alert.png" title="/!\" width="15" /&gt; &lt;b&gt;man &lt;i&gt;command&lt;/i&gt;&lt;/b&gt;, &lt;b&gt;info &lt;i&gt;command&lt;/i&gt;&lt;/b&gt; and &lt;b&gt;&lt;i&gt;command&lt;/i&gt; --help&lt;/b&gt; are the most important tools at the command line. &lt;span id="line-119"&gt;&lt;/span&gt;&lt;span id="line-120"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line862"&gt;Nearly every command and application in Linux will have a man (manual) file, so finding them is as simple as typing &lt;b&gt;"man "command""&lt;/b&gt; to bring up a longer manual entry for the specified command. For example, &lt;b&gt;"man mv"&lt;/b&gt; will bring up the &lt;b&gt;mv&lt;/b&gt; (Move) manual. &lt;span id="line-121"&gt;&lt;/span&gt;&lt;span id="line-122"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line862"&gt;Move up and down the man file with the arrow keys, and quit back to the command prompt with &lt;b&gt;"q"&lt;/b&gt;. &lt;span id="line-123"&gt;&lt;/span&gt;&lt;span id="line-124"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867"&gt;&lt;b&gt;"man man"&lt;/b&gt; will bring up the manual entry for the &lt;b&gt;man&lt;/b&gt; command, which is a good place to start! &lt;span id="line-125"&gt;&lt;/span&gt;&lt;span id="line-126"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867"&gt;&lt;b&gt;"man intro"&lt;/b&gt; is especially useful - it displays the "Introduction to user commands" which is a well-written, fairly brief introduction to the Linux command line. &lt;span id="line-127"&gt;&lt;/span&gt;&lt;span id="line-128"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line862"&gt;There are also &lt;b&gt;info&lt;/b&gt; pages, which are generally more in-depth than &lt;b&gt;man&lt;/b&gt; pages. Try &lt;b&gt;"info info"&lt;/b&gt; for the introduction to info pages.  &lt;span id="line-129"&gt;&lt;/span&gt;&lt;span id="line-130"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line862"&gt;Some software developers prefer &lt;b&gt;info&lt;/b&gt; to &lt;b&gt;man&lt;/b&gt; (for instance, GNU developers), so if you find a very widely used command or app that doesn't have a &lt;b&gt;man&lt;/b&gt; page, it's worth checking for an &lt;b&gt;info&lt;/b&gt; page. &lt;span id="line-131"&gt;&lt;/span&gt;&lt;span id="line-132"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line862"&gt;Virtually all commands understand the &lt;b&gt;-h&lt;/b&gt; (or &lt;b&gt;--help&lt;/b&gt;) option which will produce a short usage description of the command and it's options, then exit back to the command prompt. Try &lt;b&gt;"man -h"&lt;/b&gt; or &lt;b&gt;"man --help"&lt;/b&gt; to see this in action. &lt;span id="line-133"&gt;&lt;/span&gt;&lt;span id="line-134"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867"&gt;&lt;i&gt;Caveat: It's possible (but rare) that a program doesn't understand the -h option to mean help. For this reason, check for a &lt;b&gt;man&lt;/b&gt; or &lt;b&gt;info&lt;/b&gt; page first, and try the long option --help before -h.&lt;/i&gt; &lt;span id="line-135"&gt;&lt;/span&gt;&lt;span id="line-136"&gt;&lt;/span&gt;&lt;span id="line-137"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h3 id="Searching for man files"&gt;Searching for man files&lt;/h3&gt;&lt;span id="line-138"&gt;&lt;/span&gt;&lt;span id="line-139"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line874"&gt;If you aren't sure which command or application you need to use, you can try searching the man files. &lt;span id="line-140"&gt;&lt;/span&gt;&lt;span id="line-141"&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;man -k &lt;i&gt;foo&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;/i&gt; will search the man files for &lt;i&gt;foo&lt;/i&gt;. Try &lt;b&gt;"man -k nautilus"&lt;/b&gt; to see how this works. &lt;span id="line-142"&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line862"&gt;Note that this is the same as doing &lt;b&gt;apropos &lt;i&gt;command&lt;/i&gt;&lt;/b&gt;. &lt;span id="line-143"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;man -f &lt;i&gt;foo&lt;/i&gt;&lt;/b&gt; searches only the titles of your system's man files. Try &lt;b&gt;"man -f gnome"&lt;/b&gt;, for example. &lt;span id="line-144"&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line862"&gt;Note that this is the same as doing &lt;b&gt;whatis &lt;i&gt;command&lt;/i&gt;&lt;/b&gt;. &lt;span id="line-145"&gt;&lt;/span&gt;&lt;span id="line-146"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h2 id="Other Useful Things"&gt;Other Useful Things&lt;/h2&gt;&lt;span id="line-147"&gt;&lt;/span&gt;&lt;span id="line-148"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h3 id="Prettier Manual Pages"&gt;Prettier Manual Pages&lt;/h3&gt;&lt;span id="line-149"&gt;&lt;/span&gt;&lt;span id="line-150"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;Users who have &lt;i&gt;Konqueror&lt;/i&gt; installed will be pleased to find they can read and search man pages in a web browser context, prettified with their chosen desktop fonts and a little colour, by visiting &lt;b&gt;man:/&lt;i&gt;command&lt;/i&gt;&lt;/b&gt; in Konqueror's address bar. Some people might find this lightens the load if there's lots of documentation to read/search. &lt;span id="line-151"&gt;&lt;/span&gt;&lt;span id="line-152"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h3 id="Pasting in commands"&gt;Pasting in commands&lt;/h3&gt;&lt;span id="line-153"&gt;&lt;/span&gt;&lt;span id="line-154"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;Often, you will be referred to instructions that require commands to be pasted into the terminal. You might be wondering why the text you've copied from a web page using &lt;b&gt;ctrl+C&lt;/b&gt; won't paste in with &lt;b&gt;ctrl+V&lt;/b&gt;. Surely you don't have to type in all those nasty commands and filenames? Relax. Middle Button Click on your mouse (both buttons simultaneously on a two-button mouse) or Right Click and select &lt;i&gt;Paste&lt;/i&gt; from the menu. &lt;span id="line-155"&gt;&lt;/span&gt;&lt;span id="line-156"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h3 id="Save on typing"&gt;Save on typing&lt;/h3&gt;&lt;span id="line-157"&gt;&lt;/span&gt;&lt;span id="line-158"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td style="text-align: left;"&gt;&lt;div class="line891"&gt;&lt;b&gt;Up Arrow&lt;/b&gt; or &lt;b&gt;ctrl+p&lt;/b&gt; &lt;/div&gt;&lt;/td&gt;   &lt;td colspan="2" style="text-align: left;"&gt;&lt;div class="line862"&gt;Scrolls through the commands you've entered previously.&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td style="text-align: left;"&gt;&lt;span id="line-159"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;&lt;b&gt;Down Arrow&lt;/b&gt; or &lt;b&gt;ctrl+n&lt;/b&gt; &lt;/div&gt;&lt;/td&gt;   &lt;td colspan="2" style="text-align: left;"&gt;&lt;div class="line862"&gt;Takes you back to a more recent command.&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;span id="line-160"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;&lt;b&gt;Enter&lt;/b&gt; &lt;/div&gt;&lt;/td&gt;   &lt;td colspan="2" style="text-align: left;"&gt;&lt;div class="line862"&gt;When you have the command you want.&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td style="text-align: left;"&gt;&lt;span id="line-161"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;&lt;b&gt;tab&lt;/b&gt; &lt;/div&gt;&lt;/td&gt;   &lt;td colspan="2" style="text-align: left;"&gt;&lt;div class="line862"&gt;A very useful feature. It autocompletes any commands or filenames, if there's only one option, or else gives you a list of options.&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;span id="line-162"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;&lt;b&gt;ctrl+r&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td colspan="2" style="text-align: left;"&gt;&lt;div class="line862"&gt;Searches for commands you've already typed. When you have entered a very long, complex command and need to repeat it, using this key combination and then typing a portion of the command will search through your command history. When you find it, simply press &lt;b&gt;Enter&lt;/b&gt;.&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td style="text-align: left;"&gt;&lt;span id="line-163"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;b&gt;History&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td colspan="2" style="text-align: left;"&gt;&lt;div class="line862"&gt;The &lt;b&gt;history&lt;/b&gt; command shows a very long list of commands that you have typed. Each command is displayed next to a number. You can type &lt;b&gt;!x&lt;/b&gt; to execute a previously typed command from the list (replace the X with a number). If you &lt;b&gt;history&lt;/b&gt; output is too long, then use &lt;b&gt;history | less&lt;/b&gt; for a scrollable list.&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;span id="line-164"&gt;&lt;/span&gt;&lt;span id="line-165"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h3 id="Change the text"&gt;Change the text&lt;/h3&gt;&lt;span id="line-166"&gt;&lt;/span&gt;&lt;span id="line-167"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line874"&gt;The mouse won't work.  Use the Left/Right arrow keys to move around the line.  &lt;span id="line-168"&gt;&lt;/span&gt;&lt;span id="line-169"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line862"&gt;When the cursor is where you want it in the line, typing &lt;i&gt;inserts&lt;/i&gt; text - ie it doesn't overtype what's already there. &lt;span id="line-170"&gt;&lt;/span&gt;&lt;span id="line-171"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td&gt;&lt;div class="line862"&gt;&lt;b&gt;ctrl+a&lt;/b&gt; or &lt;b&gt;Home&lt;/b&gt; &lt;/div&gt;&lt;/td&gt;   &lt;td colspan="2" style="text-align: left;"&gt;&lt;div class="line862"&gt;Moves the cursor to the &lt;i&gt;start&lt;/i&gt; of a line.&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;span id="line-172"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;&lt;b&gt;ctrl+e&lt;/b&gt; or &lt;b&gt;End&lt;/b&gt; &lt;/div&gt;&lt;/td&gt;   &lt;td colspan="2" style="text-align: left;"&gt;&lt;div class="line862"&gt;Moves the cursor to the &lt;i&gt;&lt;b&gt;e&lt;/b&gt;nd&lt;/i&gt; of a line.&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;span id="line-173"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;&lt;b&gt;ctrl+b&lt;/b&gt; &lt;/div&gt;&lt;/td&gt;   &lt;td colspan="2" style="text-align: left;"&gt;&lt;div class="line862"&gt;Moves to the &lt;b&gt;b&lt;/b&gt;eginning of the previous or current word.&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;span id="line-174"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;&lt;b&gt;ctrl+k&lt;/b&gt; &lt;/div&gt;&lt;/td&gt;   &lt;td colspan="2" style="text-align: left;"&gt;&lt;div class="line862"&gt;Deletes from the current cursor position to the end of the line.&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;span id="line-175"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;&lt;b&gt;ctrl+u&lt;/b&gt; &lt;/div&gt;&lt;/td&gt;   &lt;td colspan="2" style="text-align: left;"&gt;&lt;div class="line862"&gt;Deletes the whole of the current line.&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;span id="line-176"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862"&gt;&lt;b&gt;ctrl+w&lt;/b&gt; &lt;/div&gt;&lt;/td&gt;   &lt;td colspan="2" style="text-align: left;"&gt;&lt;div class="line862"&gt;Deletes the word before the cursor.&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;span id="line-177"&gt;&lt;/span&gt;&lt;span id="line-178"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h2 id="More ways to run a terminal"&gt;More ways to run a terminal&lt;/h2&gt;&lt;span id="line-179"&gt;&lt;/span&gt;&lt;span id="line-180"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line874"&gt;You can also get it with a function key &lt;span id="line-181"&gt;&lt;/span&gt;&lt;span id="line-182"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line874"&gt;You can run more than one - in tabs or separate windows &lt;span id="line-183"&gt;&lt;/span&gt;&lt;span id="line-184"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867"&gt;&lt;/div&gt;&lt;h2 id="More Information"&gt;More Information&lt;/h2&gt;&lt;span id="line-185"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;a href="https://help.ubuntu.com/community/AptGetHowto"&gt;AptGetHowto&lt;/a&gt; - using apt-get to install packages from the command line. &lt;span id="line-186"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;a href="https://help.ubuntu.com/community/Repositories/CommandLine"&gt;Commandline Repository Editing&lt;/a&gt; - adding the Universe/Multiverse repositories through the command line. &lt;span id="line-187"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;a href="https://help.ubuntu.com/community/grep"&gt;grep Howto&lt;/a&gt; - grep is a powerful command line search tool. &lt;span id="line-188"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;a href="https://help.ubuntu.com/community/find"&gt;find Howto&lt;/a&gt; - locate files on the command line. &lt;span id="line-189"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;a href="https://help.ubuntu.com/community/CommandlineHowto"&gt;CommandlineHowto&lt;/a&gt; - longer and more complete than this basic guide, but still unfinished. &lt;span id="line-190"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;a href="https://help.ubuntu.com/community/HowToReadline"&gt;HowToReadline&lt;/a&gt; - information on some more advanced customization for the command line. &lt;span id="line-191"&gt;&lt;/span&gt;&lt;span id="line-192"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="line874"&gt;For more detailed tutorials on the Linux command line, please see: &lt;span id="line-193"&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;a class="http" href="http://linuxcommand.org/"&gt;http://linuxcommand.org/&lt;/a&gt;  - basic BASH tutorials, including BASH scripting &lt;span id="line-194"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;a class="http" href="http://linuxsurvival.com/index.php"&gt;http://linuxsurvival.com/index.php&lt;/a&gt;  - Java-based tutorials &lt;span id="line-195"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;a class="http" href="http://rute.2038bug.com/index.html.gz"&gt;http://rute.2038bug.com/index.html.gz&lt;/a&gt; - a massive online book about system administration, almost all from the command line. &lt;span id="line-196"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;div class="line891"&gt;&lt;a class="http" href="http://www.ss64.com/bash/"&gt;http://www.ss64.com/bash/&lt;/a&gt; - a good list a commands. &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-3275819086052806987?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/3275819086052806987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=3275819086052806987&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3275819086052806987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3275819086052806987'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/08/ubuntu-904-how-to-use-terminal.html' title='Ubuntu 9.04 : How to use the Terminal ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-6390784729958396774</id><published>2009-07-30T19:38:00.002+08:00</published><updated>2009-08-30T18:07:05.310+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='2.3'/><category scheme='http://www.blogger.com/atom/ns#' term='Guides'/><title type='text'>Rails Documentation : Ruby on Rails guides</title><content type='html'>&lt;span style="font-weight: bold;"&gt;CCH : From the Net&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;These guides are designed to make you immediately productive with Rails, and to help you understand how all of the pieces fit together. There are two different versions of the Guides site, and you should be sure to use the one that applies to your situation: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://guides.rubyonrails.org/"&gt;Current Release version&lt;/a&gt; – based on Rails 2.3&lt;/li&gt;&lt;li&gt;&lt;a href="http://guides.rails.info/"&gt;Edge version&lt;/a&gt; – based on the current Rails &lt;a href="http://github.com/rails/rails/tree/master"&gt;master branch&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-6390784729958396774?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/6390784729958396774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=6390784729958396774&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/6390784729958396774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/6390784729958396774'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/07/ruby-on-rails-guides.html' title='Rails Documentation : Ruby on Rails guides'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-3297630995270730922</id><published>2009-04-24T19:08:00.007+08:00</published><updated>2009-08-30T17:04:51.555+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Templates'/><category scheme='http://www.blogger.com/atom/ns#' term='2.3'/><category scheme='http://www.blogger.com/atom/ns#' term='Rack'/><category scheme='http://www.blogger.com/atom/ns#' term='Metal'/><category scheme='http://www.blogger.com/atom/ns#' term='Nested Forms'/><category scheme='http://www.blogger.com/atom/ns#' term='Engines'/><category scheme='http://www.blogger.com/atom/ns#' term='DHH'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><category scheme='http://www.blogger.com/atom/ns#' term='2.3.2'/><category scheme='http://www.blogger.com/atom/ns#' term='Passenger'/><title type='text'>Announcements : Rails 2.3: Templates, Engines, Rack, Metal, much more!</title><content type='html'>&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2 style="color: #990000; font-size: 18px; font-weight: bold; line-height: 20px; margin: 0px 0px 5px; padding: 0px;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;span style="color: #a69e8a; font-weight: normal; line-height: normal;"&gt;Posted by David March 16, 2009 @ 02:39 PM&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;Rails 2.3 is finally done and out the door. This is one of the most substantial upgrades to Rails in a very long time. A brief rundown of the top hitters:&lt;/span&gt;&lt;/div&gt;&lt;ul style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;li&gt;&lt;b&gt;Templates&lt;/b&gt;: Allows your new skeleton Rails application to be built your way with your default stack of gems, configs, and more.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Engines&lt;/b&gt;: Share reusable application pieces complete with routes that Just Work, models, view paths, and the works.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Rack&lt;/b&gt;: Rails now runs on Rack which gives you access to all the middleware goodness.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Metal&lt;/b&gt;: Write super fast pieces of optimized logic that routes around Action Controller.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Nested forms&lt;/b&gt;: Deal with complex forms so much easier.&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;And that’s just the tip of the iceberg. We’ve put together a complete guide for &lt;a href="http://guides.rubyonrails.org/2_3_release_notes.html" style="color: #336699; text-decoration: underline;"&gt;the Rails 2.3 release notes&lt;/a&gt; with much more information. Be sure to checkout the section on &lt;a href="http://guides.rubyonrails.org/2_3_release_notes.html#deprecated" style="color: #336699; text-decoration: underline;"&gt;what was deprecated&lt;/a&gt; when you’re ready to upgrade your application.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;You install 2.3 with (the final version is marked &lt;a href="http://github.com/rails/rails/tree/v2.3.2" style="color: #336699; text-decoration: underline;"&gt;2.3.2&lt;/a&gt;):&lt;/span&gt;&lt;/div&gt;&lt;code style="font-size: 120%;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;gem install rails&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;If you’re running on Passenger, be sure to &lt;a href="http://blog.phusion.nl/2009/03/13/phusion-passenger-212-final-released/" style="color: #336699; text-decoration: underline;"&gt;upgrade to 2.1.2&lt;/a&gt; as well. Rails 2.3 doesn’t run on older versions of Passenger!&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;We hope you’ll love it.&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-3297630995270730922?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/3297630995270730922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=3297630995270730922&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3297630995270730922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3297630995270730922'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/04/rails-23-templates-engines-rack-metal.html' title='Announcements : Rails 2.3: Templates, Engines, Rack, Metal, much more!'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-2348656946937605338</id><published>2009-02-17T08:16:00.002+08:00</published><updated>2009-08-30T17:15:54.768+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rails IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='Radrails'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Announcements : Radrails 1.1.2 Released</title><content type='html'>&lt;div&gt;&lt;span style="color: #333333; font-family: Verdana; line-height: 12px;"&gt;by &lt;b style="margin: 0px; padding: 0px;"&gt;&lt;a class="username-coloured" href="http://forums.aptana.com/memberlist.php?mode=viewprofile&amp;amp;u=1277" style="color: #105289; display: inline ! important; font-weight: bold; margin: 0px; padding: 0px ! important; text-decoration: none;"&gt;cwilliams&lt;/a&gt;&lt;/b&gt; » Wed Feb 04, 2009 9:45 pm&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #333333; font-family: Verdana; line-height: 14px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="content" style="color: #333333; font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif; font-size: 1.3em; line-height: 1.4em; margin: 0px; min-height: 3em; overflow: hidden; padding: 0px;"&gt;&lt;span style="color: #333333; font-family: Verdana; line-height: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="content" style="color: #333333; font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif; font-size: 1.3em; line-height: 1.4em; margin: 0px; min-height: 3em; overflow: hidden; padding: 0px;"&gt;&lt;span style="color: #333333; font-family: Verdana; line-height: 14px;"&gt;RadRails 1.1.2 has been released to stable. Users who are on 1.1.1 are recommended to upgrade. Aptana should prompt you to automatically upgrade if you're on 1.1.1. To manually install (for users of older releases, or those experiencing problems) the update site is: &lt;a class="postlink" href="http://update.aptana.com/update/rails/3.2/" style="border-bottom: 1px solid rgb(54, 138, 210); color: #105289; margin: 0px; padding: 0px; text-decoration: none;"&gt;http://update.aptana.com/update/rails/3.2/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: Verdana; line-height: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: Verdana; line-height: 14px;"&gt;The changelog for this release is at: &lt;a class="postlink" href="http://support.aptana.com/asap/browse/ROR/fixforversion/10153" style="border-bottom: 1px solid rgb(54, 138, 210); color: #105289; margin: 0px; padding: 0px; text-decoration: none;"&gt;http://support.aptana.com/asap/browse/ROR/fixforversion/10153&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: Verdana; line-height: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: Verdana; line-height: 14px;"&gt;This is a bugfix only release.&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #333333; font-family: Verdana; line-height: 14px;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-2348656946937605338?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/2348656946937605338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=2348656946937605338&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2348656946937605338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2348656946937605338'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/02/radrails-112-released.html' title='Announcements : Radrails 1.1.2 Released'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-6660043899151753515</id><published>2009-02-16T21:43:00.005+08:00</published><updated>2009-08-30T17:18:13.809+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Templates'/><category scheme='http://www.blogger.com/atom/ns#' term='Rack'/><category scheme='http://www.blogger.com/atom/ns#' term='Metal'/><category scheme='http://www.blogger.com/atom/ns#' term='Nested Forms'/><category scheme='http://www.blogger.com/atom/ns#' term='Engines'/><category scheme='http://www.blogger.com/atom/ns#' term='DHH'/><category scheme='http://www.blogger.com/atom/ns#' term='2.3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Announcements : Rails 2.3.0 RC1 - Relesed on 1 February 2009</title><content type='html'>&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2 style="color: black; font-size: 18px; font-weight: bold; line-height: 20px; margin: 0px 0px 5px; padding: 0px;"&gt;&lt;span style="font-family: georgia;"&gt;&lt;span style="font-weight: normal; line-height: normal;"&gt;Rails 2.3.0 RC1: Templates, Engines, Rack, Metal, much more! &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 style="color: #990000; font-size: 18px; font-weight: bold; line-height: 20px; margin: 0px 0px 5px; padding: 0px;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;span style="color: #a69e8a; font-weight: normal; line-height: normal;"&gt;Posted by David February 01, 2009 @ 11:40 PM&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;Rails 2.3 is almost ready for release, but this package is so stock full of amazing new stuff that we’re making dutifully sure that everything works right before we call it official.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;So please help us do thorough testing of this release candidate. Lots of the underpinnings changed. Especially the move to Rack. So we need solid testing and will probably have a slightly longer than average release candidate phase to account for that.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;But boy will it be worth it. This is one of the most substantial upgrades to Rails in a very long time. A brief rundown of the top hitters:&lt;/span&gt;&lt;/div&gt;&lt;ul style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;li&gt;&lt;b&gt;Templates&lt;/b&gt;: Allows your new skeleton Rails application to be built your way with your default stack of gems, configs, and more.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Engines&lt;/b&gt;: Share reusable application pieces complete with routes that Just Work, models, view paths, and the works.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Rack&lt;/b&gt;: Rails now runs on Rack which gives you access to all the middleware goodness.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Metal&lt;/b&gt;: Write super fast pieces of optimized logic that routes around Action Controller.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Nested forms&lt;/b&gt;: Deal with complex forms so much easier.&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;And that’s just the tip of the iceberg. We’ve put together a complete guide for &lt;a href="http://guides.rubyonrails.org/2_3_release_notes.html" style="color: #336699; text-decoration: underline;"&gt;the Rails 2.3 release notes&lt;/a&gt; with much more information.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;You can install the release candidate with:&lt;/span&gt;&lt;/div&gt;&lt;code style="font-size: 120%;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;gem install rails --source http://gems.rubyonrails.org&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;Enjoy, report the bugs, and let’s get Rails 2.3 final out the door soon.&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-6660043899151753515?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/6660043899151753515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=6660043899151753515&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/6660043899151753515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/6660043899151753515'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/02/rails-230-rc1-templates-engines-rack.html' title='Announcements : Rails 2.3.0 RC1 - Relesed on 1 February 2009'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-1794945571102932016</id><published>2009-02-16T21:37:00.004+08:00</published><updated>2009-08-30T17:20:15.509+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JRuby'/><category scheme='http://www.blogger.com/atom/ns#' term='Thread Safety'/><category scheme='http://www.blogger.com/atom/ns#' term='DHH'/><category scheme='http://www.blogger.com/atom/ns#' term='Connection Pool'/><category scheme='http://www.blogger.com/atom/ns#' term='Internationalization'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='eTag'/><category scheme='http://www.blogger.com/atom/ns#' term='2.2'/><title type='text'>Announcements : Rails 2.2 is Released on 21 December 2008</title><content type='html'>&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2 style="color: #990000; font-size: 18px; font-weight: bold; line-height: 20px; margin: 0px 0px 5px; padding: 0px;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;Rails 2.2: i18n, HTTP validators, thread safety, JRuby/1.9 compatibility, docs&lt;/span&gt;&lt;/h2&gt;&lt;div class="auth" style="color: #a69e8a; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif; font-size: 14px; margin: 0px 0px 5px;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;Posted by David November 21, 2008 @ 05:22 PM&lt;/span&gt;&lt;/div&gt;&lt;div face="georgia,'Lucida Grande',arial,helvetica,sans-serif" style="color: #333333;"&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;Rails 2.2 is finally done after we cleared the last issues from the release candidate program. This release contains an long list of fixes, improvements, and additions that’ll make everything Rails smoother and better, but we also have a number of star player features to parade this time.&lt;/span&gt;&lt;/div&gt;&lt;div face="georgia,'Lucida Grande',arial,helvetica,sans-serif" style="color: #333333;"&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;b&gt;Internationalization by default&lt;/b&gt;&lt;br /&gt;The most important is that Rails now includes a full-on internationalization framework and that it’s &lt;a href="http://weblog.rubyonrails.org/2008/11/18/new-rails-2-2-i18n-defaults" style="color: #336699; text-decoration: underline;"&gt;pre-wired from start&lt;/a&gt;. The work of the i18n group has been very impressive and it’s great to see that Rails finally ships with a solution in the box that’s both simple and extensible. Great job, guys!&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;b&gt;Stronger etag and last-modified support&lt;/b&gt;&lt;br /&gt;We’ve also added much better support for HTTP validators in the form of etag and last-modified. Making it so much easier to skip expensive procesesing if the client already has the latest stuff. This also makes it even easier to use Rails with &lt;a href="http://tomayko.com/writings/things-caches-do" style="color: #336699; text-decoration: underline;"&gt;gateway proxies&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;b&gt;Thread safety and a connection pool&lt;/b&gt;&lt;br /&gt;Josh Peek has added thread safety to Rails and Nick Sieger from &lt;a href="http://jruby.codehaus.org/" style="color: #336699; text-decoration: underline;"&gt;JRuby&lt;/a&gt; worked on getting Active Record a proper connection pool. So now all elements of Rails are thread safe, which is a big boon for the JRuby guys in particular. For C Ruby, we still need a bunch of dependent libraries to go non-blocking before it’ll make much of a difference, but work on that is forth coming.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;b&gt;Ruby 1.9 and JRuby compatibility&lt;/b&gt;&lt;br /&gt;Jeremy Kemper has been rocking on both Ruby 1.9 and JRuby compatibility. Rails 2.2 is fully compatible with both, but again, there might be supporting libraries and gems that are not. Again, lots of work is going into making everything else fully compatible as well.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;b&gt;Better API docs, great guides&lt;/b&gt;&lt;br /&gt;Finally, the last big push has been with the documentation of Rails. Pratik’s &lt;a href="http://github.com/lifo/docrails/tree/master" style="color: #336699; text-decoration: underline;"&gt;docrails&lt;/a&gt; project has made immense progress. Not only are the &lt;a href="http://api.rubyonrails.org/" style="color: #336699; text-decoration: underline;"&gt;API docs&lt;/a&gt; much improved, but we also have a whole&lt;a href="http://guides.rubyonrails.org/" style="color: #336699; text-decoration: underline;"&gt;new guides section&lt;/a&gt; generated from documentation that now lives with the source. A true community project with lots of contributors. I’m sure both those new and old to Rails will greatly appreciate the strong focus on documentation.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;To read about all these features and more in details, checkout&lt;a href="http://guides.rubyonrails.org/2_2_release_notes.html" style="color: #336699; text-decoration: underline;"&gt;the Rails 2.2 release notes&lt;/a&gt;—another one of those guides from the docrails project.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;b&gt;How to install&lt;/b&gt;&lt;br /&gt;As always, you can install Rails 2.2 through RubyGems. We now require RubyGems 1.3.1, so be sure to update that first: &lt;code style="font-size: 12px;"&gt;gem update --system&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;Then you can install Rails: &lt;code style="font-size: 12px;"&gt;gem install rails&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;If you’re updating an existing application, you can run &lt;code style="font-size: 12px;"&gt;rake rails:update&lt;/code&gt; to get the latest JavaScript files and scripts.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: georgia,'Lucida Grande',arial,helvetica,sans-serif;"&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;From all of us to all of you, we hope you enjoy this release. It’s a true pleasure to see Rails make such big steps forward once again. Dig in, have fun, and we’ll be back with Rails 2.3 with even more before you know it.&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #333333; font-family: georgia;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-1794945571102932016?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/1794945571102932016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=1794945571102932016&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/1794945571102932016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/1794945571102932016'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2009/02/rails-22-is-released.html' title='Announcements : Rails 2.2 is Released on 21 December 2008'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-7597425681769334039</id><published>2007-12-29T12:45:00.003+08:00</published><updated>2009-08-30T17:20:44.990+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mongrel'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLite3'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby 1.8.6'/><category scheme='http://www.blogger.com/atom/ns#' term='Instant Rails'/><category scheme='http://www.blogger.com/atom/ns#' term='2.0.2'/><category scheme='http://www.blogger.com/atom/ns#' term='Rake'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby Gems'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Announcements : Instant Rails 2.0 Released on 28th December 2007</title><content type='html'>Rob Bazinet has announced on 28/12/07 the release of Instant Rails 2.0. This is his first release after taking over the project for Curt Hibbs.&lt;br /&gt;&lt;br /&gt;This release is part of bringing the environment up-to-date, no earth shattering changes but the following is updated:&lt;br /&gt;- Ruby 1.8.6 Patch Level 111 with tons of bug fixes and new updated gems&lt;br /&gt;- Ruby on Rails 2.0.2&lt;br /&gt;- RubyGems 1.0.1&lt;br /&gt;- Rake 0.8.0&lt;br /&gt;- Mongrel 1.1.2&lt;br /&gt;- SQLite3&lt;br /&gt;&lt;br /&gt;Instant Rails 2.0 can be downloaded from RubyForge now&amp;lt;&lt;a href="http://rubyforge.org/frs/?group_id=904" rel="nofollow" target="_blank"&gt;http://rubyforge.org/frs/?group_id=904&lt;/a&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;For the Release Notes, go to &amp;lt;&lt;a href="http://instantrails.rubyforge.org/wiki/wiki.pl?Release_Notes_For_Instant_Rails_2.0" rel="nofollow" target="_blank"&gt;http://instantrails.rubyforge.org/wiki/wiki.pl?Release_Notes_For_Instant_Rails_2.0&lt;/a&gt;&amp;gt;to see all the updates.&lt;br /&gt;&lt;br /&gt;Questions should be submitted to the Instant Rails list &amp;lt;&lt;a href="http://rubyforge.org/mail/?group_id=904" rel="nofollow" target="_blank"&gt;http://rubyforge.org/mail/?group_id=904&lt;/a&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-Rob Bazinet &lt;a href="http://www.accidentaltechnologist.com/" rel="nofollow" target="_blank"&gt;http://www.accidentaltechnologist.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-7597425681769334039?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/7597425681769334039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=7597425681769334039&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/7597425681769334039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/7597425681769334039'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/12/instant-rails-20-released-on-28th.html' title='Announcements : Instant Rails 2.0 Released on 28th December 2007'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-7027191197191642032</id><published>2007-12-19T13:39:00.003+08:00</published><updated>2009-08-30T17:21:26.810+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLite3'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Resource'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Support'/><category scheme='http://www.blogger.com/atom/ns#' term='DHH'/><category scheme='http://www.blogger.com/atom/ns#' term='2.0.2'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Record'/><category scheme='http://www.blogger.com/atom/ns#' term='Action Pack'/><title type='text'>Announcements : Rails 2.0.2 Released  on 17 December 2007</title><content type='html'>&lt;b&gt;Quoted Verbatim from DHH&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now that we have the big Rails 2.0 release out the door, it’s a lot easier to push out smaller updates more frequently. So that’s what we’re going to do. Rails 2.0.2 contains a bunch of smaller fixes to various bugs, no show-stopping action, just further polish. But it also contains a few new defaults.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SQLite3 is the new default database&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Most importantly is SQLite3 as the new database we’ll configure for by default when you run the rails generation command without any specification. This change comes as SQLite3 is simply an easier out of the box experience than MySQL. There’s no fussing with GRANTs and creates, the database is just there. This is especially so under OS X 10.5 Leopard, which ships with SQLite3 and the driver gems preinstalled as part of the development kit.&lt;br /&gt;&lt;br /&gt;If you want to preconfigure your database for MySQL (or any of the other adapters), you simply do “rails -d mysql myapp” and everything is the same as before. But if you’re just playing with a new application or building a smallish internal tool, then I strongly recommend having a look at SQLite3. Thanks to the agnostic db/schema.rb, it’s as easy as changing your config/database.yml to switch from SQLite3 to MySQL (or another database) as soon as your load warrants it.&lt;br /&gt;&lt;br /&gt;Don’t check for template changes in production mode&lt;br /&gt;&lt;br /&gt;New applications will be generated with the following option in their config/environments/production.rb:&lt;br /&gt;&lt;br /&gt;config.action_view.cache_template_loading = trueThis will stop Rails from constantly doing STAT calls to the file system to check if the file has changed. This can make for a lot of I/O activity, especially if you have lots of partials. If you have very fast disks, this may not matter, but if you’re running off slower disks it can make quite a big difference.&lt;br /&gt;&lt;br /&gt;The drawback is that you can no longer just svnup a single template file and see it changed immediately. You’ll have to restart the application servers to make that happen.&lt;br /&gt;&lt;br /&gt;Regardless, we feel that this is the better default in a partial-heavy world, but you’re of course always free to change it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rails 2.0.2 is a drop-in replacement for Rails 2.0&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;To upgrade, just do “gem install rails” (if the gems are still not propagated, use—source http://gems.rubyonrails.org) or use the new rel_2-0-2 tag.&lt;br /&gt;&lt;br /&gt;The rest of the changes are as follows:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Action Pack&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;Added delete_via_redirect and put_via_redirect to integration testing #10497 [philodespotos]&lt;br /&gt;&lt;br /&gt;Allow headers[‘Accept’] to be set by hand when calling xml_http_request #10461 [BMorearty]&lt;br /&gt;&lt;br /&gt;Added OPTIONS to list of default accepted HTTP methods #10449 [holoway]&lt;br /&gt;&lt;br /&gt;Added option to pass proc to ActionController::Base.asset_host for maximum configurability #10521 [chuyeow]. Example:&lt;br /&gt;ActionController::Base.asset_host = Proc.new { source if source.starts_with?(’/images’) “http://images.example.com” else “http://assets.example.com” end }&lt;br /&gt;&lt;br /&gt;Fixed that ActionView#file_exists? would be incorrect if @first_render is set #10569 [dbussink]&lt;br /&gt;&lt;br /&gt;Added that Array#to_param calls to_param on all it’s elements #10473 [brandon]&lt;br /&gt;&lt;br /&gt;Ensure asset cache directories are automatically created. #10337 [Josh Peek, Cheah Chu Yeow]&lt;br /&gt;&lt;br /&gt;render :xml and :json preserve custom content types. #10388 [jmettraux, Cheah Chu Yeow]&lt;br /&gt;&lt;br /&gt;Refactor Action View template handlers. #10437, #10455 [Josh Peek]&lt;br /&gt;&lt;br /&gt;Fix DoubleRenderError message and leave out mention of returning false from filters. Closes #10380 [Frederick Cheung]&lt;br /&gt;&lt;br /&gt;Clean up some cruft around ActionController::Base#head. Closes #10417 [ssoroka]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Active Record&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Ensure optimistic locking handles nil #lock_version values properly. Closes #10510 [rick]&lt;br /&gt;&lt;br /&gt;Make the Fixtures Test::Unit enhancements more supporting for double-loaded test cases. Closes #10379 [brynary]&lt;br /&gt;&lt;br /&gt;Fix that validates_acceptance_of still works for non-existent tables (useful for bootstrapping new databases). Closes #10474 [hasmanyjosh]&lt;br /&gt;&lt;br /&gt;Ensure that the :uniq option for has_many :through associations retains the order. #10463 [remvee]&lt;br /&gt;&lt;br /&gt;Base.exists? doesn’t rescue exceptions to avoid hiding SQL errors. #10458 [Michael Klishin]&lt;br /&gt;&lt;br /&gt;Documentation: Active Record exceptions, destroy_all and delete_all. #10444, #10447 [Michael Klishin]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Active Resource&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Added more specific exceptions for 400, 401, and 403 (all descending from ClientError so existing rescues will work) #10326 [trek]&lt;br /&gt;&lt;br /&gt;Correct empty response handling. #10445 [seangeo]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Active Support&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Ruby 1.9 compatibility. #1689, #10466, #10468 [Cheah Chu Yeow, Pratik Naik, Jeremy Kemper]&lt;br /&gt;&lt;br /&gt;TimeZone#to_s uses UTC rather than GMT. #1689 [Cheah Chu Yeow]&lt;br /&gt;&lt;br /&gt;Refactor of Hash#symbolize_keys! to use Hash#replace. Closes #10420 [ReinH]&lt;br /&gt;&lt;br /&gt;Fix HashWithIndifferentAccess#to_options! so it doesn’t clear the options hash. Closes #10419 [ReinH]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rails&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Changed the default database from mysql to sqlite3, so now running “rails myapp” will have a config/database.yml that’s setup for SQLite3 (which in OS X Leopard is installed by default, so is the gem, so everything Just Works with no database configuration at all). To get a Rails application preconfigured for MySQL, just run “rails -d mysql myapp” [DHH]&lt;br /&gt;&lt;br /&gt;Turned on ActionView::Base.cache_template_loading by default in config/environments/production.rb to prevent file system stat calls for every template loading to see if it changed (this means that you have to restart the application to see template changes in production mode) [DHH]&lt;br /&gt;&lt;br /&gt;Introduce `rake secret` to output a crytographically secure secret key for use with cookie sessions #10363 [revans]&lt;br /&gt;&lt;br /&gt;Fixed that local database creation should consider 127.0.0.1 local #9026 [parcelbrat]&lt;br /&gt;&lt;br /&gt;Fixed that functional tests generated for scaffolds should use fixture calls instead of hard-coded IDs #10435 [boone]&lt;br /&gt;&lt;br /&gt;Added db:migrate:redo and db:migrate:reset for rerunning existing migrations #10431, #10432 [matt]&lt;br /&gt;&lt;br /&gt;RAILS_GEM_VERSION may be double-quoted also. #10443 [James Cox]&lt;br /&gt;&lt;br /&gt;Update rails:freeze:gems to work with RubyGems 0.9.5. [Jeremy Kemper]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-7027191197191642032?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/7027191197191642032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=7027191197191642032&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/7027191197191642032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/7027191197191642032'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/12/rails-202-released-on-17-december-2007.html' title='Announcements : Rails 2.0.2 Released  on 17 December 2007'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-2439010359505053003</id><published>2007-12-09T17:02:00.003+08:00</published><updated>2009-08-30T17:22:06.068+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Active Resource'/><category scheme='http://www.blogger.com/atom/ns#' term='JSON'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Support'/><category scheme='http://www.blogger.com/atom/ns#' term='Action Mailer'/><category scheme='http://www.blogger.com/atom/ns#' term='DHH'/><category scheme='http://www.blogger.com/atom/ns#' term='Debugger'/><category scheme='http://www.blogger.com/atom/ns#' term='2.0.1'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><category scheme='http://www.blogger.com/atom/ns#' term='Action Pack'/><title type='text'>Announcements : Rails 2.0.1 has been released on 7th December 2007</title><content type='html'>As quoted by DHH verbatim, Rails 2.0 is finally finished after about a year in the making. This is a fantastic release that’s absolutely stuffed with great new features, loads of fixes, and an incredible amount of polish. We’ve even taken a fair bit of cruft out to make the whole package more coherent and lean.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What’s new ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Action Pack: Resources&lt;br /&gt;&lt;/b&gt;This is where the bulk of the action for 2.0 has gone. We’ve got a slew of improvements to the RESTful lifestyle. First, we’ve dropped the semicolon for custom methods instead of the regular slash. So /people/1;edit is now /people/1/edit.&lt;br /&gt;&lt;br /&gt;We’ve also added the namespace feature to routing resources that makes it really easy to confine things like admin interfaces:map.namespace(:admin) do admin&lt;br /&gt;admin.resources :products,&lt;br /&gt;:collection =&amp;gt; { :inventory =&amp;gt; :get },&lt;br /&gt;:member =&amp;gt; { :duplicate =&amp;gt; :post },&lt;br /&gt;:has_many =&amp;gt; [ :tags, :images, :variants ]&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Which will give you named routes like inventory_admin_products_url and admin_product_tags_url.&lt;br /&gt;&lt;br /&gt;To keep track of this named routes proliferation, we’ve added the “rake routes” task, which will list all the named routes created by routes.rb.&lt;br /&gt;&lt;br /&gt;We’ve also instigated a new convention that all resource-based controllers will be plural by default. This allows a single resource to be mapped in multiple contexts and still refer to the same controller. Example:&lt;br /&gt;# /avatars/45 =&amp;gt; AvatarsController#show&lt;br /&gt;map.resources :avatars&lt;br /&gt;# /people/5/avatar =&amp;gt; AvatarsController#show&lt;br /&gt;map.resources :people, :has_one =&amp;gt; :avatar&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Action Pack: Multiview&lt;br /&gt;&lt;/b&gt;Alongside the improvements for resources come improvements for multiview.&lt;br /&gt;&lt;br /&gt;We already have #respond_to, but we’ve taken it a step further and made it dig into the templates. We’ve separated the format of the template from its rendering engine.&lt;br /&gt;&lt;br /&gt;So show.rhtml now becomes show.html.erb, which is the template that’ll be rendered by default for a show action that has declared format.html in its respond_to. And you can now have something like show.csv.erb, which targets text/csv, but also uses the default ERB renderer.&lt;br /&gt;&lt;br /&gt;So the new format for templates is action.format.renderer. A few examples:&lt;br /&gt;show.erb: same show template for all formats&lt;br /&gt;index.atom.builder: uses the Builder format, previously known as rxml, to render an index action for the application/atom+xml mime type&lt;br /&gt;edit.iphone.haml: uses the custom HAML template engine (not included by default) to render an edit action for the custom Mime::IPHONE format&lt;br /&gt;&lt;br /&gt;Speaking of the iPhone, we’ve made it easier to declare “fake” types that are only used for internal routing. Like when you want a special HTML interface just for an iPhone. All it takes is something like this:&lt;br /&gt;# should go in config/initializers/mime_types.rb&lt;br /&gt;Mime.register_alias "text/html", :iphone&lt;br /&gt;class ApplicationController &amp;lt; format =" :iphone"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Action Pack: Record identification&lt;br /&gt;&lt;/b&gt;Piggy-backing off the new drive for resources are a number of simplifications for controller and view methods that deal with URLs.&lt;br /&gt;&lt;br /&gt;We’ve added a number of conventions for turning model classes into resource routes on the fly. Examples:&lt;br /&gt;# person is a Person object, which by convention will&lt;br /&gt;# be mapped to person_url for lookup&lt;br /&gt;redirect_to(person)&lt;br /&gt;link_to(person.name, person)&lt;br /&gt;form_for(person)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;b&gt;Action Pack: HTTP Loving&lt;br /&gt;&lt;/b&gt;As you might have gathered, Action Pack in Rails 2.0 is all about getting closer with HTTP and all its glory. Resources, multiple representations, but there’s more.&lt;br /&gt;&lt;br /&gt;We’ve added a new module to work with HTTP Basic Authentication, which turns out to be a great way to do API authentication over SSL. It’s terribly simple to use. Here’s an example (there are more in ActionController::HttpAuthentication):&lt;br /&gt;class PostsController &amp;lt; password = "dhh" except =""&amp;gt; [ :index ]&lt;br /&gt;def index&lt;br /&gt;render :text =&amp;gt; "Everyone can see me!"&lt;br /&gt;end&lt;br /&gt;def edit&lt;br /&gt;render :text =&amp;gt; "I'm only accessible if you know the password"&lt;br /&gt;end&lt;br /&gt;private&lt;br /&gt;&lt;br /&gt;def authenticate&lt;br /&gt;authenticate_or_request_with_http_basic do user_name, password&lt;br /&gt;user_name == USER_NAME &amp;amp;&amp;amp; password == PASSWORD&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;We’ve also made it much easier to structure your JavaScript and stylesheet files in logical units without getting clobbered by the HTTP overhead of requesting a bazillion files. Using javascript_include_tag(:all, :cache =&amp;gt; true) will turn public/javascripts/.js into a single public/javascripts/all.js file in production, while still keeping the files separate in development, so you can work iteratively without clearing the cache.&lt;br /&gt;&lt;br /&gt;Along the same lines, we’ve added the option to cheat browsers who don’t feel like pipelining requests on their own. If you set ActionController::Base.asset_host = “assets%d.example.com”, we’ll automatically distribute your asset calls (like image_tag) to asset1 through asset4. That allows the browser to open many more connections at a time and increases the perceived speed of your application.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Action Pack: Security&lt;br /&gt;&lt;/b&gt;Making it even easier to create secure applications out of the box is always a pleasure and with Rails 2.0 we’re doing it from a number of fronts. Most importantly, we now ship we a built-in mechanism for dealing with CRSF attacks.&lt;br /&gt;&lt;br /&gt;By including a special token in all forms and Ajax requests, you can guard from having requests made from outside of your application. All this is turned on by default in new Rails 2.0 applications and you can very easily turn it on in your existing applications using ActionController::Base.protect_from_forgery (see ActionController::RequestForgeryProtection for more).&lt;br /&gt;&lt;br /&gt;We’ve also made it easier to deal with XSS attacks while still allowing users to embed HTML in your pages. The old TextHelper#sanitize method has gone from a black list (very hard to keep secure) approach to a white list approach. If you’re already using sanitize, you’ll automatically be granted better protection. You can tweak the tags that are allowed by default with sanitize as well. See TextHelper#sanitize for details.&lt;br /&gt;&lt;br /&gt;Finally, we’ve added support for &lt;a href="http://msdn2.microsoft.com/en-us/library/ms533046.aspx"&gt;HTTP only cookies&lt;/a&gt;. They are not yet supported by all browsers, but you can use them where they are.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Action Pack: Exception handling&lt;br /&gt;&lt;/b&gt;Lots of common exceptions would do better to be rescued at a shared level rather than per action. This has always been possible by overwriting rescue_action_in_public, but then you had to roll out your own case statement and call super. Bah. So now we have a class level macro called rescue_from, which you can use to declaratively point certain exceptions to a given action.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;class PostsController &amp;lt; with =""&amp;gt; :deny_access&lt;br /&gt;protected&lt;br /&gt;def deny_access&lt;br /&gt;...&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Action Pack: Cookie store sessions&lt;br /&gt;&lt;/b&gt;The default session store in Rails 2.0 is now a cookie-based one.&lt;br /&gt;&lt;br /&gt;That means sessions are no longer stored on the file system or in the database, but kept by the client in a hashed form that can’t be forged. This makes it not only a lot faster than traditional session stores, but also makes it zero maintenance. There’s no cron job needed to clear out the sessions and your server won’t crash because you forgot and suddenly had 500K files in tmp/session.&lt;br /&gt;&lt;br /&gt;This setup works great if you follow best practices and keep session usage to a minimum, such as the common case of just storing a user_id and a the flash. If, however, you are planning on storing the nuclear launch codes in the session, the default cookie store is a bad deal. While they can’t be forged (so is_admin = true is fine), their content can be seen. If that’s a problem for your application, you can always just switch back to one of the traditional session stores (but first investigate that requirement as a code smell).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Action Pack: New request profiler&lt;br /&gt;&lt;/b&gt;Figuring out where your bottlenecks are with real usage can be tough, but we just made it a whole lot easier with the new request profiler that can follow an entire usage script and report on the aggregate findings. You use it like this:&lt;br /&gt;$ cat login_session.rb&lt;br /&gt;get_with_redirect '/'&lt;br /&gt;say "GET / =&amp;gt; #{path}"&lt;br /&gt;post_with_redirect '/sessions', :username =&amp;gt; 'john', :password =&amp;gt; 'doe'&lt;br /&gt;say "POST /sessions =&amp;gt; #{path}"&lt;br /&gt;$ ./script/performance/request -n 10 login_session.rb&lt;br /&gt;And you get a thorough breakdown in HTML and text on where time was spent and you’ll have a good idea on where to look for speeding up the application.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Action Pack: Miscellaneous&lt;br /&gt;&lt;/b&gt;Also of note is AtomFeedHelper, which makes it even simpler to create Atom feeds using an enhanced Builder syntax. Simple example:&lt;br /&gt;# index.atom.builder:&lt;br /&gt;atom_feed do feed&lt;br /&gt;feed.title("My great blog!")&lt;br /&gt;feed.updated((@posts.first.created_at))&lt;br /&gt;for post in @posts&lt;br /&gt;feed.entry(post) do entry&lt;br /&gt;entry.title(post.title)&lt;br /&gt;entry.content(post.body, :type =&amp;gt; 'html')&lt;br /&gt;entry.author do author&lt;br /&gt;author.name("DHH")&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;We’ve made a number of performance improvements, so asset tag calls are now much cheaper and we’re caching simple named routes, making them much faster too.&lt;br /&gt;&lt;br /&gt;Finally, we’ve kicked out in_place_editor and autocomplete_for into plugins that live on the official Rails SVN.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Active Record: Performance&lt;br /&gt;&lt;/b&gt;Active Record has seen a gazillion fixes and small tweaks, but it’s somewhat light on big new features.&lt;br /&gt;&lt;br /&gt;Something new that we have added, though, is a very simple Query Cache, which will recognize similar SQL calls from within the same request and return the cached result. This is especially nice for N+1 situations that might be hard to handle with :include or other mechanisms. We’ve also drastically improved the performance of fixtures, which makes most test suites based on normal fixture use be 50-100% faster.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Active Record: Sexy migrations&lt;br /&gt;&lt;/b&gt;There’s a new alternative format for declaring migrations in a slightly more efficient format.&lt;br /&gt;&lt;br /&gt;Before you’d write:&lt;br /&gt;create_table :people do t&lt;br /&gt;t.column, "account_id", :integer&lt;br /&gt;t.column, "first_name", :string, :null =&amp;gt; false&lt;br /&gt;t.column, "last_name", :string, :null =&amp;gt; false&lt;br /&gt;t.column, "description", :text&lt;br /&gt;t.column, "created_at", :datetime&lt;br /&gt;t.column, "updated_at", :datetime&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Now you can write:&lt;br /&gt;create_table :people do t&lt;br /&gt;t.integer :account_id&lt;br /&gt;t.string :first_name, :last_name, :null =&amp;gt; false&lt;br /&gt;t.text :description&lt;br /&gt;t.timestamps&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Active Record: Foxy fixtures&lt;br /&gt;&lt;/b&gt;The fixtures in Active Record has taken a fair amount of flak lately. One of the key points in that criticism has been the work with declaring dependencies between fixtures. Having to relate fixtures through the ids of their primary keys is no fun. That’s been addressed now and you can write fixtures like this:&lt;br /&gt;# sellers.yml&lt;br /&gt;shopify:&lt;br /&gt;name: Shopify&lt;br /&gt;# products.yml&lt;br /&gt;pimp_cup:&lt;br /&gt;seller: shopify&lt;br /&gt;name: Pimp cup&lt;br /&gt;&lt;br /&gt;As you can see, it’s no longer necessary to declare the ids of the fixtures and instead of using seller_id to refer to the relationship, you just use seller and the name of the fixture.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Active Record: XML in, JSON out&lt;br /&gt;&lt;/b&gt;Active Record has supported serialization to XML for a while. In 2.0 we’ve added deserialization too, so you can say Person.new.from_xml(“David“) and get what you’d expect. We’ve also added serialization to JSON, which supports the same syntax as XML serialization (including nested associations). Just do person.to_json and you’re ready to roll.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Active Record: Shedding some weight&lt;br /&gt;&lt;/b&gt;To make Active Record a little leaner and meaner, we’ve removed the acts_as_XYZ features and put them into individual plugins on the Rails SVN repository. So say you’re using acts_as_list, you just need to do ./script/plugin install acts_as_list and everything will move along like nothing ever happened.&lt;br /&gt;&lt;br /&gt;A little more drastic, we’ve also pushed all the commercial database adapters into their own gems. So Rails now only ships with adapters for MySQL, SQLite, and PostgreSQL. These are the databases that we have easy and willing access to test on. But that doesn’t mean the commercial databases are left out in the cold. Rather, they’ve now been set free to have an independent release schedule from the main Rails distribution. And that’s probably a good thing as the commercial databases tend to require a lot more exceptions and hoop jumping on a regular basis to work well.&lt;br /&gt;&lt;br /&gt;The commercial database adapters now live in gems that all follow the same naming convention: activerecord-XYZ-adapter. So if you gem install activerecord-oracle-adapter, you’ll instantly have Oracle available as an adapter choice in all the Rails applications on that machine. You won’t have to change a single line in your applications to take use of it.&lt;br /&gt;That also means it’ll be easier for new database adapters to gain traction in the Rails world. As long as you package your adapter according to the published conventions, users just have to install the gem and they’re ready to roll.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Active Record: with_scope with a dash of syntactic vinegar&lt;br /&gt;&lt;/b&gt;ActiveRecord::Base.with_scope has gone protected to discourage people from misusing it in controllers (especially in filters). Instead, it’s now encouraged that you only use it within the model itself. That’s what it was designed for and where it logically remains a good fit. But of course, this is all about encouraging and discouraging. If you’ve weighed the pros and the cons and still want to use with_scope outside of the model, you can always call it through .send(:with_scope).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ActionWebService out, ActiveResource in&lt;br /&gt;&lt;/b&gt;It’ll probably come as no surprise that Rails has picked a side in the SOAP vs REST debate. Unless you absolutely have to use SOAP for integration purposes, we strongly discourage you from doing so. As a naturally extension of that, we’ve pulled ActionWebService from the default bundle. It’s only a gem install actionwebservice away, but it sends an important message none the less.&lt;br /&gt;&lt;br /&gt;At the same time, we’ve pulled the new ActiveResource framework out of beta and into the default bundle. ActiveResource is like ActiveRecord, but for resources. It follows a similar API and is configured to Just Work with Rails applications using the resource-driven approach. For example, a vanilla scaffold will be accessible by ActiveResource.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ActiveSupport&lt;br /&gt;&lt;/b&gt;There’s not all that much new in ActiveSupport. We’ve a host of new methods like Array#rand for getting a random element from an array, Hash#except to filter down a hash from undesired keys and lots of extensions for Date. We also made testing a little nicer with assert_difference. Short of that, it’s pretty much just fixes and tweaks.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Action Mailer&lt;br /&gt;&lt;/b&gt;This is a very modest update for Action Mailer. Besides a handful of bug fixes, we’ve added the option to register alternative template engines and assert_emails to the testing suite, which works like this:&lt;br /&gt;Assert number of emails delivered within a block: assert_emails 1 do post :signup, :name =&amp;gt; ‘Jonathan’ end&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rails: The debugger is back&lt;br /&gt;&lt;/b&gt;To tie it all together, we have a stream of improvements for Rails in general. My favorite amongst these is the return of the breakpoint in form of the debugger. It’s a real debugger too, not just an IRB dump. You can step back and forth, list your current position, and much more. It’s all coming from the gracious note of the ruby-debug gem. So you’ll have to install that for the new debugger to work.&lt;br /&gt;&lt;br /&gt;To use the debugger, you just install the gem, put “debugger” somewhere in your application, and then start the server with—debugger or -u. When the code executes the debugger command, you’ll have it available straight in the terminal running the server. No need for script/breakpointer or anything else. You can use the debugger in your tests too.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rails: Clean up your environment&lt;br /&gt;&lt;/b&gt;Before Rails 2.0, config/environment.rb files every where would be clogged with all sorts of one-off configuration details.&lt;br /&gt;&lt;br /&gt;Now you can gather those elements in self-contained files and put them under config/initializers and they’ll automatically be loaded. New Rails 2.0 applications ship with two examples in form of inflections.rb (for your own pluralization rules) and mime_types.rb (for your own mime types). This should ensure that you need to keep nothing but the default in config/environment.rb.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rails: Easier plugin order&lt;br /&gt;&lt;/b&gt;Now that we’ve yanked out a fair amount of stuff from Rails and into plugins, you might well have other plugins that depend on this functionality. This can require that you load, say, acts_as_list before your own acts_as_extra_cool_list plugin in order for the latter to extend the former.&lt;br /&gt;&lt;br /&gt;Before, this required that you named all your plugins in config.plugins. Major hassle when all you wanted to say was “I only care about acts_as_list being loaded before everything else”. Now you can do exactly that with config.plugins = [ :acts_as_list, :all ].&lt;br /&gt;And hundreds upon hundreds of other improvements&lt;br /&gt;&lt;br /&gt;What I’ve talked about above is but a tiny sliver of the full 2.0 package. We’ve got literally hundreds of bug fixes, tweaks, and feature enhancements crammed into Rails 2.0. All this coming off the work of tons of eager contributors working tirelessly to improve the framework in small, but important ways.&lt;br /&gt;I encourage you to scourger the CHANGELOGs and learn more about all that changed.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;So how do I upgrade?&lt;br /&gt;&lt;/b&gt;If you want to move your application to Rails 2.0, you should first move it to Rails 1.2.6. That’ll include deprecation warnings for most everything we yanked out in 2.0. So if your application runs fine on 1.2.6 with no deprecation warnings, there’s a good chance that it’ll run straight up on 2.0. Of course, if you’re using, say, pagination, you’ll need to install the classic_pagination plugin. If you’re using Oracle, you’ll need to install the activerecord-oracle-adapter gem. And so on and so forth for all the extractions.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;So how do I install?&lt;br /&gt;&lt;/b&gt;To install through gems, do:gem install rails -y&lt;br /&gt;...if you’re having trouble with that (gem not found), just grab gems from our own repository in the meanwhile:gem install rails -y --source &lt;a href="http://gems.rubyonrails.org/"&gt;http://gems.rubyonrails.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To try it from an SVN tag, use (you may need to run this command twice depending on your current Rails version):rake rails:freeze:edge TAG=rel_2-0-1&lt;br /&gt;&lt;br /&gt;Note: It’s 2.0.1 because we found a small issue just after we pushed 2.0.0.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-2439010359505053003?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/2439010359505053003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=2439010359505053003&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2439010359505053003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2439010359505053003'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/12/rails-201-has-been-released-on-7th.html' title='Announcements : Rails 2.0.1 has been released on 7th December 2007'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-3651859900804791399</id><published>2007-11-25T17:40:00.003+08:00</published><updated>2009-08-30T17:22:57.736+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='session fixation attacks'/><category scheme='http://www.blogger.com/atom/ns#' term='1.2.6'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Announcements : Rails 1.2.6: Security and Maintenance Release</title><content type='html'>Ruby on Rails 1.2.6: Security and Maintenance Release has been released on November 24, 2007 by the rails core team to address a bug in the fix for session fixation attacks (CVE-2007-5380). The CVE Identifier for this new issue is CVE-2007-6077.&lt;br /&gt;&lt;br /&gt;You should upgrade to this new release if you do not take specific session-fixation counter measures in your application. 1.2.6 also fixes some regressions when working with has_many associations on unsaved ActiveRecord objects.&lt;br /&gt;&lt;br /&gt;As with other 1.2.x releases, this is intended as a drop in upgrade for users of earlier versions in the 1.2 series.&lt;br /&gt;&lt;br /&gt;To upgrade, `gem install rails`, set RAILS_GEM_VERSION to ‘1.2.6’ in config/environment.rb, and `rake rails:update:configs`.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-3651859900804791399?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/3651859900804791399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=3651859900804791399&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3651859900804791399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3651859900804791399'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/11/rails-126-security-and-maintenance.html' title='Announcements : Rails 1.2.6: Security and Maintenance Release'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-5502264430231850786</id><published>2007-11-18T17:24:00.001+08:00</published><updated>2009-08-30T17:23:51.172+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rails IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='Radrails'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Announcements : Aptana Radrails 0.9.1 Final Release</title><content type='html'>For Radrails users, there is happy news !&lt;br /&gt;&lt;br /&gt;Aptana RadRails 0.9.1 Final Release has been released since 15th November 2007. Users who are still on 0.8.0 are highly recommended to upgrade.&lt;br /&gt;&lt;br /&gt;Here's the Trac changelog: &lt;a class="postlink" href="http://www.aptana.com/trac/milestone/RadRails%20IDE%200.9.1" target="_blank"&gt;http://www.aptana.com/trac/milestone/RadRails%20IDE%200.9.1&lt;/a&gt; And the ASAP one: &lt;a class="postlink" href="http://support.aptana.com/issues/browse/ROR/fixforversion/10004" target="_blank"&gt;http://support.aptana.com/issues/browse/ROR/fixforversion/10004&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-5502264430231850786?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/5502264430231850786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=5502264430231850786&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5502264430231850786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5502264430231850786'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/11/aptana-radrails-091-final-release.html' title='Announcements : Aptana Radrails 0.9.1 Final Release'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-1336329146712498795</id><published>2007-11-10T18:35:00.003+08:00</published><updated>2009-08-30T17:24:36.515+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='DHH'/><category scheme='http://www.blogger.com/atom/ns#' term='Announcements'/><title type='text'>Announcements : Rails 2.0 Release Candidate 1</title><content type='html'>Looks as if Rails 2.0 will be released soon if this post by DHH (creator of Rails) today at the Ruby on Rails : Talk Google Group is any indication :-&lt;br /&gt;&lt;br /&gt;We're almost there. Really this time.&lt;br /&gt;&lt;a href="http://weblog.rubyonrails.org/2007/11/9/rails-2-0-release-candidate-1" rel="nofollow" target="_blank"&gt;http://weblog.rubyonrails.org/2007/11/9/rails-2-0-release-candidate-1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;BTW, the basic advice is to upgrade to 1.2.5 and get rid of all deprecation warnings.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-1336329146712498795?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/1336329146712498795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=1336329146712498795&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/1336329146712498795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/1336329146712498795'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/11/rails-20-release-candidate-1.html' title='Announcements : Rails 2.0 Release Candidate 1'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-5769290633583626138</id><published>2007-11-03T15:12:00.003+08:00</published><updated>2009-08-30T17:28:58.915+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Advanced Rails'/><category scheme='http://www.blogger.com/atom/ns#' term='Radrails'/><title type='text'>Advanced Rails : Testing a Ruby on Rails Application [Updated 30th August 2009]</title><content type='html'>Thanks to DHH and his team, Rails guides you to create a well-tested application by actively generating default test cases and setting up scripts and tools to run 3 different kinds of tests namely, unit testing, functional testing and integration testing.&lt;br /&gt;&lt;br /&gt;For example, when you use script/generate to create your models and controllers, Rails also generates skeletal test files for you to flesh out with tests for your apps.&lt;br /&gt;&lt;br /&gt;1) Unit Testing deals with tests on models.&lt;br /&gt;2) Controllers are tested via Functional Testing&lt;br /&gt;3) Integration Testing focuses on the testing of the interation between controllers&lt;br /&gt;&lt;br /&gt;Rails has a number of features that make it easy to test your application. In particular, Rails uses a separate runtime database dedicated to testing and can automatically populate the test database with fresh sample data (that you provide) before each test.&lt;br /&gt;&lt;br /&gt;This is how you execute the tests :-&lt;br /&gt;&lt;br /&gt;a) Test all units and functionals&lt;br /&gt;rake test&lt;br /&gt;&lt;br /&gt;b) Run tests for functionals&lt;br /&gt;rake test:functionals&lt;br /&gt;&lt;br /&gt;c) Run tests for integration&lt;br /&gt;rake test:integration&lt;br /&gt;&lt;br /&gt;d) Run tests for units&lt;br /&gt;rake test:units&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Testing within Aptana RadRails &lt;/b&gt;&lt;br /&gt;1) Select the Rails Project that is to be tested&lt;br /&gt;2) Click the Tests Icon on the ToolBar Nb. Y0u have a choice to select All Tests, Unit Tests, Functional Tests and Integration Tests&lt;br /&gt;3) If you select Unit Tests, you should see a dialog window showing progress with an option to run in the background.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5128538367041583746" src="http://bp0.blogger.com/_8Fmgkr0dcSo/Ryw6eQB5uoI/AAAAAAAAADc/54xyIgrvGCI/s320/unittestprogress.JPG" style="display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;br /&gt;4) On competion of the test, you should see the following result :-&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5128532208058481250" src="http://bp2.blogger.com/_8Fmgkr0dcSo/Ryw03wB5umI/AAAAAAAAADM/ITmqOARyyPI/s320/unittest.JPG" style="display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;br /&gt;&lt;b&gt;Available assertions for rake test:units&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;assert_kind_of Class, @var # same class&lt;br /&gt;assert @var # not nil&lt;br /&gt;assert_equal 1, @p.id # equality&lt;br /&gt;&lt;br /&gt;@product.destroy&lt;br /&gt;assert_raise(ActiveRecord::RecordNotFound) { Customer.find( @customer.id ) }&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Available assertions for rake test:functional&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;a) Requests&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;get :action # a get request of the specificed action&lt;br /&gt;&lt;br /&gt;get :action, :id =&amp;gt; 1,&lt;br /&gt;{ session_hash }, # optional session variables&lt;br /&gt;{ flash_hash } # optional messages in the flash&lt;br /&gt;post :action, :foo =&amp;gt; { :value1 =&amp;gt; 'abc', :value2 =&amp;gt; '123' },&lt;br /&gt;{ :user_id =&amp;gt; 17 },&lt;br /&gt;{ :message =&amp;gt; 'success' }&lt;br /&gt;get, post, put, delete, head&lt;br /&gt;assert_response :success&lt;br /&gt;&lt;br /&gt;# possible parameters are:&lt;br /&gt;# :success&lt;br /&gt;# :redirect&lt;br /&gt;# :missing&lt;br /&gt;# :error&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;b) Redirects&lt;/b&gt;&lt;br /&gt;assert_redirected_to :action =&amp;gt; :other_action&lt;br /&gt;assert_redirected_to :controller =&amp;gt; 'foo', :action =&amp;gt; 'bar'&lt;br /&gt;assert_redirected_to &lt;a href="http://crm4web.com.my/"&gt;http://crm4web.com.my/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;c) Rendered with Template&lt;/b&gt;&lt;br /&gt;assert_template "post/index"&lt;br /&gt;&lt;br /&gt;&lt;b&gt;d) Variable Assignments&lt;/b&gt;&lt;br /&gt;assert_nil assigns(:some_variable)&lt;br /&gt;assert_not_nil assigns(:some_variable)&lt;br /&gt;assert_equal 11, assigns(:posts).size&lt;br /&gt;&lt;br /&gt;&lt;b&gt;e) Rendering of Specific Tags&lt;/b&gt;&lt;br /&gt;assert_tag :tag =&amp;gt; 'body'&lt;br /&gt;assert_tag :content =&amp;gt; 'Rails Plugins'&lt;br /&gt;assert_tag :tag =&amp;gt; 'div', :attributes =&amp;gt; { :class =&amp;gt; 'index_list' }&lt;br /&gt;assert_tag :tag =&amp;gt; 'head', :parent =&amp;gt; { :tag =&amp;gt; 'body' }&lt;br /&gt;assert_tag :tag =&amp;gt; 'html', :child =&amp;gt; { :tag =&amp;gt; 'head' }&lt;br /&gt;assert_tag :tag =&amp;gt; 'body', :descendant =&amp;gt; { :tag =&amp;gt; 'div' }&lt;br /&gt;assert_tag :tag =&amp;gt; 'ul',&lt;br /&gt;:children =&amp;gt; { :count =&amp;gt; 1..3,&lt;br /&gt;:only =&amp;gt; { :tag =&amp;gt; 'li' } }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More to come...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-5769290633583626138?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/5769290633583626138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=5769290633583626138&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5769290633583626138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/5769290633583626138'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/11/testng-ruby-on-rails-applications.html' title='Advanced Rails : Testing a Ruby on Rails Application [Updated 30th August 2009]'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_8Fmgkr0dcSo/Ryw6eQB5uoI/AAAAAAAAADc/54xyIgrvGCI/s72-c/unittestprogress.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-3630334358044330236</id><published>2007-10-31T21:40:00.002+08:00</published><updated>2009-08-30T17:05:53.491+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Basics'/><category scheme='http://www.blogger.com/atom/ns#' term='Helpers'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>Rails Basics : Useful Helpers</title><content type='html'>In developing the e-CRM, I have found the following helper methods very useful :-&lt;br /&gt;&lt;br /&gt;&lt;b&gt;a) Hardcoded select list&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;def severity_form_column (record, name)&lt;br /&gt;select_tag name, options_for_select(%w(Show-stopper Severe Nice-to-have Customisation Trivial), record.severity)&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;b&gt;b) TextArea for edit/create&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;def blog_form_column(record, input_name) text_area_tag('record[blog]', @record.blog, :size=&amp;gt;"80x30")&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;b&gt;c) checkbox for edit/create&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;def active_form_column(record, input_name)&lt;br /&gt;check_box :record, :active, :name =&amp;gt; input_name&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;b&gt;e) checkbox for list&lt;br /&gt;&lt;/b&gt;def active_column(record)&lt;br /&gt;check_box_tag 'active', 1, record.active?, { :disabled =&amp;gt; true }&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;b&gt;f) date display for list&lt;br /&gt;&lt;/b&gt;def bill_date_column(record)&lt;br /&gt;if record.bill_date.nil?&lt;br /&gt;record.bill_date= '-' #''&amp;amp;nbsp'&lt;br /&gt;else&lt;br /&gt;record.bill_date.strftime("%d/%m/%y")&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;b&gt;g) Customising Rails date format&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;def mydate_form_column(record, input_name)&lt;br /&gt;date_select(:record, :mydate :order =&amp;gt;&lt;br /&gt;[:day, :month, :year], :start_year =&amp;gt; 1970, :end_year =&amp;gt; 2000)&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;b&gt;h) Controlling Text Field Size&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;def name_form_column(record, input_name)&lt;br /&gt;text_field_tag('record[name]', @record.name, { :autocomplete =&amp;gt; "off", :size =&amp;gt; 40, :class =&amp;gt; 'text-input'})&lt;br /&gt;end&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-3630334358044330236?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/3630334358044330236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=3630334358044330236&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3630334358044330236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3630334358044330236'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/useful-helpers.html' title='Rails Basics : Useful Helpers'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-4344373658299252971</id><published>2007-10-28T09:51:00.005+08:00</published><updated>2009-11-20T11:18:39.781+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mongrel'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Advanced Rails'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>Advanced Rails : Why you should not use Global Variables ! [Updated 12th Sept 2009]</title><content type='html'>&lt;b&gt;What are global variables in Ruby ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;A global variable has a name beginning with $. It can be referred to from anywhere in a program. Before initialization, a global variable has the special value nil.&lt;br /&gt;&lt;br /&gt;Global variables should be used sparingly. They are dangerous because they can be written to from anywhere. Overuse of globals can make isolating bugs difficult; it also tends to indicate that the design of a program has not been carefully thought out. Whenever you do find it necessary to use a global variable, be sure to give it a descriptive name that is unlikely to be inadvertently used for something else later (calling it something like $foo as above is probably a bad idea).&lt;br /&gt;&lt;br /&gt;When a global variable has been rigged to work as a trigger to invoke a procedure whenever changed, we sometimes call it an active variable. For instance, it is useful for keeping a GUI display up to date.&lt;br /&gt;&lt;br /&gt;There is a collection of special variables whose names consist of a dollar sign ($) followed by a single character. For example, $$ contains the process id of the ruby interpreter, and is read-only. Here are the major system variables and their meanings (see the ruby reference manual for details):&lt;br /&gt;&lt;br /&gt;$! latest error message&lt;br /&gt;$@ location of error&lt;br /&gt;$_ string last read by gets&lt;br /&gt;$. line number last read by interpreter&lt;br /&gt;$&amp;amp; string last matched by regexp&lt;br /&gt;$~ the last regexp match, as an array of subexpressions&lt;br /&gt;$n the nth subexpression in the last match (same as $~[n])&lt;br /&gt;$= case-insensitivity flag&lt;br /&gt;$/ input record separator&lt;br /&gt;$\ output record separator&lt;br /&gt;$0 the name of the ruby script file&lt;br /&gt;$* the command line arguments&lt;br /&gt;$$ interpreter's process ID&lt;br /&gt;$? exit status of last executed child process&lt;br /&gt;&lt;br /&gt;In the above, $_ and $~ have local scope. Their names suggest they should be global, but they are much more useful this way, and there are historical reasons for using these names.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Why you should not not use Global Variables&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Let us assume that on login (say using Acts As Authenticated), you may be tempted to initialise say $is_admin = current_user.isadmin and then use $is_admin to control access to modules or whatever. This will work very nicely in development mode or even production mode under say Apache 2.x + 1 mongrel process.&lt;br /&gt;&lt;br /&gt;However, once you use Apache 2.2x + a pack of mongrel processes, your security measure will fail miserably ! Why ?&lt;br /&gt;&lt;br /&gt;Prior to using Apache+a pack of mongrels, I was succesfully using a home-made role-based authentication in conjunction with AAA.&lt;br /&gt;&lt;br /&gt;What I did basically was to add roles in users (AAA table) via adding fields (such as is_admin, is_marketing, is_finance etc). The result is that a user can can have one or many roles.&lt;br /&gt;With this concept, I could control access to modules using layouts and within each controller or model I can control access to specific actions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Control access to specific actions via controller. &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;EXAMPLE in customers_controller.rb&lt;br /&gt;layout 'customers'&lt;br /&gt;active_scaffold :customer do config&lt;br /&gt;&lt;br /&gt;if User.current_user.is_admin&lt;br /&gt;config.nested.add_link("Receivables", [:receivables])&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Control access to specific actions via model &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;has_many :receivables&lt;br /&gt;&lt;br /&gt;def authorized_for_update?&lt;br /&gt;current_user.is_finance&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;def authorized_for_destroy?&lt;br /&gt;current_user.is_admin&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using 1-3 works perfectly on Apache+1 mongrel on a Windows 2003. But once I activate Apache + 2 or mongrels, the whole security system got thrashed !&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Response from Jan (Mongrel FAQ)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Globals are not shared across different instance of mongrel. To have a global appear in all instances you need some form of permanent storage (filesystem or database). If it doesn't need to change over the lifetime of the program you can pass in the global at startup in an environment variable.&lt;br /&gt;&lt;br /&gt;You would not want to use a global in this case, since it needs to change after start up and the other mogrels would not be aware of the change. Use permanent storage. File system, database, or perhaps even a cookie&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;b&gt;Response from Luis (author of mongrel windows service)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;i&gt;As Jan pointed, global variables aren't shared across processes.&lt;br /&gt;You need rely your authorization schema in something else instead a global variable, since 2 users could hit the same mongrel instance and both get great as admin.&lt;br /&gt;You need to investigate further about authorization schemas and how session is handled (and could be used for your purpose).&lt;br /&gt;&lt;br /&gt;First you need to move your session storage to ActiveRecord or cookie based (in case of 1.2.5 or edge). Then I suggest you take a look at the following plugins for Authentication:&lt;br /&gt;&lt;br /&gt;RESTful Authentication:&lt;br /&gt;&lt;/i&gt;&lt;a href="http://railsify.com/plugins/3-restful-authentication"&gt;&lt;i&gt;http://railsify.com/plugins/3-restful-authentication&lt;/i&gt;&lt;/a&gt;&lt;i&gt;&lt;br /&gt;&lt;br /&gt;Acts as Authenticated: &lt;/i&gt;&lt;a href="http://technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated"&gt;&lt;i&gt;http://technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated&lt;/i&gt;&lt;/a&gt;&lt;i&gt;&lt;br /&gt;&lt;br /&gt;Later you will need some role management (to handle is_admin?) Take a look at the suggestion and the "Elsewhere" part from the Acts as Authenticated stikipad page.&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;My solution was to use the role_requirement plugin by Tim Harper.&lt;br /&gt;&lt;br /&gt;This &lt;a href="http://www.randomsequence.com/articles/site-wide-global-variables-in-ruby-on-rails/"&gt;link &lt;/a&gt;is also relevant to our discussion here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-4344373658299252971?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/4344373658299252971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=4344373658299252971&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/4344373658299252971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/4344373658299252971'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/why-you-should-not-use-global-variables.html' title='Advanced Rails : Why you should not use Global Variables ! [Updated 12th Sept 2009]'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-8989312536992471200</id><published>2007-10-27T11:41:00.002+08:00</published><updated>2009-08-30T16:46:31.943+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Validations'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Basics'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Record'/><title type='text'>Rails Basics : All about Validations</title><content type='html'>Irrespective of languages, frameworks and platforms, one cannot run away from providing validations to data input. How does Ruby on Rails do it ?&lt;br /&gt;&lt;br /&gt;To be precise, Active Record, an integral part of RoR, provides validation support as follows :-&lt;br /&gt;&lt;br /&gt;a) validates_acceptance_of(attribute, :message =&amp;gt; "message", :accept =&amp;gt; "1")&lt;br /&gt;b) validates_confirmation_of(attribute, :message =&amp;gt; "message")&lt;br /&gt;&lt;br /&gt;c) validates_exclusion_of(attribute, :in =&amp;gt; enumerable_object, :message =&amp;gt; "message")&lt;br /&gt;d) validates_inclusion_of(attribute, :in =&amp;gt; enumerable_object, :message =&amp;gt; "message")&lt;br /&gt;&lt;br /&gt;e) validates_length_of(attribute, :maximum =&amp;gt; max, :allow_nil =&amp;gt; true, :message =&amp;gt; "message")&lt;br /&gt;&lt;br /&gt;f) validates_length_of(attribute, :minimum =&amp;gt; min, :message =&amp;gt; "message")&lt;br /&gt;g) validates_length_of(attribute, :in =&amp;gt; range, :message =&amp;gt; "message")&lt;br /&gt;&lt;br /&gt;h) validates_numericality_of(value, :message =&amp;gt; "message")&lt;br /&gt;&lt;br /&gt;i) validates_presence_of(attributes, :message =&amp;gt; "message")&lt;br /&gt;&lt;br /&gt;j) validates_size_of(attribute, :maximum =&amp;gt; max, :message =&amp;gt; "message")&lt;br /&gt;k) validates_size_of(attribute, :minimum =&amp;gt; min, :message =&amp;gt; "message")&lt;br /&gt;l) validates_size_of(attribute, :in =&amp;gt; range, :message =&amp;gt; "message")&lt;br /&gt;&lt;br /&gt;m) validates_uniqueness_of(attributes, :message =&amp;gt; "message", :scope =&amp;gt; "condition")&lt;br /&gt;n) validates_uniqueness_of(attributes, :message =&amp;gt; "message", :scope =&amp;gt; "condition")&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-8989312536992471200?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/8989312536992471200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=8989312536992471200&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8989312536992471200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8989312536992471200'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/all-about-validations.html' title='Rails Basics : All about Validations'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-3048065268297697217</id><published>2007-10-20T11:04:00.003+08:00</published><updated>2009-09-08T15:34:39.669+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Basics'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Books'/><category scheme='http://www.blogger.com/atom/ns#' term='Resources'/><title type='text'>Rails Basics : I am a newbie, what should I read ?</title><content type='html'>Just like thousands of experienced programmers who have flocked to Ruby after seeing the incredible demo on how easy it was to create a Ruby on Rails Applications, I started on RoR and after a short while, I hit a road block :-(&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What did I do next ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Consistent with I did when I started by programming career via Clipper, I went to my favourite bookshop and bought all the Rails and Ruby Books available.&lt;br /&gt;&lt;br /&gt;What I bought include :-&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt; Dummies Guide to Ruby and Rails&lt;/li&gt;&lt;li&gt; Rails Cookbook&lt;/li&gt;&lt;li&gt; Ruby Cookbook&lt;/li&gt;&lt;li&gt; Rails Solution&lt;/li&gt;&lt;li&gt; Agile Web Development with Rails&lt;/li&gt;&lt;li&gt; Ruby on Rails : Up and Running&lt;/li&gt;&lt;li&gt; Rails Recipes&lt;/li&gt;&lt;li&gt; The Ruby Way : 2nd Edition&lt;/li&gt;&lt;li&gt; Active Record&lt;/li&gt;&lt;/ol&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Updated on 30th August 2009&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Programming Ruby&lt;br /&gt;&amp;nbsp; &amp;nbsp; The Rails Way &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rails Space&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rails for .NET Developers (August, 2009)&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-3048065268297697217?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/3048065268297697217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=3048065268297697217&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3048065268297697217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3048065268297697217'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/i-am-newbie-what-should-i-read.html' title='Rails Basics : I am a newbie, what should I read ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-2016878542327716089</id><published>2007-10-13T17:18:00.002+08:00</published><updated>2009-08-30T17:44:28.832+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='1.2.3'/><category scheme='http://www.blogger.com/atom/ns#' term='Migration'/><category scheme='http://www.blogger.com/atom/ns#' term='1.2.5'/><title type='text'>Migration : Upgrading Rails from 1.2.3 to 1.2.5</title><content type='html'>Being adventurous having my first Rails appplication in production since August 2007, I read about the impending Rails 2.0 release. As I understand it, there was to be a 1.2.4 release and it was supposed to be mostly made up of security fixes and deprecation notices that will help you prepare for Rails 2.0.&lt;br /&gt;&lt;br /&gt;Being cautious, I froze Rails 1.2.3 into the Vendor Directory using rake:freeze:gems.&lt;br /&gt;&lt;br /&gt;Then I gem install rails --include-dependencies&lt;br /&gt;&lt;br /&gt;Surprise...Surprise, the update is to Rails 1.2.5 !&lt;br /&gt;&lt;br /&gt;D:\Aptana_Workspace\crm4web&amp;gt;gem install rails --include-dependencies&lt;br /&gt;Need to update 22 gems from http://gems.rubyforge.org&lt;br /&gt;......................&lt;br /&gt;complete&lt;br /&gt;Successfully installed rails-1.2.5&lt;br /&gt;Successfully installed activesupport-1.4.4&lt;br /&gt;Successfully installed activerecord-1.15.5&lt;br /&gt;Successfully installed actionpack-1.13.5&lt;br /&gt;Successfully installed actionmailer-1.3.5&lt;br /&gt;Successfully installed actionwebservice-1.2.5&lt;br /&gt;Installing ri documentation for activesupport-1.4.4...&lt;br /&gt;Installing ri documentation for activerecord-1.15.5...&lt;br /&gt;Installing ri documentation for actionpack-1.13.5...&lt;br /&gt;Installing ri documentation for actionmailer-1.3.5...&lt;br /&gt;Installing ri documentation for actionwebservice-1.2.5...&lt;br /&gt;Installing RDoc documentation for activesupport-1.4.4...&lt;br /&gt;Installing RDoc documentation for activerecord-1.15.5...&lt;br /&gt;Installing RDoc documentation for actionpack-1.13.5...&lt;br /&gt;Installing RDoc documentation for actionmailer-1.3.5...&lt;br /&gt;Installing RDoc documentation for actionwebservice-1.2.5...&lt;br /&gt;&lt;br /&gt;Result :&lt;br /&gt;Tested on a blank project (Radrails+Windows 2003 server) created using Rails 1.2.3&lt;br /&gt;Can display the Std index.htm but on clicking the "About Your Application's Environment", the following error message was shown&lt;br /&gt;&lt;br /&gt;"Routing Error, no route found to match /rails/info/properties with (:method :Get)&lt;br /&gt;&lt;br /&gt;I then created a new project under Rails 1.25 and on clicking the "About Your Application's Environment"&lt;br /&gt;&lt;br /&gt;About your application’s environment&lt;br /&gt;Ruby version 1.8.6 (i386-mswin32)&lt;br /&gt;RubyGems version 0.9.2&lt;br /&gt;Rails version 1.2.5&lt;br /&gt;Active Record version 1.15.5&lt;br /&gt;Action Pack version 1.13.5&lt;br /&gt;Action Web Service version 1.2.5&lt;br /&gt;Action Mailer version 1.3.5&lt;br /&gt;Active Support version 1.4.4&lt;br /&gt;Application root D:/Aptana_Workspace/test-125&lt;br /&gt;Environment development&lt;br /&gt;Database adapter mysql&lt;br /&gt;&lt;br /&gt;Worried about the impact on my Production Apps, I committed to SVN, unfroze and ran the app under Rails 1.2.5 and voila no problems :-)&lt;br /&gt;&lt;br /&gt;BTW, I was just just informed of this link :-&lt;br /&gt;http://weblog.rubyonrails.org/2007/10/12/rails-1-2-5-maintenance-release&lt;br /&gt;&lt;br /&gt;which recommends as follows :-&lt;br /&gt;&lt;br /&gt;To upgrade, `&lt;br /&gt;gem install rails`,&lt;br /&gt;set RAILS_GEM_VERSION to ‘1.2.5’ in config/environment.rb, and&lt;br /&gt;`rake rails:update:configs`.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Updated on 18th October 2007&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;An example of a deprecation woud be&lt;br /&gt;record_type =&amp;gt; record.type.name&lt;br /&gt;&lt;br /&gt;which will genenerate a&lt;br /&gt;warning: Object#type is deprecated; use Object#class&lt;br /&gt;&lt;br /&gt;Solution : record_type =&amp;gt; record.&lt;b&gt;class&lt;/b&gt;.name&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-2016878542327716089?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/2016878542327716089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=2016878542327716089&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2016878542327716089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2016878542327716089'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/upgrading-rails-from-123.html' title='Migration : Upgrading Rails from 1.2.3 to 1.2.5'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-13306604048561066</id><published>2007-10-11T17:40:00.003+08:00</published><updated>2009-08-30T17:35:43.002+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Advanced Rails'/><category scheme='http://www.blogger.com/atom/ns#' term='Migration'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='Radrails'/><title type='text'>Advanced Rails : Moving an Existing Database to a Rails Application</title><content type='html'>&lt;div align="center"&gt;&lt;a href="http://bp2.blogger.com/_8Fmgkr0dcSo/Ry05IgB5usI/AAAAAAAAAD8/rm30RSWoPGs/s1600-h/afterschemadump.JPG"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left"&gt;Assuming that you have an existing application that you wish to rewrite in Rails, how would you prepare your database schema so that you can take advantage of the magick of db:migrate ?&lt;br /&gt;&lt;br /&gt;Well, I had to do exactly that when I decided to rewrite an existing 200+tables CRM solution into e-CRM, a Rails application. This is what I did :-&lt;br /&gt;&lt;br /&gt;a) Pluralize all the table names&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Tip:&lt;/b&gt; One legacy table was named customer. To pluralize it to customers whilst retaing the data, I use CREATE TABLE customers SELECT * FROM customer for MySQL&lt;br /&gt;&lt;br /&gt;b) Add an id field (auto-increment, integer) to every table&lt;br /&gt;&lt;br /&gt;c) Add created_at, updated_at in every table to take advantage of Rails automatic updating of these fields without a single line of code&lt;br /&gt;&lt;br /&gt;d) Added another magic column ie lock_version (must default to 0) to invoke optimistic locking&lt;br /&gt;&lt;br /&gt;e) To support a belongs_to relationship, add belongs_to_tablename&lt;br /&gt;&lt;br /&gt;f) Create a schema_info table with just 1 field ie Version, Integer and add a single record with the value=1&lt;br /&gt;&lt;br /&gt;g) Use Rake db:schema:dump to create a schema.rb based on the underlying database schema . See following snapshot of Radrails in action&lt;/div&gt;&lt;div align="center"&gt;&lt;a href="http://bp2.blogger.com/_8Fmgkr0dcSo/Ry05IgB5usI/AAAAAAAAAD8/rm30RSWoPGs/s1600-h/afterschemadump.JPG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5128818368844511938" src="http://bp2.blogger.com/_8Fmgkr0dcSo/Ry05IgB5usI/AAAAAAAAAD8/rm30RSWoPGs/s320/afterschemadump.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;h) Create an empty migration file say 001_migrate2mysql and copy the contents to the Self.Up Method as shown in the Radrails snapshot as follows :-&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5128818729621764818" src="http://bp2.blogger.com/_8Fmgkr0dcSo/Ry05dgB5utI/AAAAAAAAAEE/y6h2I2S52xM/s320/AfterPasting2Migration.JPG" style="display: block; margin: 0px auto 10px; text-align: center;" /&gt; That's it ! &lt;br /&gt;Updated on 4th November, 2007.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-13306604048561066?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/13306604048561066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=13306604048561066&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/13306604048561066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/13306604048561066'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/moving-existing-database-to-ror.html' title='Advanced Rails : Moving an Existing Database to a Rails Application'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_8Fmgkr0dcSo/Ry05IgB5usI/AAAAAAAAAD8/rm30RSWoPGs/s72-c/afterschemadump.JPG' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-3410489989654125402</id><published>2007-10-07T11:50:00.001+08:00</published><updated>2009-08-29T19:11:48.994+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Scaffold'/><title type='text'>Active Scaffold : Roll your own form_ui ?</title><content type='html'>In the trunk version or the soon-to-be released 1.1 release, we can configure columns, on a per controller basis, such as :select, :calendar, :textarea and :checkbox but what about :text_input ?&lt;br /&gt;&lt;br /&gt;Previously, to control the width of a given text-input column, I had to put in the helper something like this either in application.rb or controller_helper.rb&lt;br /&gt;&lt;br /&gt;def faq_form_column(record, input_name) &lt;br /&gt;text_field_tag('record[faq]', @record.faq, { :autocomplete =&amp;gt; "off", :size =&amp;gt; 60, :class =&amp;gt; 'text-input'})&lt;br /&gt;end &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, I can do this :-&lt;br /&gt;&lt;br /&gt;config.columns[:biz_name].options = { :autocomplete =&amp;gt; "off", :size =&amp;gt; 30, :class =&amp;gt; 'text-input'}&lt;br /&gt;&lt;br /&gt;config.columns[:biz_name].form_ui = :tex-input   &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How is this done ? Simple, just add this method once in applcation_helper.rb&lt;br /&gt;&lt;br /&gt;def active_scaffold_input_tex-input(column, options)&lt;br /&gt;text_field :record, column.name, options&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Yes, you can roll your own form.ui :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-3410489989654125402?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/3410489989654125402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=3410489989654125402&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3410489989654125402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/3410489989654125402'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/active-scaffold-roll-your-own-formui.html' title='Active Scaffold : Roll your own form_ui ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-1754827942868582298</id><published>2007-10-06T17:10:00.003+08:00</published><updated>2009-08-30T17:29:33.867+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rails IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='3rdRail'/><category scheme='http://www.blogger.com/atom/ns#' term='subclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Radrails'/><title type='text'>Rails IDE: I can't imagine why some people keep promoting Aptana</title><content type='html'>In a post on borland.public.3rdrail.ide, Joe McGlyn, Product Development Manager at CodeGear made this comment in response to one of my post.&lt;br /&gt;&lt;br /&gt;Joe :&lt;br /&gt;I've spent the past few days trying to use RadRails (the newest M7 from &amp;gt; Aptana). I'm certainly strongly biased toward 3rdRail&lt;br /&gt;&lt;br /&gt;CCH: This is to be expected, no worries :-)&amp;gt;&lt;br /&gt;&lt;br /&gt;Joe:&lt;br /&gt;but I'm reasonably objective too. If someone points out a bug or &amp;gt;shortcoming in 3rdRail that is valid I'm inclined to agree. Example: Diego's questions about our debugger -- it's weak. Got it, we'll have something that will rock in our December update.&lt;br /&gt;&lt;br /&gt;CCH: I have noticed that in your response to my posts. That's why I respect you.&lt;br /&gt;&lt;br /&gt;Joe : I can't imagine why some people keep promoting Aptana.&lt;br /&gt;&lt;br /&gt;CCH: I think they promote RdRails rather than AptanaBTW, I will start to compile from the various posts why they do that ...and post it on my Rails Blog.&lt;br /&gt;&lt;br /&gt;Joe : First, code completion: Method completion fails with a null pointer exception EVERYWHERE. I created a new project, re-installed the IDE, made sure the paths to the Ruby interp. and Rails + Rake commands were set right and it still fails everywhere. I've tried simple cases like "self." in controllers and actions, and modelname. in views, they all fail.&lt;br /&gt;&lt;br /&gt;CCH:Just type self.+ctrl+space and a list was displayed (with no errors)Please do not be offended but did you install properly. There is an article on my blog "Rails...Rails...Rails"at &lt;a href="http://cch4rails.blogspot.com/"&gt;http://cch4rails.blogspot.com/&lt;/a&gt; which went live only yesterday and yes 3rdRail is also promoted.&lt;br /&gt;&lt;br /&gt;Joe: The usage model is weak. Having to go to a combo box on a tabbed pane is lame. Having separate panes for installing a plugin&lt;br /&gt;&lt;br /&gt;CCH: I agree on the inflexibility of installing plugins from unregistered sources vs. running a rake taskcch: I like the Rake Tasks Tab as I find it very convenientvs. running a generator is really week.&lt;br /&gt;&lt;br /&gt;CCH: I prefer 3rdRail's Model wizard but the generate tab does have a destroy option which can roll back a controller/model which was requested in the 3rdRail FieldTest but I am not sure whether this has been implemented&lt;br /&gt;&lt;br /&gt;Joe : It's a poor usage model, way less effective than working from the OS command line. There also isn't a keystroke to get to these magic views so everything is mouse-based.&lt;br /&gt;&lt;br /&gt;CCH: This has not bothered me at all :-)&amp;gt;&lt;br /&gt;&lt;br /&gt;Joe :Never mind that the "generator" combo box is buggy (after a bit of usage it's empty and I have to re-start)&lt;br /&gt;&lt;br /&gt;CCH: I also find this mildly annoying but you do not have to restart, just click the Refresh icon on the top LH corner of the Generator Tab&lt;br /&gt;&lt;br /&gt;Joe : The "gem manager" doesn't have any way I can find to install a plugin (install is always greyed out). I can't install a gem from a specific URL or svn tag (so, for example, it's useless for getting the Rails 2.0 &amp;gt; preview release) I can't add additional repositories to install gems from. Like most of the UI it ends up being a lot less useful than the command line.&lt;br /&gt;&lt;br /&gt;CCH: I have just done that whilst installing the ibRuby Gem :-)See my latest article on Interbase at "Rails...Rails..Rails"&lt;br /&gt;&lt;br /&gt;Joe : At first glance the debugger seems promising, and they have a list of refactorings, although most don't look that useful for Rails development.&lt;br /&gt;&lt;br /&gt;Based on my research on comments made in popular RoR-related groups, this why some people keep promoting Aptana radrails&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1) Tim Harper (Project Member : Active Scaffold) , 30th Sept 2007 &lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Lemme chime in here and say I love aptana radrails.&lt;br /&gt;&lt;br /&gt;I tried 3rdRail, and it felt "clunky". The code complete is excellent in it, but it's also pretty slow.&lt;br /&gt;&lt;br /&gt;Aptana's code complete, go to declaration, combined with eclipse's textual complete are great enough for me.&lt;br /&gt;&lt;br /&gt;Plus, radrails gives you a neat little tool for running unit tests that kicks the pants off running them in a console window&lt;br /&gt;&lt;br /&gt;&lt;a href="http://groups.google.com/group/activescaffold/browse_thread/thread/afed31fe981b6fe6/30e6785209ce5c73#30e6785209ce5c73"&gt;http://groups.google.com/group/activescaffold/browse_thread/thread/afed31fe981b6fe6/30e6785209ce5c73#30e6785209ce5c73&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Josh&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;So it was definitely a ruby version issue. For some reason I was still running verion 1.8.2. I just upgraded to 1.8.6 and adjusting the aptana to work with it and now its working beautifully.&lt;br /&gt;&lt;br /&gt;I'm willing to bet the other guy with the mac is running an older version as well.&lt;br /&gt;&lt;a href="http://groups.google.com/group/activescaffold/browse_thread/thread/9dba7977c325e9f0/95ce778341d5c154?lnk=gst&amp;amp;q=Aptana&amp;amp;rnum=14"&gt;http://groups.google.com/group/activescaffold/browse_thread/thread/9dba7977c325e9f0/95ce778341d5c154?lnk=gst&amp;amp;q=Aptana&amp;amp;rnum=14&lt;/a&gt;#&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;3) Patrick Aljord (8th March 2007) &lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;RadRails is the best free IDE out there for RubyOnRails development and it's easy for companies to integrate it into their development platforms as it it's based on Eclipse.&lt;br /&gt;&lt;a href="http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/73dd6d73752aa09b/59504f9e3488b88c?lnk=gst&amp;amp;q=radrails&amp;amp;rnum=3#59504f9e3488b88c"&gt;http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/73dd6d73752aa09b/59504f9e3488b88c?lnk=gst&amp;amp;q=radrails&amp;amp;rnum=3#59504f9e3488b88c&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;4) Chris Bloom (29th September 2007)&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I'm using RadRails since I can't spring $2049 for TextMate (and accompanying Mac). I've also tested the "e" editor, and otherwise have used EditPlus.&lt;br /&gt;&lt;br /&gt;RadRails is a nice balance of a compact work space, console/logger, and syntax hilighter. I also like its Auto-completion functionality, but it's anywhere from complete OR consistent. And it's preferences panel leaves much to be desired. Then again, it is still a beta release so you have to take some of those problems in context. I look forward to future releases.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/fc4ec10f4767e4aa/0cf12c2fd2e323e9?q=radrails&amp;amp;lnk=nl"&gt;http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/fc4ec10f4767e4aa/0cf12c2fd2e323e9?q=radrails&amp;amp;lnk=nl&lt;/a&gt;&amp;amp;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5) John Lane (24th Sept 2007)&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Hmm, I'd never heard of 3rdRail so I just checked it out: it appears to be a commercial product.&lt;br /&gt;&lt;br /&gt;I personally use Aptana and, yes it has its issues but I think it's better to support an open source initiative with a donation than walk off to a close source solution.&lt;br /&gt;&lt;br /&gt;However, if 3rdRail is streets ahead of Aptana then it may be worth paying for. So, what does it give that Aptana doesn't&lt;br /&gt;&lt;br /&gt;&lt;b&gt;6) Dr Nic (6th Nov 2006&lt;/b&gt;)&lt;br /&gt;&lt;br /&gt;RadRails is a wonderful IDE for developing Rails/Ruby, and supports a similar auto-completion mechanism to TextMate's snippets, called templates. You activate them by typing a portion of the template name, and pressing CTRL-SPACE.&lt;br /&gt;&lt;br /&gt;But RadRails doesn't come with many templates for Rails development.&lt;br /&gt;I've just finished porting all the TextMate snippets across to RadRails - about 250 of them. I hope they are useful to other RadRails developers!&lt;br /&gt;&lt;a href="http://drnicwilliams.com/2006/11/06/post-halloween-radrails-trick-all-textmate-snippets-available/" rel="nofollow" target="_blank"&gt;http://drnicwilliams.com/2006/11/06/post-halloween-radrails-trick-all-textmate-snippets-available/&lt;/a&gt;&lt;br /&gt;Nic&lt;br /&gt;&lt;br /&gt;&lt;a href="http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/9dbdeb357234c895/a1f35635bb6441fb?lnk=gst&amp;amp;q=radrails&amp;amp;rnum=23#a1f35635bb6441fb"&gt;http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/9dbdeb357234c895/a1f35635bb6441fb?lnk=gst&amp;amp;q=radrails&amp;amp;rnum=23#a1f35635bb6441fb&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;7) Jay Levitt (1st Oct 2007)&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;integration support. Both RadRails and 3rdRail use the Subclipse plugin (though I suppose either could be made to use Subversive instead), so you'll see no differences between them.&lt;br /&gt;&lt;br /&gt;I'm fairly happy with Subclipse; it's a bit finicky, and there are some cases (reverting, especially) where it's much slower than the command line, but the integration with the core Eclipse feature set is really nice - the ability to see in your project which files need updating, the Synchronize mode, and especially Mylyn's ability to automatically create separate changesets for each of your to-do tasks. Two of my favorite features are the Eclipse Compare Editor graphical merge view and the "Quick Diff" annotation bar[2] (which colors the line-number field for each line based on revision number and author, making it easy to find change groups).&lt;br /&gt;&lt;br /&gt;The Subclipse maintainer is also on the core Subversion team, so I'd expect Subclipse to have terrific support for the cool new upcoming features in 1.5, like first-class changesets and merge tracking. In fact, he's blogged about a GUI merge-tracking client he's been working on[3].&lt;br /&gt;&lt;br /&gt;&lt;a href="http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/be1f7ce2af0a5f18/1b0e136ee6b6adb1?lnk=gst&amp;amp;q=radrails&amp;amp;rnum=60#1b0e136ee6b6adb1"&gt;http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/be1f7ce2af0a5f18/1b0e136ee6b6adb1?lnk=gst&amp;amp;q=radrails&amp;amp;rnum=60#1b0e136ee6b6adb1&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-1754827942868582298?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/1754827942868582298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=1754827942868582298&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/1754827942868582298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/1754827942868582298'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/i-cant-imagine-why-some-people-keep.html' title='Rails IDE: I can&apos;t imagine why some people keep promoting Aptana'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-8977104031692250560</id><published>2007-10-06T16:59:00.003+08:00</published><updated>2009-08-30T17:42:06.705+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Scaffold'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='CRUD'/><category scheme='http://www.blogger.com/atom/ns#' term='Scaffolding'/><title type='text'>Active Scaffold : Brief Introduction...</title><content type='html'>What happens when you have gone through the various tutorials and came away thoroughly impressed by how easy it is to develop a working RoR app ?&lt;br /&gt;&lt;br /&gt;After a while, you will clearly decide that the default Rails Scaffolding though customisable is simply impractical. Why ? Think of a scenario where you have say a 200 tables CRM Win32 application which you are thinking of rewriting in RoR :-(&lt;br /&gt;&lt;br /&gt;Enters &lt;a href="http://activescaffold.com/tutorials/getting-started"&gt;Active Scaffold&lt;/a&gt;... In a nutshell, Active Scaffold is a Ruby on Rails plugin that dynamically creates user interfaces for your models that include your basic CRUD operations + search, a slick fully styled AJAX'ified design, and a high level of configurability. An extension of the AjaxScaffold project&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-8977104031692250560?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/8977104031692250560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=8977104031692250560&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8977104031692250560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8977104031692250560'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/introducing-active-scaffold_06.html' title='Active Scaffold : Brief Introduction...'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-2318714683302983864</id><published>2007-10-04T04:26:00.002+08:00</published><updated>2009-08-30T17:31:15.384+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rails IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='3rdRail'/><title type='text'>Rails IDE : Why is 3rdRail Unique ?</title><content type='html'>This is quoted verbatim from a response to post I made in the CodeGear 3rd Rail Public News Group.&lt;br /&gt;&lt;br /&gt;CCH: As I delve deeper into eclipse-based IDEs such as 3rdRail &amp;amp; Radrails, I began to realise that a lot of features that developers rave about are actually from Eclipse. I am planning to write an impartial article (at &amp;gt; &lt;a href="http://cch4rails.blogspot.com/"&gt;http://cch4rails.blogspot.com/&lt;/a&gt;) on why 3rdRail is so special, which I believe to be true to a certain degree. As such, I would appreciate it if you list the non-eclipse features that truly distinguishes 3rdRail from other IDEs .&lt;br /&gt;&lt;br /&gt;Joe McGlyn, Director of Product Development, CodeGear :&lt;br /&gt;&lt;br /&gt;Top level features:&lt;br /&gt;- Rails Explorer&lt;br /&gt;- Project Commander&lt;br /&gt;- Ruby console&lt;br /&gt;- Rails console&lt;br /&gt;- Dependency view&lt;br /&gt;- Rails refactorings (NB claims to have refactorings for views and actions, but it fails in every test case I've tried)&lt;br /&gt;- Solid code completion (FWIW, I get a null pointer exception in RadRails M7 in nearly every test case on code completion -- not template completion)&lt;br /&gt;- Context-aware templates (template expansion only shows templates for the current Rails context so you don't see view templates in a controller for example)&lt;br /&gt;- "open associate" navigation according to Rails' dispatch rules&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-2318714683302983864?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/2318714683302983864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=2318714683302983864&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2318714683302983864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/2318714683302983864'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/why-3rdrail-is-unique.html' title='Rails IDE : Why is 3rdRail Unique ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-8776723133327545082</id><published>2007-10-03T20:33:00.003+08:00</published><updated>2009-08-30T17:43:37.859+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Adapter'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='Interbase'/><title type='text'>Using Interbase 2007 in Ruby on Rails Project</title><content type='html'>Joe McGlyn, Director of Product Management at CodeGear has shown the way to use Interbase 2007 in Ruby on Rails as follows :-&lt;br /&gt;&lt;br /&gt;Assuming you already have a project, here are the basic steps to modifying a project to work with InterBase as the database...&lt;br /&gt;&lt;br /&gt;1. Get the InterBase gem&lt;br /&gt;gem install ibruby&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Comments by CCH : &lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;There are a few ways to do this&lt;br /&gt;a) c:\instantrails\ruby\bin &amp;gt;gem install ibruby&lt;br /&gt;&lt;br /&gt;b) In Aptana RadRails,&lt;br /&gt;i) call up the Gems Manager from&lt;br /&gt;Windows\show view\Ruby Gems&lt;br /&gt;ii) Within the Gems Manager&lt;br /&gt;- Click Install&lt;br /&gt;- select ibruby Gem&lt;br /&gt;&lt;br /&gt;You can then see the progress within the Console Tab&lt;br /&gt;&lt;br /&gt;c) In 3rdRail, you can use the Project Commander&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;2. Get the Rails adapter (from the root dir of your rails app or from the project commander) script/plugin source &lt;a href="http://ibruby.rubyforge.org/svn/rails_plugins/trunk/"&gt;http://ibruby.rubyforge.org/svn/rails_plugins/trunk/&lt;/a&gt;&lt;br /&gt;script/plugin install ibrails_plugin&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;Comments by CCH&lt;br /&gt;a) Shell to Command prompt and cd to root of your project folder&lt;br /&gt;&lt;br /&gt;c:\project_name&amp;gt;ruby script/plugin source &lt;/b&gt;&lt;/i&gt;&lt;a href="http://ibruby.rubyforge.org/svn/rails_plugins/trunk/"&gt;&lt;i&gt;&lt;b&gt;http://ibruby.rubyforge.org/svn/rails_plugins/trunk/&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;i&gt;&lt;b&gt;&lt;br /&gt;c:\project_name&amp;gt;ruby script/plugin install ibrails_plugin&lt;br /&gt;&lt;br /&gt;b) Using Aptana Radrals,&lt;br /&gt;i) select the Rails Plugins Tab&lt;br /&gt;ii) select ibruby and click Go&lt;br /&gt;&lt;br /&gt;Nb. If ibruby does not show in the list, revert to method (a) :-)&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/i&gt;&lt;i&gt;&lt;b&gt;&lt;/b&gt;&lt;/i&gt;&lt;i&gt;&lt;b&gt;c) In 3rdRail, you can use the Project Commander &lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;NOTE :&lt;br /&gt;You will also need to add these two lines into your Rails&lt;br /&gt;environment.rb file:&lt;br /&gt;# ------ force InterBase support to be added to Rails&lt;br /&gt;# ------ as Rails currently has no way of extending its db&lt;br /&gt;# ------ support apart from a new Rails release!&lt;br /&gt;require 'active_record'&lt;br /&gt;require 'vendor/plugins/ibrails_plugin/lib/ibrails_plugin'&lt;br /&gt;# ------&lt;br /&gt;Ideally these two lines should appear after the line loading&lt;br /&gt;boot.rb which typically looks like this:&lt;br /&gt;require File.join(File.dirname(__FILE__), 'boot')&lt;br /&gt;and before anything else gets done (particularly any&lt;br /&gt;initialization)&lt;br /&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;3. Assuming you have IB installed, and have the default IB user/pwd enabled you're good to go.&lt;br /&gt;It will even create the database file (within your project directory by default)&lt;br /&gt;Known limitation:Indicies are limited to ~200 characters, depending on how they are composed. This is InterBase, not the integration.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;Comments by CCH&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;Despite religously following the instructions from Joe McGlyn of CodeGear, I have not been able to overcome the barrier and error message&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;ie "database configuration specifies nonexistent interbase adapter"&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;You may want to read the thread "Using Interbase with RoR" started by Joe here borland.public.3rdrail.ide&lt;/b&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-8776723133327545082?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/8776723133327545082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=8776723133327545082&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8776723133327545082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8776723133327545082'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/using-interbase-2007-in-ruby-on-rails.html' title='Using Interbase 2007 in Ruby on Rails Project'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-1245582991711378389</id><published>2007-10-02T21:43:00.002+08:00</published><updated>2009-08-30T17:32:25.992+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rails IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Radrails'/><title type='text'>Rails IDE : Aptana Radrails M7 Beta - First Impressions</title><content type='html'>I am an intensive user of Aptana Radrails M5 since July 2007 and have just updated to M7.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_8Fmgkr0dcSo/Ryw4ZgB5unI/AAAAAAAAADU/3g-1i9wfHOQ/s1600-h/radrails.JPG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5128536086413949554" src="http://bp1.blogger.com/_8Fmgkr0dcSo/Ryw4ZgB5unI/AAAAAAAAADU/3g-1i9wfHOQ/s320/radrails.JPG" style="display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;Interface-wise, I can immediately see the following changes :-&lt;br /&gt;1) Rails Navigator has been replaced by Ruby Explorer&lt;br /&gt;2) 5 obviously new icons on the tool bar&lt;br /&gt;a) H - switch to Helper&lt;br /&gt;b) T - switch to Test&lt;br /&gt;c) M - switch to Model&lt;br /&gt;d) V - switch to Views&lt;br /&gt;e) C- switch to Controller&lt;br /&gt;&lt;br /&gt;Curious, I selected my favourite project and click (a) - (e), nothing happened&lt;br /&gt;&lt;br /&gt;Then, I opened the CustomerController which looks the same as in M5&lt;br /&gt;&lt;br /&gt;Clicking H opened module customers_helper.rb&lt;br /&gt;Clicking M opened module customer.rb&lt;br /&gt;Clicking V asked for which action (using AS, N/A)&lt;br /&gt;Clicking T opened customer_controller_test.rb&lt;br /&gt;&lt;br /&gt;This is very convenient, Cool :-)&lt;br /&gt;&lt;br /&gt;3) Rails Plugin no longer automatically goto the home pages but links are clearly there thus speeding up&lt;br /&gt;&lt;br /&gt;4) Code completion/Code Snippet when one type&lt;br /&gt;&lt;br /&gt;val or validates+ctrl+space displays a list wnd when selected inserts&lt;br /&gt;validates_presence_of(attributes, :message =&amp;gt; "message")&lt;br /&gt;&lt;br /&gt;5) The Ruby Explorer is great in that via a tree structure, methods hyperlinked to the actual methods. This is a nice feature absent in M5.&lt;br /&gt;&lt;br /&gt;This article was first posted on 28th September 2007, 11:30pm on the Ruby on Rails:Talk Google Group&lt;br /&gt;&lt;br /&gt;&lt;a href="http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/e4365a0d52403271"&gt;http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/e4365a0d52403271&lt;/a&gt;#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-1245582991711378389?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/1245582991711378389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=1245582991711378389&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/1245582991711378389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/1245582991711378389'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/aptana-radrails-m7-beta-first.html' title='Rails IDE : Aptana Radrails M7 Beta - First Impressions'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_8Fmgkr0dcSo/Ryw4ZgB5unI/AAAAAAAAADU/3g-1i9wfHOQ/s72-c/radrails.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-227172100631201545</id><published>2007-10-02T21:18:00.002+08:00</published><updated>2009-08-30T17:33:48.560+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rails IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><category scheme='http://www.blogger.com/atom/ns#' term='Radrails'/><title type='text'>Rails IDE : Aptana Radrails M7 Beta - Best Way To Upgrade</title><content type='html'>Just upgraded smoothly to long overdue Aptana M7 Beta which was released on 25/9/2007.&lt;br /&gt;&lt;br /&gt;FYI, the best way to upgrade from July's M5 (M6 was skipped) is as follows :-&lt;br /&gt;&lt;br /&gt;1) Click Help/Software Upgrades/Final and Install&lt;br /&gt;&lt;br /&gt;2) Manually adding the following remote update site to the update manager: &lt;a href="http://update.aptana.com/update/rails/beta/3.2/site.xml" rel="nofollow" target="_blank"&gt;http://update.aptana.com/update/rails/beta/3.2/site.xml&lt;/a&gt;&lt;br /&gt;Nb. Name the new remote site as say "Aptana M7 Update"&lt;br /&gt;&lt;br /&gt;3) If you have any issue after upgrading, you could try to reinstall as follows :-&lt;br /&gt;1) Remove the Aptana folder under C:\Documents and Settings\username\My Documents (if any)&lt;br /&gt;2) Uninstall Aptana from Control Panel&lt;br /&gt;3) Install from Aptana_IDE_Setup.msi&lt;br /&gt;4) Goto Help\Software Updates\Find and Install&lt;br /&gt;5) Accept the default Search for new features to install&lt;br /&gt;6) Check Aptana M7 Beta and click Finish&lt;br /&gt;&lt;br /&gt;This article was first posted on 28th September 2007, 10:48pm on the Ruby on Rails:Talk Google Group&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update on 4th October 2007&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This is what I did to get a clean installation of RadRails&lt;br /&gt;1) Uninstall va control panel&lt;br /&gt;2) Delete Documents and Settings\username\mydocuments\Aptana Beta folder which contains the meta data&lt;br /&gt;3) Remove the Programs\Aptana direcory&lt;br /&gt;4) Install Aptana_IDE_setup.msi&lt;br /&gt;&lt;br /&gt;Nb. You may want to chose custom and select to install JRE 1.6&lt;br /&gt;I believe this is the source of your null pointer issue&lt;br /&gt;&lt;br /&gt;5) Using Plugins Manager or Find and Install Software, install&lt;br /&gt;- Radrails M7 Beta&lt;br /&gt;- Subclipse&lt;br /&gt;&lt;br /&gt;That's it&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-227172100631201545?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/227172100631201545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=227172100631201545&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/227172100631201545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/227172100631201545'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/aptana-radrails-m7-beta-best-way-to.html' title='Rails IDE : Aptana Radrails M7 Beta - Best Way To Upgrade'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4314462642856995692.post-8659182609355628787</id><published>2007-10-02T20:19:00.002+08:00</published><updated>2009-08-30T17:34:31.045+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCH'/><title type='text'>Why Rails...Rails...Rails ?</title><content type='html'>In 1995, I started the popular Clipper...Clipper... Clipper website (no blogs then) which was very popular and linked by virtually every Clipper-related site. When I switched to Windows via Delphi in 1997, I started the Delphi... Delphi... Delphi site.&lt;br /&gt;&lt;br /&gt;In June 2007, I discovered Ruby on Rails and no prize for guessing what I am gonna name this blog :-) &lt;br /&gt;&lt;br /&gt;BTW, I started this blog on 30th September 2007 and this is the first Rails app which is a rewrite of a 200+ tables CRM apps on the Win32 platform.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5128545101550303890" src="http://bp0.blogger.com/_8Fmgkr0dcSo/RyxAmQB5upI/AAAAAAAAADk/4C_vyq7svig/s320/crmmain.JPG" style="display: block; margin: 0px auto 10px; text-align: center;" /&gt; &lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5128548382905318050" src="http://bp0.blogger.com/_8Fmgkr0dcSo/RyxDlQB5uqI/AAAAAAAAADs/qd9WUhyyBUQ/s320/crmblog.JPG" style="display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5128550551863802546" src="http://bp1.blogger.com/_8Fmgkr0dcSo/RyxFjgB5urI/AAAAAAAAAD0/BaFdSbk8pYw/s320/expensedisb.JPG" style="display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4314462642856995692-8659182609355628787?l=cch4rails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cch4rails.blogspot.com/feeds/8659182609355628787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4314462642856995692&amp;postID=8659182609355628787&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8659182609355628787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4314462642856995692/posts/default/8659182609355628787'/><link rel='alternate' type='text/html' href='http://cch4rails.blogspot.com/2007/10/why-railsraillsrails.html' title='Why Rails...Rails...Rails ?'/><author><name>CCH</name><uri>http://www.blogger.com/profile/18320403617135453794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_8Fmgkr0dcSo/StPeV406pzI/AAAAAAAAAcI/baQmj8R4AR0/S220/CCH2009.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_8Fmgkr0dcSo/RyxAmQB5upI/AAAAAAAAADk/4C_vyq7svig/s72-c/crmmain.JPG' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
