<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-26100023</atom:id><lastBuildDate>Thu, 05 Nov 2009 13:11:41 +0000</lastBuildDate><title>Impossible is Impossible</title><description>Imagination is more important than knowledge.

Dont try to solve problems by using the same kind of thinking you used when you created them.

If you are failing to plan,
you are planning to fail.</description><link>http://thinkingrails.blogspot.com/</link><managingEditor>noreply@blogger.com (Arunkumar)</managingEditor><generator>Blogger</generator><openSearch:totalResults>38</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-8165811472488471337</guid><pubDate>Mon, 31 Aug 2009 17:43:00 +0000</pubDate><atom:updated>2009-08-31T23:17:56.214+05:30</atom:updated><title>creating images from unicode text using rmagick</title><description>To create images from the unicode text, we can use the "encoding" method for the Draw object. &lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;require "RMagick"&lt;br /&gt;&lt;br /&gt;def show_textimg&lt;br /&gt; bg = Magick::Image.new(120,20){self.background_color = "#9E9E9E"}&lt;br /&gt; text = Magick::Draw.new&lt;br /&gt; text.encoding = "Unicode"&lt;br /&gt; text.text(23,14,"ドの半角⇔全角")&lt;br /&gt; text.draw(bg)&lt;br /&gt; bg.write "#{RAILS_ROOT}/public/images/text.jpg"&lt;br /&gt;end&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-8165811472488471337?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2009/08/creating-images-from-unicode-text-using.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-8957743964066187893</guid><pubDate>Mon, 28 Jan 2008 09:28:00 +0000</pubDate><atom:updated>2008-01-28T15:03:24.876+05:30</atom:updated><title>Top Ten Mistakes in Web Design</title><description>&lt;span style="font-weight: bold;"&gt;Top Ten Mistakes in Web Design&lt;/span&gt;  &lt;blockquote style="background-color: rgb(255, 255, 221);"&gt; &lt;strong&gt;Summary:&lt;/strong&gt;&lt;br /&gt;The ten most egregious offenses against users. Web design disasters and HTML horrors are legion, though many usability atrocities are less common than they used to be. &lt;/blockquote&gt;  &lt;p&gt; &lt;img src="http://www.useit.com/alertbox/20021223_02_mistake.gif" style="float: right; padding-left: 2ex; padding-top: 3ex; padding-bottom: 4ex;" alt="Cartoon - Man searching for 'Honalulu' and getting no results. - Woman: 'Oh, forget it. Let's just go visit my mother in Fargo.'" height="449" width="340" /&gt;  &lt;/p&gt;&lt;h2&gt;1. Bad Search&lt;/h2&gt;Overly literal search engines reduce usability in that they're unable to handle typos, plurals, hyphens, and other variants of the query terms. Such search engines are &lt;a href="http://www.useit.com/alertbox/20020428.html" title="Alertbox: Usability for Senior Citizens" class="old"&gt;particularly difficult for elderly users&lt;/a&gt;, but they hurt everybody. &lt;p&gt; A related problem is when search engines prioritize results purely on the basis of how many query terms they contain, rather than on each document's importance. Much better if your search engine calls out "best bets" at the top of the list -- especially for important queries, such as the names of your products. &lt;/p&gt;&lt;p&gt; Search is the user's lifeline when navigation fails. Even though advanced search can sometimes help, &lt;a href="http://www.useit.com/alertbox/20010513.html" title="Alertbox: Search: Visible and Simple" class="old"&gt;simple search usually works best&lt;/a&gt;, and search should be presented as a simple box, since that's what users are looking for.  &lt;/p&gt;&lt;h2&gt;2. PDF Files for Online Reading&lt;/h2&gt;Users hate coming across a PDF file while browsing, because it breaks their flow. Even simple things like printing or saving documents are difficult because standard browser commands don't work. Layouts are often optimized for a sheet of paper, which rarely matches the size of the user's browser window. Bye-bye smooth scrolling. Hello tiny fonts. &lt;p&gt; Worst of all, PDF is an undifferentiated blob of content that's hard to navigate. &lt;/p&gt;&lt;p&gt;PDF is great for printing and for distributing manuals and other big documents that need to be printed. Reserve it for this purpose and convert any information that needs to be browsed or read on the screen into real web pages. &lt;/p&gt;&lt;p&gt; &lt;span class="cssSmallGray"&gt;&gt;&lt;/span&gt; Detailed discussion of why &lt;a href="http://www.useit.com/alertbox/20030714.html" title="Alertbox: PDF: Unfit for Human Consumption"&gt;PDF is bad for online reading&lt;/a&gt;  &lt;/p&gt;&lt;h2&gt;3. Not Changing the Color of Visited Links&lt;/h2&gt;A good grasp of past navigation helps you understand your current location, since it's the culmination of your journey. Knowing your past and present locations in turn makes it easier to decide where to go next. Links are a key factor in this navigation process. Users can exclude links that proved fruitless in their earlier visits. Conversely, they might revisit links they found helpful in the past. &lt;p&gt; Most important, knowing which pages they've already visited frees users from unintentionally revisiting the same pages over and over again. &lt;/p&gt;&lt;p&gt;These benefits only accrue under one important assumption: that users can tell the difference between visited and unvisited links because the site shows them in different colors. When visited links don't change color, users exhibit more navigational disorientation in usability testing and unintentionally revisit the same pages repeatedly. &lt;/p&gt;&lt;p&gt; &lt;span class="cssSmallGray"&gt;&gt;&lt;/span&gt; &lt;a href="http://www.useit.com/alertbox/20040503.html" title="Alertbox: Change the Color of Visited Links"&gt;Usability implications of changing link colors&lt;/a&gt;&lt;br /&gt;&lt;span class="cssSmallGray"&gt;&gt;&lt;/span&gt; &lt;a href="http://www.useit.com/alertbox/20040510.html" title="Alertbox: Guidelines for Visualizing Links"&gt;Guidelines for showing links&lt;/a&gt;   &lt;img src="http://www.useit.com/alertbox/20021223_05_mistake.gif" alt="Cartoon - guy being crushed under wordy 'terms and conditions' legalese" style="float: right; padding-left: 2ex; padding-top: 3ex; padding-bottom: 4ex;" height="450" width="340" /&gt;  &lt;/p&gt;&lt;h2&gt;4. Non-Scannable Text&lt;/h2&gt;  A wall of text is deadly for an interactive experience. Intimidating. Boring. Painful to read. &lt;p&gt; &lt;a href="http://www.useit.com/papers/webwriting/" title="Research on writing for the Web based on how people read online" class="old"&gt;Write for online&lt;/a&gt;, not print. To draw users into the text and support scannability, use well-documented tricks: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;subheads &lt;/li&gt;&lt;li&gt;bulleted lists &lt;/li&gt;&lt;li&gt;&lt;strong&gt;highlighted keywords&lt;/strong&gt; &lt;/li&gt;&lt;li&gt;short paragraphs &lt;/li&gt;&lt;li&gt;the inverted pyramid &lt;/li&gt;&lt;li&gt;a simple writing style, and  &lt;/li&gt;&lt;li&gt;de-fluffed language devoid of marketese. &lt;/li&gt;&lt;/ul&gt;  &lt;p&gt; &lt;span class="cssSmallGray"&gt;&gt;&lt;/span&gt; &lt;a href="http://www.useit.com/alertbox/reading_pattern.html" title="Alertbox: F-Shaped Pattern For Reading Web Content"&gt;Eyetracking of reading patterns&lt;/a&gt;   &lt;/p&gt;&lt;h2&gt;5. Fixed Font Size&lt;/h2&gt; CSS style sheets unfortunately give websites the power to disable a Web browser's "change font size" button and specify a fixed font size. About 95% of the time, this fixed size is &lt;em&gt;tiny&lt;/em&gt;, reducing readability significantly for most people over the age of 40. &lt;p&gt; Respect the user's preferences and let them &lt;a href="http://www.useit.com/alertbox/20020819.html" title="Alertbox: Let Users Control Font Size" class="old"&gt;resize text&lt;/a&gt; as needed. Also, specify font sizes in relative terms -- not as an absolute number of pixels.   &lt;/p&gt;&lt;h2&gt;6. Page Titles With Low Search Engine Visibility&lt;/h2&gt; Search is the most important way users discover websites. Search is also one of the most important ways users find their way around individual websites. The humble page title is your main tool to attract new visitors from search listings and to help your existing users to locate the specific pages that they need. &lt;p&gt;&lt;title&gt; tag and is almost always used as the clickable headline for listings on search engine result pages (SERP). Search engines typically show the first 66 characters or so of the title, so it's truly &lt;/title&gt;The page title is contained within the HTML &lt;a href="http://www.useit.com/alertbox/980906.html" title="Alertbox: Microcontent - How to Write Headlines, Page Titles, and Subject Lines" class="old"&gt;microcontent&lt;/a&gt;.  &lt;/p&gt;&lt;p&gt; Page titles are also used as the default entry in the Favorites when users bookmark a site. For your homepage, begin the with the company name, followed by a brief description of the site. Don't start with words like "The" or "Welcome to" unless you want to be alphabetized under "T" or "W." &lt;/p&gt;&lt;p&gt;For other pages than the homepage, start the title with a few of the most salient information-carrying words that describe the specifics of what users will find on that page. Since the page title is used as the window title in the browser, it's also used as the label for that window in the taskbar under Windows, meaning that advanced users will move between multiple windows under the guidance of the first one or two words of each page title. If all your page titles start with the same words, you have severely reduced usability for your multi-windowing users. &lt;/p&gt;&lt;p&gt; &lt;a href="http://www.useit.com/alertbox/20010722.html" title="Alertbox: Tagline Blues: What's the Site About?"&gt;Taglines on homepages&lt;/a&gt; are a related subject: they also need to be short and quickly communicate the purpose of the site.  &lt;/p&gt;&lt;h2&gt;7. Anything That Looks Like an Advertisement&lt;/h2&gt;  &lt;strong&gt;Selective attention&lt;/strong&gt; is very powerful, and Web users have learned to stop paying attention to any ads that get in the way of their goal-driven navigation. (The main exception being &lt;a href="http://www.useit.com/alertbox/20030428.html" title="Alertbox: Will Plain-Text Ads Continue to Rule?"&gt;text-only search-engine ads&lt;/a&gt;.) &lt;p&gt; Unfortunately, users also &lt;a href="http://www.useit.com/alertbox/fancy-formatting.html" title="Alertbox: Fancy Formatting, Fancy Words = Looks Like a Promotion = Ignored" class="old"&gt;ignore legitimate design elements that look like&lt;/a&gt; prevalent forms of advertising. After all, when you &lt;em&gt;ignore&lt;/em&gt; something, you don't study it in detail to find out what it is. &lt;/p&gt;&lt;p&gt; Therefore, it is best to avoid any designs that look like advertisements. The exact implications of this guideline will vary with new forms of ads;  currently follow these rules: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.useit.com/alertbox/banner-blindness.html" title="Alertbox: Banner Blindness - Old and New Findings" class="old"&gt;&lt;strong&gt;banner blindness&lt;/strong&gt;&lt;/a&gt; means that users never fixate their eyes on anything that looks like a banner ad due to  shape or position on the page &lt;/li&gt;&lt;li&gt;&lt;strong&gt;animation avoidance&lt;/strong&gt; makes users ignore areas with blinking or flashing text or other aggressive animations &lt;/li&gt;&lt;li&gt;&lt;strong&gt;pop-up purges&lt;/strong&gt; mean that users close pop-up windoids before they have even fully rendered; sometimes with great viciousness (a sort of getting-back-at-GeoCities triumph). &lt;/li&gt;&lt;/ul&gt;   &lt;h2&gt;8. Violating Design Conventions&lt;/h2&gt;  &lt;strong&gt;Consistency&lt;/strong&gt; is one of the most powerful usability  principles: when things always behave the same, users don't have to worry about what will happen. Instead, they &lt;em&gt;know&lt;/em&gt; what will happen based on earlier experience. Every time you release an apple over Sir  Isaac Newton, it will drop on his head. That's &lt;em&gt;good&lt;/em&gt;.  &lt;p&gt; The more users' expectations prove right, the more they will feel in control  of the system and the more they will like it. And the more the system breaks users' expectations, the more they will feel insecure. Oops, maybe if I let go of this apple, it will turn into a tomato and jump a mile into the sky. &lt;/p&gt;&lt;p&gt; &lt;strong&gt;Jakob's Law of the Web User Experience&lt;/strong&gt; states that "users spend most of their time on &lt;em&gt;other&lt;/em&gt; websites." &lt;/p&gt;&lt;p&gt; This means that they form their expectations for your site based on what's commonly done on most other sites. If you deviate, your site will be harder to use and users will leave. &lt;/p&gt;&lt;h2&gt;9. Opening New Browser Windows&lt;/h2&gt;  Opening up new browser windows is like a vacuum cleaner sales person who starts a visit by emptying an ash tray on the customer's carpet. Don't pollute my screen with any more windows, thanks (particularly since current operating systems have miserable window management). &lt;p&gt; Designers open new browser windows on the theory that it keeps users on their site. But even disregarding the &lt;strong&gt;user-hostile message implied in taking over the user's machine&lt;/strong&gt;, the strategy is self-defeating since it disables the &lt;em&gt;Back&lt;/em&gt; button which is the normal way users return to previous sites. Users often don't notice that a new window has opened, especially if they  are using a small monitor where the windows are maximized to fill up the  screen. So a user who tries to return to the origin will be confused by a grayed out &lt;em&gt;Back&lt;/em&gt; button. &lt;/p&gt;&lt;p&gt;Links that don't behave as expected undermine users' understanding of their own system. A link should be a simple hypertext reference that replaces the current page with new content. Users hate unwarranted pop-up windows. When they want the destination to appear in a new page, they can use their browser's "open in new window" command -- assuming, of course, that the link is not a piece of code that interferes with the browser’s standard behavior. &lt;img src="http://www.useit.com/alertbox/20021223_01_mistake.gif" style="float: right; padding-left: 2ex; padding-top: 3ex; padding-bottom: 4ex;" alt="Cartoon - woman (at car  dealership): 'How much is it with automatic transmission?' - sleazy salesman: 'I'll give you a hint - it's an EVEN number...'" height="450" width="340" /&gt;  &lt;/p&gt;&lt;h2&gt;10. Not Answering Users' Questions&lt;/h2&gt;Users are highly goal-driven on the Web. They visit sites because there's something they want to accomplish -- maybe even buy your product. The ultimate failure of a website is to fail to provide the information users are looking for. &lt;p&gt;Sometimes the answer is simply not there and you lose the sale because users have to assume that your product or service doesn't meet their needs if you don't tell them the specifics. Other times the specifics are buried under a thick layer of marketese and bland slogans. Since users don't have time to read everything, such hidden info might almost as well not be there. &lt;/p&gt;&lt;p&gt; The worst example of not answering users' questions is to &lt;strong&gt;avoid listing the price&lt;/strong&gt; of products and services.  No B2C ecommerce site would make this mistake, but it's rife in &lt;a href="http://www.useit.com/alertbox/b2b.html" title="Alertbox: Business-to-business website usability" class="old"&gt;B2B&lt;/a&gt;, where most "enterprise solutions" are presented so that you can't tell whether they are suited for 100 people or 100,000 people. Price is the most specific piece of info customers use to understand the nature of an offering, and not providing it makes people feel lost and reduces their understanding of a product line. We have miles of videotape of users asking &lt;em&gt;"Where's the price?"&lt;/em&gt; while tearing their hair out. &lt;/p&gt;&lt;p&gt; Even B2C sites often make the associated mistake of forgetting prices in product lists, such as &lt;a href="http://www.nngroup.com/reports/ecommerce/categorypages.html" title="Nielsen Norman Group report: 28 Design Guidelines for Category Pages on e-commerce sites" class="old"&gt;category pages&lt;/a&gt; or &lt;a href="http://www.nngroup.com/reports/ecommerce/search.html" title="Nielsen Norman Group report: 29 Design Guidelines for Search" class="old"&gt;search results&lt;/a&gt;. Knowing the price is key in both situations; it lets users differentiate among products and click through to the most relevant ones.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Source : http://www.useit.com/alertbox/9605.html&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-8957743964066187893?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2008/01/top-ten-mistakes-in-web-design.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-2528869318912931162</guid><pubDate>Fri, 04 Jan 2008 06:25:00 +0000</pubDate><atom:updated>2008-01-04T11:56:34.259+05:30</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ruby</category><category domain='http://www.blogger.com/atom/ns#'>send</category><title>'send' in Ruby</title><description>&lt;h4&gt;send&lt;/h4&gt; &lt;p&gt; Calling a method when method name is stored as a string object in a variable i.e. you can not see which method to call. &lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;strong&gt;example 1&lt;/strong&gt;&lt;br /&gt;when method name is simply stored as a String object &lt;/p&gt; &lt;div&gt; &lt;ol&gt;&lt;li&gt;class C     &lt;/li&gt;&lt;li&gt;   def wish  &lt;/li&gt;&lt;li&gt;     p "hello world"  &lt;/li&gt;&lt;li&gt;   end  &lt;/li&gt;&lt;li&gt; end  &lt;/li&gt;&lt;li&gt; a = "wish"  &lt;/li&gt;&lt;li&gt; c  = C.new   &lt;/li&gt;&lt;li&gt; c.send(a)  &lt;/li&gt;&lt;/ol&gt; &lt;/div&gt; &lt;p&gt; &lt;strong&gt;example 2&lt;/strong&gt;&lt;br /&gt;making set method at runtime &lt;/p&gt; &lt;div&gt; &lt;ol&gt;&lt;li&gt;class C  &lt;/li&gt;&lt;li&gt;  attr_accessor :name  &lt;/li&gt;&lt;li&gt;end  &lt;/li&gt;&lt;li&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;c = C.new  &lt;/li&gt;&lt;li&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;a = "name"  &lt;/li&gt;&lt;li&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;c.send(a + "=", "Arun")  &lt;/li&gt;&lt;li&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;p c.send(a)  &lt;/li&gt;&lt;/ol&gt; &lt;/div&gt; &lt;p&gt; &lt;strong&gt;example 3&lt;/strong&gt;&lt;br /&gt;this is interesting, when attribute name itself is &lt;strong&gt;send&lt;/strong&gt; &lt;/p&gt; &lt;div&gt; &lt;ol&gt;&lt;li&gt;class C  &lt;/li&gt;&lt;li&gt;  attr_accessor :send  &lt;/li&gt;&lt;li&gt;end  &lt;/li&gt;&lt;li&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;c = C.new  &lt;/li&gt;&lt;li&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;a = "send"  &lt;/li&gt;&lt;li&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;c.__send__(a + "=", "Arun")  &lt;/li&gt;&lt;li&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;p c.__send__(a) # =&gt; Arun  &lt;/li&gt;&lt;/ol&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-2528869318912931162?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2008/01/send-in-ruby.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-7047469737063881804</guid><pubDate>Thu, 29 Nov 2007 09:40:00 +0000</pubDate><atom:updated>2007-11-29T15:10:48.047+05:30</atom:updated><title>Difference between Strings and Symbols in Ruby</title><description>&lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:130%;"&gt;&lt;span style="font-size: 14pt;"&gt;Symbols  have two nice properties compared to strings which can save you memory and &lt;span class="caps"&gt;CPU&lt;/span&gt; time:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h4&gt;&lt;b&gt;&lt;span style="font-family:Times New Roman;font-size:100%;color:blue;"&gt;&lt;span style="font-size: 12pt; color: blue;"&gt;Memory&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;For every  unique string value, there is a unique symbol object. Three strings with the  same value can use up to three times the memory of three symbols with the same  value. This is because those three symbols are actually the same  object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;p "blah".object_id #=&gt; -605600196&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;p "blah".object_id #=&gt; -605618816&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;p "blah".object_id #=&gt; -605637168&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;p :blah.object_id #=&gt; 4071694&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;p :blah.object_id #=&gt; 4071694&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;p :blah.object_id #=&gt; 4071694&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;p "blah".to_sym.object_id #=&gt; 4071694&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;p "blah".to_sym.object_id #=&gt; 4071694&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;p "blah".to_sym.object_id #=&gt; 4071694&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-weight: bold; font-size: 10pt;"&gt;I think now you can understand&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;b&gt;&lt;span style="font-weight: bold;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;Symbol  objects are created on-demand behind the scenes for new unique string values.  Once a symbol exists for a particular string value, it will continue to be used  for that value rather than creating more symbols for  it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;Of course,  this has a disadvantage: Ruby keeps symbols around forever (well, until the end  of your program anyway), in case they are needed  again.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;That’s fine  if the number of unique symbols is relatively small and you expect to keep  reusing them. However, if you have an unlimited number of string values, and/or  you only use each one briefly (for example, lines arriving on an input stream),  symbols are not the tool for you. You’ll just use up all your  memory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h4&gt;&lt;span class="caps"&gt;&lt;b&gt;&lt;span style="font-family:Times New Roman;font-size:100%;color:blue;"&gt;&lt;span style="font-size: 12pt; color: blue;"&gt;CPU&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;span style="color: blue;"&gt; Time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;Testing two  symbol values for equality (or non-equality) is faster than testing two string  values for equality, because Ruby only needs to do a single test. Checking two  strings for equality is more complicated; every individual character in the  string has to be checked until a difference is  found.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;As noted  above, each unique string value has an associated symbol. This means that  checking whether two symbols have the same string value or not is as simple as  checking whether they are the same object or not.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;One  comparison:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;:Worcestershire == :Worcestershire&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;Easy peasy.  They’re the same object, so they’re equal.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;Sixteen  comparisons:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;"Worcestershire" == "Worcestershire"&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;With  strings, Ruby has to dig into the objects to check their contents. Since in this  case they’re different string objects with the same length, it’s got to check  all fourteen characters in each string to make sure that they really are  equal.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;However,  what symbols &lt;em&gt;&lt;i&gt;&lt;span style="font-family:Times New Roman;"&gt;don’t&lt;/span&gt;&lt;/i&gt;&lt;/em&gt; give you  is lexical comparison. You can do &lt;/span&gt;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;"foo" &gt; "bar"&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;, but  not &lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;:foo  &gt; :bar&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;. They’re digested. Their original string values  are a memory which can be resurrected only via &lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;Symbol#to_s&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;h4&gt;&lt;b&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;The  Right Tool for the Job&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;If you have  a modest number of unique string values that you want to use over and over, and  will mostly be using them as-is (i.e. not concatenating them, uppercasing them,  etc….), then symbols are the right tool for you.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;Method  names (such as those given to &lt;/span&gt;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;Module#attr_reader&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;, or  &lt;code&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;Object#send&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;) are a good example of  this; in fact, &lt;span style="color:blue;"&gt;&lt;span style="color: blue;"&gt;Ruby uses symbols  internally to remember method, variable, and constant  names.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-size: 12pt;"&gt;Otherwise,  stick with strings. Strings are not that much slower than symbols, and many  times the extra limitations of symbols aren’t worth  it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-7047469737063881804?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/11/difference-between-strings-and-symbols.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-5471399628015896681</guid><pubDate>Wed, 14 Nov 2007 04:37:00 +0000</pubDate><atom:updated>2007-11-14T11:25:48.870+05:30</atom:updated><title>Rails 2.0 -  Preview Release</title><description>Its time to feel the Real Power of Rails.&lt;br /&gt;The Rails 2.0 preview version is just released.&lt;br /&gt;&lt;br /&gt;I've listed down some of the important updates of Rails 2.0 here&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Action Pack - Multiview&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In Rails 2.0, the format of the template is separated from its rendering engine. 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 &lt;span class="caps"&gt;ERB&lt;/span&gt; renderer.    &lt;p&gt;So the new format for templates is action.format.renderer. A few examples:&lt;/p&gt;    &lt;ul&gt;&lt;li&gt;show.erb: same show template for all formats&lt;/li&gt;&lt;li&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;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Action Pack: Record identification&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;Piggy-backing off the new drive for resources are a number of simplifications for controller and view methods that deal with URLs. We’ve added a number of conventions for turning model classes into resource routes on the fly. Examples:&lt;/p&gt;   &lt;pre&gt;&lt;code&gt;&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;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Action Pack: &lt;span class="caps"&gt;HTTP&lt;/span&gt; Loving&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;New module is added in Rails 2.0 to work with &lt;span class="caps"&gt;HTTP&lt;/span&gt; Basic Authentication, which turns out to be a great way to do &lt;span class="caps"&gt;API&lt;/span&gt; authentication over &lt;span class="caps"&gt;SSL&lt;/span&gt;. It’s terribly simple to use. Here’s an example (there are more in ActionController::HttpAuthentication):&lt;/p&gt;   &lt;pre&gt;&lt;code&gt;&lt;br /&gt;class PostsController &lt; password = "dhh" except =""&gt; [ :index ]&lt;br /&gt;&lt;br /&gt;  def index&lt;br /&gt;    render :text =&gt; "Everyone can see me!"&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  def edit&lt;br /&gt;    render :text =&gt; "I'm only accessible if you know the password"&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  private&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;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Active Record: Sexy migrations&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;There’s a new alternative format for declaring migrations in a slightly more efficient format. Before you’d write:&lt;/p&gt;    &lt;pre&gt;&lt;code&gt;create_table :people do |t|&lt;br /&gt;t.column, "account_id",  :integer&lt;br /&gt;t.column, "first_name",  :string, :null =&gt; false&lt;br /&gt;t.column, "last_name",   :string, :null =&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;/code&gt;&lt;/pre&gt;    &lt;p&gt;Now you can write:&lt;/p&gt;    &lt;pre&gt;&lt;code&gt;create_table :people do |t|&lt;br /&gt;t.integer :account_id&lt;br /&gt;t.string  :first_name, :last_name, :null =&gt; false&lt;br /&gt;t.text    :description&lt;br /&gt;t.timestamps&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;And hundreds upon hundreds of other improvements&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;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;/p&gt;&lt;p&gt;&lt;strong&gt;So how do I upgrade?&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;If you want to move your application to Rails 2.0, you should first move it to Rails 1.2.3. That’ll include deprecation warnings for most everything we yanked out in 2.0. So if your application runs fine on 1.2.3 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;/p&gt;    &lt;p&gt;To install the preview release through gems, do:&lt;/p&gt;    &lt;pre&gt;&lt;code&gt;gem install rails --source http://gems.rubyonrails.org&lt;/code&gt;&lt;/pre&gt;    &lt;p&gt;To try it from an &lt;span class="caps"&gt;SVN&lt;/span&gt; tag, use:&lt;/p&gt;    &lt;pre&gt;&lt;code&gt;rake rails:freeze:edge TAG=rel_2-0-0_PR&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Thanks to &lt;/span&gt;&lt;/code&gt;David Heinemeier Hansson&lt;code&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt; and the &lt;/span&gt;&lt;/code&gt;core team of committers and hundreds of open-source contributors&lt;code&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&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/26100023-5471399628015896681?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/11/rails-20-preview-release.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-2759944605440539954</guid><pubDate>Mon, 08 Oct 2007 04:57:00 +0000</pubDate><atom:updated>2007-10-08T10:36:10.599+05:30</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ruby</category><category domain='http://www.blogger.com/atom/ns#'>ror</category><category domain='http://www.blogger.com/atom/ns#'>ide</category><category domain='http://www.blogger.com/atom/ns#'>Rails</category><title>Another IDE for Rails - NetBeans 6.0 Beta</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_bT7-x4Ar0l8/Rwm6jssEK_I/AAAAAAAAACE/GNENBtKv3f0/s1600-h/netbeans6.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp1.blogger.com/_bT7-x4Ar0l8/Rwm6jssEK_I/AAAAAAAAACE/GNENBtKv3f0/s400/netbeans6.jpg" alt="" id="BLOGGER_PHOTO_ID_5118827573937449970" border="0" /&gt;&lt;/a&gt;NetBeans is an open-source IDE written in Java (somewhat like Eclipse, but not the same), and version 6.0 is the first with a Ruby-specific edition that focuses solidly on the things that Ruby and Ruby on Rails developers need. The NetBeans team have just released the first beta version. &lt;p&gt;NetBeans is a free IDE. You can create Ruby and Rails projects, run Ruby files, configure interpreters (MRI and JRuby), install Gems graphically, run tests, run RSpecs, debug Ruby code, run Rails apps, and so on, all from the IDE.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can download it from &lt;a href="http://bits.netbeans.org/download/6_0/beta1/latest/"&gt;here&lt;/a&gt; . &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-2759944605440539954?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/10/another-ide-for-rails-netbeans-60-beta.html</link><author>noreply@blogger.com (Arunkumar)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_bT7-x4Ar0l8/Rwm6jssEK_I/AAAAAAAAACE/GNENBtKv3f0/s72-c/netbeans6.jpg' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-2591768588079331496</guid><pubDate>Sun, 12 Aug 2007 02:51:00 +0000</pubDate><atom:updated>2007-08-12T08:36:22.765+05:30</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ruby</category><category domain='http://www.blogger.com/atom/ns#'>object</category><category domain='http://www.blogger.com/atom/ns#'>error</category><category domain='http://www.blogger.com/atom/ns#'>validations</category><category domain='http://www.blogger.com/atom/ns#'>Rails</category><title>Rails Validations</title><description>Validation is nothing but a set of methods to ensure the integrity of information in the database. It forms a minimum standard that all records must meet before they can be saved.&lt;br /&gt;&lt;p&gt;Validation takes place &lt;strong&gt;before a model is saved&lt;/strong&gt;. If the model being saved doesn’t meet its validation requirements, it will &lt;span class="caps"&gt;NOT&lt;/span&gt; be saved to the database. Attempts to &lt;code&gt;save&lt;/code&gt; an invalid model return false. This allows for the “if-save” convention:&lt;/p&gt;   &lt;pre&gt;if @object.save&lt;br /&gt;# object was valid and saved&lt;br /&gt;..&lt;br /&gt;else&lt;br /&gt;# object was invalid, not saved&lt;br /&gt;..&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;You can trigger validation &lt;strong&gt;manually&lt;/strong&gt; by calling the models &lt;code&gt;validate&lt;/code&gt; method.&lt;/p&gt;   &lt;pre&gt;@object.validate&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;But likely more useful would be to call &lt;code&gt;valid?&lt;/code&gt;, which runs &lt;code&gt;validate&lt;/code&gt; then returns true or false.&lt;/p&gt;   &lt;pre&gt;if @object.valid?&lt;br /&gt;...&lt;/pre&gt;   &lt;h3&gt;Avoiding validation&lt;/h3&gt;    &lt;p&gt;You can skip validation by passing &lt;code&gt;false&lt;/code&gt; to &lt;code&gt;save&lt;/code&gt;.&lt;/p&gt;   &lt;pre&gt;@object.save(false)&lt;br /&gt;&lt;br /&gt;Similarly whenever "update_attribute" method is used, the validation for the&lt;br /&gt;corresponding object is skipped. But if you use "update_attibutes" method,&lt;br /&gt;It will trigger the validation methods for that object.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Note:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Skipping validtion may result (obviously) in invalid data being&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;recorded to the database.&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;h3&gt;Validation in Controllers:&lt;/h3&gt;When a model is validated, any validation errors will be collected in the models &lt;code&gt;errors&lt;/code&gt; object.&lt;br /&gt;you can use validation methods for an object in the controller class itself by just inspecting the object ( conditions ), and adding the errors to that object like this&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;@object.errors.add(:attribute,"#{error_messages}")&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&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/26100023-2591768588079331496?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/08/rails-validations.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-2657250303272179161</guid><pubDate>Thu, 19 Jul 2007 16:26:00 +0000</pubDate><atom:updated>2007-07-19T22:17:43.729+05:30</atom:updated><title>Compression in RMagick</title><description>Whenever you upload an image, and resize it using rmagick library, it will do the resize operation with default compression techniques. Sometimes the user may upload images which are directly from digital cameras, these images contain lots of metadata including color profiles. Anyway We don’t need any of these color profile information in the resized images :)&lt;br /&gt;&lt;br /&gt;You can remove those color profiles from your images using the RMagick method called &lt;span style="font-weight: bold;"&gt;"delete_profile" &lt;/span&gt;(an instance method of Image class in RMagick library).&lt;br /&gt;&lt;br /&gt;or You can use the method  "&lt;span style="font-weight: bold;"&gt;profile!("*", nil)" &lt;/span&gt;to delete all the color profiles.&lt;br /&gt;&lt;br /&gt;you have to use the above methods like this&lt;br /&gt;&lt;br /&gt;    &lt;p style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-size:180%;"&gt;&lt;span class="arg"&gt;image&lt;/span&gt;.delete_profile(&lt;span class="arg"&gt;profile_name&lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:100%;"&gt;if you put a specific profile name like "IPTC" or "ICC", it will delete the specified profile.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:100%;"&gt;if you use &lt;span style="font-weight: bold;"&gt;image.delete_profile("*"), &lt;/span&gt;it will delete all the profiles.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-size:180%;"&gt;&lt;span class="arg"&gt;image&lt;/span&gt;.profile!(&lt;span class="arg"&gt;"*", nil&lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: normal;"&gt;This will remove all the profiles of the images.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold; font-style: italic;"&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-size:180%;"&gt;&lt;span style="font-weight: bold;"&gt;Note : &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold; font-style: italic;"&gt;RMagick does not automatically remove profiles when     resizing images. If you are trying to make your JPEG thumbnail     images as small as possible, use &lt;code style="font-weight: bold;"&gt;profile!&lt;/code&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;to     remove any profiles from the image as well.&lt;/p&gt;&lt;br /&gt;&lt;p style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-weight: normal;"&gt;And there is one more method called &lt;/span&gt;"strip!" &lt;span style="font-weight: normal;font-size:100%;" &gt;strips an image of all profiles and     comments.&lt;/span&gt;&lt;/p&gt;      &lt;p style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-size:180%;"&gt;&lt;span class="arg"&gt;image&lt;/span&gt;.strip!&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-weight: normal;font-size:100%;" &gt;&lt;span style="font-style: italic;"&gt;This will &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: normal;"&gt;Strip an image of all profiles and     comments.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-weight: normal;font-size:100%;" &gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-2657250303272179161?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/07/compression-in-rmagick.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-5597928689461711090</guid><pubDate>Thu, 28 Jun 2007 22:29:00 +0000</pubDate><atom:updated>2007-06-29T04:19:23.965+05:30</atom:updated><category domain='http://www.blogger.com/atom/ns#'>RJS</category><category domain='http://www.blogger.com/atom/ns#'>UJS</category><category domain='http://www.blogger.com/atom/ns#'>Rails</category><title>UJS for Rails</title><description>&lt;h1&gt;&lt;span style="font-size:130%;"&gt;&lt;span class="tagline"&gt;Unobtrusive Javascript for Ruby On Rails&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/h1&gt;&lt;span style="font-family:times new roman;"&gt;UJS for Rails makes it easy to apply behaviour to your page. Simply specify the element(s) of your page that you want the behaviour to apply to using CSS-style selectors and the event that you want to trigger the behaviour, and the Javascript that you want to run. In addition, you can write your behaviours using RJS-style Ruby to Javascript proxies.&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;Installation&lt;/h3&gt;    &lt;p  style="font-family:times new roman;"&gt;You can install the &lt;span class="caps"&gt;UJS&lt;/span&gt; plugin from our Subversion repository with Rails’ plugin script:&lt;/p&gt;   &lt;pre&gt;&lt;code class="shell"&gt;&lt;span style="font-size:85%;"&gt;ruby script/plugin install http://source.ujs4rails.com/current/unobtrusive_javascript&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:times new roman;"&gt;After Installing the plugin, run the following command&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;code class="shell"&gt;rake unobtrusive_javascript:install&lt;br /&gt;&lt;span style=";font-family:times new roman;font-size:130%;"  &gt;&lt;br /&gt;If  "&lt;/span&gt;&lt;/code&gt;&lt;span style=";font-family:times new roman;font-size:130%;"  &gt;lowpro.js" is copied to your system means, installation is perfect...otherwise&lt;br /&gt;please do the installation again :)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:times new roman;"&gt;Once you’ve confirmed that lowpro.js is installed, the final&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:times new roman;"&gt;installation step is to open your routes.rb file and add the following&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:times new roman;"&gt;line into the &lt;/span&gt;&lt;code style="font-family: times new roman;" class="ruby"&gt;Routes.draw&lt;/code&gt;&lt;span style="font-family:times new roman;"&gt; block&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;code class="ruby"&gt;ActionController::Routes.draw &lt;span class="keywords"&gt;do&lt;/span&gt; |map|&lt;br /&gt;UJS::routes&lt;br /&gt;&lt;span class="comment"&gt;# your routes here.&lt;/span&gt;&lt;br /&gt;&lt;span class="keywords"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;span style=";font-family:times new roman;font-size:130%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;h3&gt;Including The Scripts&lt;/h3&gt;&lt;span style="font-family:times new roman;"&gt;Simply use &lt;/span&gt;&lt;code style="font-family: times new roman;" class="ruby"&gt;javascript_include_tag&lt;/code&gt;&lt;span style="font-family:times new roman;"&gt; to add the &lt;/span&gt;&lt;span class="caps"  style="font-family:times new roman;"&gt;UJS&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt; scripts into the document’s &lt;/span&gt;&lt;code style="font-family: times new roman;" class="html"&gt;head&lt;/code&gt;&lt;span style="font-family:times new roman;"&gt; tag as shown:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class="html"&gt;&lt;%= javascript_include_tag &lt;span class="string"&gt;'prototype'&lt;/span&gt;, :unobtrusive %&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:times new roman;"&gt;You can safely use &lt;/span&gt;&lt;code style="font-family: times new roman;" class="ruby"&gt;:defaults&lt;/code&gt;&lt;span style="font-family:times new roman;"&gt; and &lt;/span&gt;&lt;code style="font-family: times new roman;" class="html"&gt;:unobtrusive&lt;/code&gt;&lt;span style="font-family:times new roman;"&gt; together in the same &lt;/span&gt;&lt;code style="font-family: times new roman;" class="ruby"&gt;javascript_include_tag&lt;/code&gt;&lt;span style="font-family:times new roman;"&gt; call.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Applying Behaviours&lt;/span&gt;&lt;br /&gt;&lt;h4&gt;&lt;code class="ruby"&gt;apply_behaviour&lt;span class="brackets"&gt;(&lt;/span&gt;css_selector, javascript, options={}&lt;span class="brackets"&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/h4&gt;&lt;span style="font-family: times new roman;font-size:100%;" &gt;The first argument of apply_behaviours is an event:Selectors style selector that specifies both the &lt;/span&gt;&lt;span style="font-family: times new roman;font-size:100%;" class="caps" &gt;CSS&lt;/span&gt;&lt;span style="font-family: times new roman;font-size:100%;" &gt; selector for the elements to target and the event to attach the behaviour to in this format: &lt;code class="no-highlight"&gt;css_selector:event&lt;/code&gt;&lt;/span&gt;    &lt;p style="font-family: times new roman;font-family:times new roman;" &gt;&lt;span style="font-size:100%;"&gt;The second argument is the behavior to apply. Pass a string to specify the JavaScript code to execute directly. There are two variables available to the behaviour JavaScript. In the JavaScript code, &lt;code class="javascript"&gt;&lt;span class="keywords"&gt;this&lt;/span&gt;&lt;/code&gt; refers to the triggering element and &lt;code class="javascript"&gt;event&lt;/code&gt; refers to the JavaScript event object.&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family: times new roman;font-family:times new roman;font-size:100%;"  &gt;For Documentation, please refer this url -&lt;/span&gt;&lt;p  style="font-family:times new roman;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: times new roman;"&gt; http://www.ujs4rails.com/resources/usage-documentation&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=";font-family:times new roman;font-size:100%;"  &gt;&lt;strong&gt;Note:&lt;/strong&gt; UJS (and the lowpro extensions) requires at least Prototype 1.5.0 &lt;/span&gt;&lt;span style=";font-family:times new roman;font-size:100%;" class="caps"  &gt;RC0&lt;/span&gt;&lt;span style=";font-family:times new roman;font-size:100%;"  &gt;.&lt;/span&gt;&lt;pre&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/26100023-5597928689461711090?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/06/ujs-for-rails.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-2491907559088187977</guid><pubDate>Tue, 19 Jun 2007 20:56:00 +0000</pubDate><atom:updated>2007-06-20T03:05:13.851+05:30</atom:updated><title>finder_sql in HABTM</title><description>&lt;p&gt;Using this "finder_sql", you can override ActiveRecord's associations in your models. Use it to manually specify the association that should be returned.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Important Note:&lt;/span&gt; if you need to do any variable interpolation in the string , make sure to use single quotes instead of the usual doubles:&lt;/p&gt; &lt;div&gt;&lt;code&gt;has_many :books, :finder_sql =&gt; 'select * from books where author_id=#{id}'&lt;/code&gt;&lt;/div&gt; &lt;p&gt;When you use double quotes, the string interpolation happens immediately (when the class is first loaded), thus obtaining the object ID of the class in memory. Using single quotes, the interpolation occurs within the context of your object instance, which is what you're expecting.&lt;/p&gt;&lt;p&gt;Enjoy Agile Programming!!!&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-2491907559088187977?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/06/findersql-in-habtm.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-5665354113132492258</guid><pubDate>Tue, 12 Jun 2007 18:16:00 +0000</pubDate><atom:updated>2007-06-12T23:53:45.411+05:30</atom:updated><title>Safari for Windows</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://ajaxian.com/wp-content/images/safari3windows.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px;" src="http://ajaxian.com/wp-content/images/safari3windows.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Apple is releasing the public beta of &lt;a target="_blank" href="http://www.apple.com/safari/download/"&gt;Safari for Windows&lt;/a&gt; today.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Steve gave demos of Safari, claiming that it screams:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;ibench html performance: IE 4.6 sec, FF 3.7, Safari 2.2 seconds&lt;/li&gt;&lt;li&gt;javascript: IE 2.4 sec, FF 1.6, Safari 0.9 seconds&lt;/li&gt;&lt;/ul&gt;  &lt;br /&gt;Safari has always been the fastest browser on the Mac and now it’s the fastest browser on Windows, loading and drawing web pages up to twice as fast as Microsoft Internet Explorer 7 and up to 1.6 times faster than Mozilla Firefox 2.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-5665354113132492258?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/06/safari-for-windows.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-3400432988092387705</guid><pubDate>Mon, 11 Jun 2007 16:46:00 +0000</pubDate><atom:updated>2007-06-11T23:26:15.178+05:30</atom:updated><title>Google Gears</title><description>Google announced an early beta of &lt;a href="http://gears.google.com/"&gt;Gears&lt;/a&gt;, a &lt;em&gt;"browser extension that enables web applications to provide offline functionality using following JavaScript APIs:&lt;/em&gt; &lt;ul&gt;&lt;li&gt;&lt;em&gt;Store and serve application resources locally&lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;em&gt;Store data locally in a fully-searchable relational database&lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;em&gt;Run asynchronous Javascript to improve application responsiveness"&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt; Google Gears is an open source browser extension that lets developers create web applications that can run offline. Gears provides three key features: &lt;/p&gt; &lt;ul&gt;&lt;li&gt;A local server, to cache and serve application resources (HTML, JavaScript, images, etc.) without needing to contact a server &lt;/li&gt;&lt;li&gt;A database, to store and access data from within the browser &lt;/li&gt;&lt;li&gt;A worker thread pool, to make web applications more responsive by performing expensive operations in the background &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Google Gears is currently an early-access developers' release. It is not yet intended for use by real users in production applications at this time.&lt;br /&gt;&lt;/p&gt;Google Gears extends browsers by making new APIs available to JavaScript code. Like all APIs, they must be used explicitly. To take advantage of the offline features provided by Google Gears, you'll need to add or change code in your web application.&lt;br /&gt;&lt;br /&gt;Only web sites that have been specifically designed to use Google Gears can take advantage of its offline capabilities.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-3400432988092387705?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/06/google-gears.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-9113170135713780766</guid><pubDate>Fri, 01 Jun 2007 17:18:00 +0000</pubDate><atom:updated>2007-06-01T22:56:10.003+05:30</atom:updated><title>Rails Rake Tasks Reference</title><description>&lt;pre&gt;rake cache&lt;span style="color: rgb(170, 102, 0);"&gt;:clear&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Clears all cached pages&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:bootstrap&lt;/span&gt;      &lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Loads a schema.rb file into the database and then loads the initial database fixtures.&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:bootstrap&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:copy_default_theme&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Copy default theme to site theme&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:migrate&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Migrate the database through scripts in db/migrate. Target specific version with VERSION=x&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:schema&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:dump&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Create a db/schema.rb file that can be portably used against any DB supported by AR&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:schema&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:load&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Load a schema.rb file into the database&lt;br /&gt;&lt;/span&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:bootstrap&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:load&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Load initial database fixtures (in db/bootstrap/*.yml) into the current environment's database.  Load specific fixtures using FIXTURES=x,y&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:fixtures&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:load&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Load fixtures into the current environment's database.  Load specific fixtures using FIXTURES=x,y&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:sessions&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:clear&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Clear the sessions table&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:sessions&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:create&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Creates a sessions table for use with CGI::Session::ActiveRecordStore&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:structure&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:dump&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Dump the database structure to a SQL file&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:test&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:clone&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Recreate the test database from the current environment's database schema&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:test&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:clone_structure&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Recreate the test databases from the development structure&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:test&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:prepare&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Prepare the test database and load the schema&lt;/span&gt;&lt;br /&gt;rake db&lt;span style="color: rgb(170, 102, 0);"&gt;:test&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:purge&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Empty the test database&lt;/span&gt;&lt;br /&gt;rake deploy&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Push the latest revision into production using the release manager&lt;/span&gt;&lt;br /&gt;rake diff_from_last_deploy&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Describe the differences between HEAD and the last production release&lt;/span&gt;&lt;br /&gt;rake doc&lt;span style="color: rgb(170, 102, 0);"&gt;:app&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Build the app HTML Files&lt;/span&gt;&lt;br /&gt;rake doc&lt;span style="color: rgb(170, 102, 0);"&gt;:clobber_app&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Remove rdoc products&lt;/span&gt;&lt;br /&gt;rake doc&lt;span style="color: rgb(170, 102, 0);"&gt;:clobber_plugins&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Remove plugin documentation&lt;/span&gt;&lt;br /&gt;rake doc&lt;span style="color: rgb(170, 102, 0);"&gt;:clobber_rails&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Remove rdoc products&lt;/span&gt;&lt;br /&gt;rake doc&lt;span style="color: rgb(170, 102, 0);"&gt;:plugins&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Generate documation for all installed plugins&lt;/span&gt;&lt;br /&gt;rake doc&lt;span style="color: rgb(170, 102, 0);"&gt;:rails&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Build the rails HTML Files&lt;/span&gt;&lt;br /&gt;rake doc&lt;span style="color: rgb(170, 102, 0);"&gt;:reapp&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Force a rebuild of the RDOC files&lt;/span&gt;&lt;br /&gt;rake doc&lt;span style="color: rgb(170, 102, 0);"&gt;:rerails&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Force a rebuild of the RDOC files&lt;/span&gt;&lt;br /&gt;rake edge&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# freeze rails edge&lt;/span&gt;&lt;br /&gt;rake log&lt;span style="color: rgb(170, 102, 0);"&gt;:clear&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Truncates all *.log files in log/ to zero bytes&lt;/span&gt;&lt;br /&gt;rake rails&lt;span style="color: rgb(170, 102, 0);"&gt;:freeze&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:edge&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Lock to latest Edge Rails or a specific revision with REVISION=X (ex: REVISION=4021) or a tag with TAG=Y (ex: TAG=rel_1-1-0)&lt;/span&gt;&lt;br /&gt;rake rails&lt;span style="color: rgb(170, 102, 0);"&gt;:freeze&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:gems&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Lock this application to the current gems (by unpacking them into vendor/rails)&lt;/span&gt;&lt;br /&gt;rake rails&lt;span style="color: rgb(170, 102, 0);"&gt;:unfreeze&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Unlock this application from freeze of gems or edge and return to a fluid use of system gems&lt;/span&gt;&lt;br /&gt;rake rails&lt;span style="color: rgb(170, 102, 0);"&gt;:update&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Update both configs, scripts and public/javascripts from Rails&lt;/span&gt;&lt;br /&gt;rake rails&lt;span style="color: rgb(170, 102, 0);"&gt;:update&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:configs&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Update config/boot.rb from your current rails install&lt;/span&gt;&lt;br /&gt;rake rails&lt;span style="color: rgb(170, 102, 0);"&gt;:update&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:javascripts&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Update your javascripts from your current rails install&lt;/span&gt;&lt;br /&gt;rake rails&lt;span style="color: rgb(170, 102, 0);"&gt;:update&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:scripts&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Add new scripts to the application script/ directory&lt;/span&gt;&lt;br /&gt;rake remote_exec&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Execute a specific action using the release manager&lt;/span&gt;&lt;br /&gt;rake rollback&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Rollback to the release before the current release in production&lt;/span&gt;&lt;br /&gt;rake show_deploy_tasks&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Enumerate all available deployment tasks&lt;/span&gt;&lt;br /&gt;rake stats&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Report code statistics (KLOCs, etc) from the application&lt;/span&gt;&lt;br /&gt;rake test                           &lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Test all units and functionals&lt;/span&gt;&lt;br /&gt;rake test&lt;span style="color: rgb(170, 102, 0);"&gt;:functionals&lt;/span&gt;                 &lt;span style="color: rgb(136, 136, 136);"&gt;&lt;br /&gt;# Run tests for functionalsdb:test:prepare&lt;/span&gt;&lt;br /&gt;rake test&lt;span style="color: rgb(170, 102, 0);"&gt;:integration&lt;/span&gt;               &lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Run tests for integrationdb:test:prepare&lt;/span&gt;&lt;br /&gt;rake test&lt;span style="color: rgb(170, 102, 0);"&gt;:plugins&lt;/span&gt;                     &lt;span style="color: rgb(136, 136, 136);"&gt;&lt;br /&gt;# Run tests for pluginsenvironment&lt;/span&gt;&lt;br /&gt;rake test&lt;span style="color: rgb(170, 102, 0);"&gt;:recent&lt;/span&gt;                    &lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Run tests for recentdb:test:prepare&lt;/span&gt;&lt;br /&gt;rake test&lt;span style="color: rgb(170, 102, 0);"&gt;:uncommitted&lt;/span&gt;                 &lt;span style="color: rgb(136, 136, 136);"&gt;&lt;br /&gt;# Run tests for uncommitteddb:test:prepare&lt;/span&gt;&lt;br /&gt;rake test&lt;span style="color: rgb(170, 102, 0);"&gt;:units&lt;/span&gt;                     &lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Run tests for unitsdb:test:prepare&lt;/span&gt;&lt;br /&gt;rake tmp&lt;span style="color: rgb(170, 102, 0);"&gt;:cache&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:clear&lt;/span&gt;                &lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Clears all files and directories in tmp/cache&lt;/span&gt;&lt;br /&gt;rake tmp&lt;span style="color: rgb(170, 102, 0);"&gt;:clear&lt;/span&gt;                        &lt;span style="color: rgb(136, 136, 136);"&gt;&lt;br /&gt;# Clear session, cache, and socket files from tmp/&lt;/span&gt;&lt;br /&gt;rake tmp&lt;span style="color: rgb(170, 102, 0);"&gt;:create&lt;/span&gt;                       &lt;span style="color: rgb(136, 136, 136);"&gt;&lt;br /&gt;# Creates tmp directories for sessions, cache, and sockets&lt;/span&gt;&lt;br /&gt;rake tmp&lt;span style="color: rgb(170, 102, 0);"&gt;:pids&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:clear&lt;/span&gt;                   &lt;span style="color: rgb(136, 136, 136);"&gt;&lt;br /&gt;# Clears all files in tmp/pids&lt;/span&gt;&lt;br /&gt;rake tmp&lt;span style="color: rgb(170, 102, 0);"&gt;:sessions&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:clear&lt;/span&gt;               &lt;span style="color: rgb(136, 136, 136);"&gt;&lt;br /&gt;# Clears all files in tmp/sessions&lt;/span&gt;&lt;br /&gt;rake tmp&lt;span style="color: rgb(170, 102, 0);"&gt;:sockets&lt;/span&gt;&lt;span style="color: rgb(170, 102, 0);"&gt;:clear&lt;/span&gt;              &lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Clears all files in tmp/sockets&lt;/span&gt;&lt;br /&gt;rake update_dialog_helper           &lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;# Copies the latest dialog.js to the application's public directory&lt;/span&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/26100023-9113170135713780766?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/06/rails-rake-tasks-reference.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>7</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-3797968227130724685</guid><pubDate>Fri, 25 May 2007 03:29:00 +0000</pubDate><atom:updated>2007-05-25T09:03:46.918+05:30</atom:updated><title>Why FLEX?</title><description>&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Reasons  made  me to choose FLEX :&lt;/b&gt;&lt;br /&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;i.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;                   &lt;/span&gt;&lt;/span&gt;look and feel of a desktop application. Because there is no page reload.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;ii.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;                  &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Reduction in Server Load and Network Bandwidth&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;iii.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Common Deployment Environment&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Some or all of the presentation tier of a flex application runs in flash player itself. It runs in the Client side which means “ no application server processing resources are spent for data formatting”.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;By Off loading the presentation logic to the client side flash player, and eliminating the need for frequent page refreshes. Flex applications minimizes the network traffic and server load.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Common Deployment Environment:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Flex applications execute on flash players which are platform independent, so customer do not need to install any custom client software. Also flash player runs consistently in all browsers and platforms. So you don’t have to worry about the problems like inconsistent behaviors in different client environments.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-3797968227130724685?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/05/why-flex.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-7027510472235335453</guid><pubDate>Fri, 25 May 2007 03:28:00 +0000</pubDate><atom:updated>2007-05-25T08:59:23.070+05:30</atom:updated><title>Flex - RPC</title><description>&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Remote Procedure Call Services:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;RPC services let your flex application to interact with the remote servers to provide data to your application or for your application to send data to the server.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Using Flex SDK, you can access the remote data through web services like SOAP or normal HTTP services like GET or POST requests.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;For security, by default flash player doesn’t allow an application to access a remote data source from a domain other than the domain from which the application was served.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Therefore a remote server must either be in the same domain as the server hosting your application or the remote server must define a &lt;b style=""&gt;crossdomain.xml&lt;/b&gt; file.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Crossdomain.xml&lt;/b&gt; file is an xml file that provides access to swf&lt;span style=""&gt;  &lt;/span&gt;files from certain domains or from all domains.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-7027510472235335453?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/05/flex-rpc.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-8416982402383557243</guid><pubDate>Fri, 25 May 2007 03:26:00 +0000</pubDate><atom:updated>2007-05-25T08:58:18.269+05:30</atom:updated><title>Flex - Power of RIA</title><description>&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;What is flex?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Flex is a development and runtime environment that you use to create rich internet applications that use adobe flash player 9.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Flex is an adobe technology.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Using flex, you can design, develop and deliver entirely new class of RIAs.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Flex lets the developers familiar with the server side technologies to build rich front end for applications.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;While executing in flash player, your flex application can interact with the server side functionality such as databases, web services, java objects (data models) and other server side services.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;In Flex, You use a standards based programming model to develop an application. So you have to describe the user interface and configure the user interface controls and define the data bindings.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Flex Application Development Methodology:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Design&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Compile&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Run&lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Design:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Design part consists of flex class libraries, MXML, Action Script, CSS and other imported files like images, swf files.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Compile:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;When compiling the application, all the source code will be converted in to Action script classes. So everything here is AS classes.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Run:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The final output is a SWF file where your application resides.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;You can embed this swf file into a normal html file to run your flex application.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-8416982402383557243?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/05/flex-power-of-ria.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-2099103525392193133</guid><pubDate>Wed, 25 Apr 2007 15:22:00 +0000</pubDate><atom:updated>2007-05-25T09:05:30.132+05:30</atom:updated><category domain='http://www.blogger.com/atom/ns#'>How to use Capistrano</category><title>How to use Capistrano</title><description>&lt;a href="http://undefinedrange.com/files/capistrano.png"&gt;&lt;img style="margin: 0px 10px 10px 0px; float: left; width: 200px;" alt="" src="http://undefinedrange.com/files/capistrano.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;Capistrano is a simple but a powerful deployment tool...&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;To use Capistrano for deployment, please read the following lines&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;(Note : Instructions are given for ROR development. )&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;em&gt;1. Install Capistrano Gem&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;"gem install capistrano"&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;em&gt;2. Run this command from your local system&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;"cap --apply-to /path/to/your/app YourApplicationName"&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;em&gt;3. Execute the setup task&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;"rake remote:setup"&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;this command will setup the directory structure to deploy...&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;em&gt;4. Execute the cold_deploy task&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;"rake remote:cold_deploy"&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;this command will run, deploy your application to the server...&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now Your application will run&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Once you’ve finished the above, your server is ready to have new versions of your&lt;br /&gt;application deployed to it anytime you would like. All you need to do is commiting your changes into Subversion and then redeploy using the following command on your local computer&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;"rake remote:deploy"&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;em&gt;Capistrano OVER....&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;you can see "&lt;em&gt;how to write capistrano task&lt;/em&gt;" in coming posts.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-2099103525392193133?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/04/how-to-use-capistrano.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-6722047488774902691</guid><pubDate>Fri, 23 Mar 2007 05:59:00 +0000</pubDate><atom:updated>2007-03-23T11:30:17.757+05:30</atom:updated><title>Nice Web 2.0 App</title><description>check this link&lt;br /&gt;&lt;br /&gt;&lt;a href="http://color.slightlyblue.com/"&gt;http://color.slightlyblue.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-6722047488774902691?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/03/nice-web-20-app.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-1447244936528788679</guid><pubDate>Tue, 20 Mar 2007 12:38:00 +0000</pubDate><atom:updated>2007-03-20T18:08:12.004+05:30</atom:updated><title>Rails Ajax rating system (Part 1)</title><description>Adds rating capabilities to any ActiveRecord object. It has the ability to work with objects that have or don ’t special fields to keep a tally of the ratings and number of votes for each object. In addition it will by default use the User model as the rater object and keep the ratings per-user. It can be configured to use another class...&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;a href='http://www.rubynaut.net/articles/2007/03/18/rails_ajax_rating_system_part_1'&gt;read more&lt;/a&gt; | &lt;a href='http://digg.com/programming/Rails_Ajax_rating_system_Part_1_2'&gt;digg story&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-1447244936528788679?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/03/rails-ajax-rating-system-part-1.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-6607511027616186877</guid><pubDate>Wed, 28 Feb 2007 05:14:00 +0000</pubDate><atom:updated>2007-02-28T10:44:31.279+05:30</atom:updated><title>Validating  XHTML and CSS</title><description>Validating an XHTML document's content involves checking its markup against a DTD and reporting markup errors. You can validate HTML, XHTML, and CSS files by using the W3C's validator. It will allow you to validate files on the Internet or on your computer.&lt;br /&gt;&lt;br /&gt;The validator program will go through your coding, find any errors, and create a report. You can then "clean up" your coding and validate again. This service is free.&lt;br /&gt;&lt;br /&gt;http://validator.w3.org/&lt;br /&gt;&lt;br /&gt;You can also check your external CSS pages through the CSS validator ...&lt;br /&gt;&lt;br /&gt;http://jigsaw.w3.org/css-validator/&lt;br /&gt;&lt;br /&gt;Once validated as well formed coding, the bottom of the report page will show an icon image that you may display on your page such as the ones you see in the right side column of my site. Display it with pride!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-6607511027616186877?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/02/validating-xhtml-and-css.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-7126474953396204234</guid><pubDate>Wed, 28 Feb 2007 05:11:00 +0000</pubDate><atom:updated>2007-02-28T10:42:53.931+05:30</atom:updated><title>XHTML Doc Types</title><description>There are 3 Doctypes usable by an XHTML document. &lt;span style="font-weight:bold;"&gt;Strict, Transitional, and Frameset.&lt;/span&gt; The doctype is used when validating an XHTML document's content against a DTD and reporting markup errors. (The DOCTYPE lines below are broken in parts only to prevent the examples from being too wide for non-horizontal scrolling - you can keep it all on one line).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;XHTML 1.0 Strict&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use this when you want really clean markup, free of presentational clutter. Use this together with Cascading Style Sheets.&lt;br /&gt;&lt;br /&gt;&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"&lt;br /&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;XHTML 1.0 Transitional&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use this when you need to take advantage of HTML's presentational features because many of your readers don't have the latest browsers that understand Cascading Style Sheets.&lt;br /&gt;&lt;br /&gt;&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;br /&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;XHTML 1.0 Frameset&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use this when you want to use HTML Frames to partition the browser window into two or more frames.&lt;br /&gt;&lt;br /&gt;&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"&lt;br /&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-7126474953396204234?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/02/xhtml-doc-types.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-2256216756894719081</guid><pubDate>Wed, 28 Feb 2007 04:39:00 +0000</pubDate><atom:updated>2007-02-28T10:39:46.170+05:30</atom:updated><title>Reserved Words in MYSQL</title><description>In MYSQL, There is a number of words that you cannot use for your table and column names. MySQL uses some specific words for command processing, so using them in your own coding may confuse things a bit.&lt;br /&gt;&lt;br /&gt;ADD  ALL  ALTER&lt;br /&gt;ANALYZE  AND  AS&lt;br /&gt;ASC  ASENSITIVE  AUTO_INCREMENT&lt;br /&gt;BDB  BEFORE  BERKELEYDB&lt;br /&gt;BETWEEN  BIGINT  BINARY&lt;br /&gt;BLOB  BOTH  BY&lt;br /&gt;CALL  CASCADE  CASE&lt;br /&gt;CHANGE  CHAR  CHARACTER&lt;br /&gt;CHECK  COLLATE  COLUMN&lt;br /&gt;COLUMNS  CONDITION  CONNECTION&lt;br /&gt;CONSTRAINT  CONTINUE  CREATE&lt;br /&gt;CROSS  CURRENT_DATE  CURRENT_TIME&lt;br /&gt;CURRENT_TIMESTAMP  CURSOR  DATABASE&lt;br /&gt;DATABASES  DAY_HOUR  DAY_MICROSECOND&lt;br /&gt;DAY_MINUTE  DAY_SECOND  DEC&lt;br /&gt;DECIMAL  DECLARE  DEFAULT&lt;br /&gt;DELAYED  DELETE  DESC&lt;br /&gt;DESCRIBE  DETERMINISTIC  DISTINCT&lt;br /&gt;DISTINCTROW  DIV  DOUBLE&lt;br /&gt;DROP  ELSE  ELSEIF&lt;br /&gt;ENCLOSED  ESCAPED  EXISTS&lt;br /&gt;EXIT  EXPLAIN  FALSE&lt;br /&gt;FETCH  FIELDS  FLOAT&lt;br /&gt;FOR  FORCE  FOREIGN&lt;br /&gt;FOUND  FRAC_SECOND  FROM&lt;br /&gt;FULLTEXT  GRANT  GROUP&lt;br /&gt;HAVING  HIGH_PRIORITY  HOUR_MICROSECOND&lt;br /&gt;HOUR_MINUTE  HOUR_SECOND  IF&lt;br /&gt;IGNORE  IN  INDEX&lt;br /&gt;INFILE  INNER  INNODB&lt;br /&gt;INOUT  INSENSITIVE  INSERT&lt;br /&gt;INT  INTEGER  INTERVAL&lt;br /&gt;INTO  IO_THREAD  IS&lt;br /&gt;ITERATE  JOIN  KEY&lt;br /&gt;KEYS  KILL  LEADING&lt;br /&gt;LEAVE  LEFT  LIKE&lt;br /&gt;LIMIT  LINES  LOAD&lt;br /&gt;LOCALTIME  LOCALTIMESTAMP  LOCK&lt;br /&gt;LONG  LONGBLOB  LONGTEXT&lt;br /&gt;LOOP  LOW_PRIORITY  MASTER_SERVER_ID&lt;br /&gt;MATCH  MEDIUMBLOB  MEDIUMINT&lt;br /&gt;MEDIUMTEXT  MIDDLEINT  MINUTE_MICROSECOND&lt;br /&gt;MINUTE_SECOND  MOD  NATURAL&lt;br /&gt;NOT  NO_WRITE_TO_BINLOG  NULL&lt;br /&gt;NUMERIC  ON  OPTIMIZE&lt;br /&gt;OPTION  OPTIONALLY  OR&lt;br /&gt;ORDER  OUT  OUTER&lt;br /&gt;OUTFILE  PRECISION  PRIMARY&lt;br /&gt;PRIVILEGES  PROCEDURE  PURGE&lt;br /&gt;READ  REAL  REFERENCES&lt;br /&gt;REGEXP  RENAME  REPEAT&lt;br /&gt;REPLACE  REQUIRE  RESTRICT&lt;br /&gt;RETURN  REVOKE  RIGHT&lt;br /&gt;RLIKE  SECOND_MICROSECOND  SELECT&lt;br /&gt;SENSITIVE  SEPARATOR  SET&lt;br /&gt;SHOW  SMALLINT  SOME&lt;br /&gt;SONAME  SPATIAL  SPECIFIC&lt;br /&gt;SQL  SQLEXCEPTION  SQLSTATE&lt;br /&gt;SQLWARNING  SQL_BIG_RESULT  SQL_CALC_FOUND_ROWS&lt;br /&gt;SQL_SMALL_RESULT  SQL_TSI_DAY  SQL_TSI_FRAC_SECOND&lt;br /&gt;SQL_TSI_HOUR  SQL_TSI_MINUTE  SQL_TSI_MONTH&lt;br /&gt;SQL_TSI_QUARTER  SQL_TSI_SECOND  SQL_TSI_WEEK&lt;br /&gt;SQL_TSI_YEAR  SSL  STARTING&lt;br /&gt;STRAIGHT_JOIN  STRIPED  TABLE&lt;br /&gt;TABLES  TERMINATED  THEN&lt;br /&gt;TIMESTAMPADD  TIMESTAMPDIFF  TINYBLOB&lt;br /&gt;TINYINT  TINYTEXT  TO&lt;br /&gt;TRAILING  TRUE  UNDO&lt;br /&gt;UNION  UNIQUE  UNLOCK&lt;br /&gt;UNSIGNED  UPDATE  USAGE&lt;br /&gt;USE  USER_RESOURCES  USING&lt;br /&gt;UTC_DATE  UTC_TIME  UTC_TIMESTAMP&lt;br /&gt;VALUES  VARBINARY  VARCHAR&lt;br /&gt;VARCHARACTER  VARYING  WHEN&lt;br /&gt;WHERE  WHILE  WITH&lt;br /&gt;WRITE  XOR  YEAR_MONTH&lt;br /&gt;ZEROFILL&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-2256216756894719081?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/02/reserved-words-in-mysql.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-7302619385105147453</guid><pubDate>Mon, 19 Feb 2007 13:10:00 +0000</pubDate><atom:updated>2007-02-19T18:42:24.030+05:30</atom:updated><category domain='http://www.blogger.com/atom/ns#'>xhtml</category><category domain='http://www.blogger.com/atom/ns#'>dtd</category><category domain='http://www.blogger.com/atom/ns#'>xml</category><category domain='http://www.blogger.com/atom/ns#'>basic</category><category domain='http://www.blogger.com/atom/ns#'>html</category><category domain='http://www.blogger.com/atom/ns#'>xslt</category><title>What is XML, DTD and XSLT?</title><description>All these letters, abbreviations, meanings and so forth. What do they all mean and how do we use them? Here are some basics breakdown :&lt;br /&gt;&lt;br /&gt;First we will start at the top. The VERY top. SGML stands for Standard Generalized Markup Language. Simply put, it is the very root coding of coding. HTML is an application of SGML.&lt;br /&gt;&lt;br /&gt;XML is a simplified subset of SGML. It stands for eXtensible Markup Language.&lt;br /&gt;&lt;br /&gt;DTD stands for Document Type Declaration. It is a set of instructions that states what tags are usable and what (re)action they create. Each browser has a DTD set in it's programming set by the browser companies. This is how some tags will work in only one type of browser or version. It has the tags stated in it's DTD. XML makes it possible to create unique tag sets by applying it's own DTD. This makes the DTD more compatable with more browsers.&lt;br /&gt;&lt;br /&gt;XSLT stands for eXtensible Stylesheet Language Transformation. It is a strong verions of CSS that formats the XML page for viewing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-7302619385105147453?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/02/what-is-xml-dtd-and-xslt.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-2174374147860746000</guid><pubDate>Mon, 19 Feb 2007 13:09:00 +0000</pubDate><atom:updated>2007-02-19T18:40:12.378+05:30</atom:updated><category domain='http://www.blogger.com/atom/ns#'>xhtml</category><category domain='http://www.blogger.com/atom/ns#'>learn</category><category domain='http://www.blogger.com/atom/ns#'>dtd</category><category domain='http://www.blogger.com/atom/ns#'>yahoo</category><category domain='http://www.blogger.com/atom/ns#'>xml</category><category domain='http://www.blogger.com/atom/ns#'>google</category><title>XHTML</title><description>What is XHTML?&lt;br /&gt;&lt;br /&gt;    * XHTML stands for eXtensible Hyper Text Markup Language.&lt;br /&gt;    * It is aimed to replace HTML.&lt;br /&gt;    * It is almost identical to HTML 4.01&lt;br /&gt;    * It is the reformulation of HTML 4.01 as an application of XML.&lt;br /&gt;    * It is a stricter, tidier version of HTML.&lt;br /&gt;&lt;br /&gt;XHTML 1.0 is the next level of coding as specified by the W3C.&lt;br /&gt;&lt;br /&gt;XHTML is a transition / combination of HTML and XML. To change from HTML to XHTML requires just a few changes in your coding styles. The main page to check out is CONVERTING but all the others provide valuable information about this coding technique as well.&lt;br /&gt;&lt;br /&gt;XHTML provides the framework for future extensions of HTML and aims to replace HTML in the future. Some resources refer to XHTML as HTML5.&lt;br /&gt;&lt;br /&gt;XHTML 1.0 became an official W3C recommendation on January 26, 2000. A W3C recommendation means that the specification is stable, that it has been reviewed by the W3C membership, and that the specification is now a Web standard.&lt;br /&gt;&lt;br /&gt;XHTML 1.0 is the first step toward a modular and extensible web environment based on XML (eXtensible Markup Language). It provides the bridge for web designers to use a future based coding and still be able to maintain compatibility with today's browsers.&lt;br /&gt;&lt;br /&gt;SGML stands for Standard Generalized Markup Language. Simply put, it is the very root coding of coding. HTML is an application of SGML. XML is a simplified subset of SGML.&lt;br /&gt;&lt;br /&gt;DTD stands for Document Type Declaration. It is a set of instructions that states what tags are usable and what (re)action they create. Each browser has a DTD set in it's programming set by the browser companies. This is how some tags will work in only one type of browser or version. It has the tags stated in it's DTD. XML makes it possible to create unique tag sets by applying it's own DTD. This makes the DTD more compatable with more browsers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-2174374147860746000?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/02/xhtml.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-26100023.post-5365841622768917629</guid><pubDate>Sat, 17 Feb 2007 13:40:00 +0000</pubDate><atom:updated>2007-02-17T19:21:29.112+05:30</atom:updated><category domain='http://www.blogger.com/atom/ns#'>mp3info</category><category domain='http://www.blogger.com/atom/ns#'>64bit</category><category domain='http://www.blogger.com/atom/ns#'>patch</category><title>ruby-mp3info gem patch</title><description>IF you are using the gem "ruby-mp3info", it will work well in windows. but in linux, it wont. Coz mp3info will throw errors on 64 bit versions of Ruby.&lt;br /&gt;&lt;br /&gt;To clear this problem, you have to apply the following patch which allows mp3info to work on 64 bit versions of Ruby...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Remove the NumericBits module from extension_modules.rb.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Remove "head.extend(NumericBits)" from mp3info.rb&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Add this to the top of mp3info.rb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;-class Bignum&lt;br /&gt;-   def bits(b, a)&lt;br /&gt;-      t = 0&lt;br /&gt;-      b.downto(a){ |i| t += t + self[i] }&lt;br /&gt;-      t&lt;br /&gt;-   end&lt;br /&gt;-end&lt;br /&gt;&lt;br /&gt;And the most important point is&lt;br /&gt;&lt;br /&gt;you have to include "rubygems" while including "mp3info"&lt;br /&gt;like this&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;require "rubygems"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;require "mp3info"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;otherwise it will throw "no such file to load" error....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26100023-5365841622768917629?l=thinkingrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://thinkingrails.blogspot.com/2007/02/ruby-mp3info-gem-patch.html</link><author>noreply@blogger.com (Arunkumar)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item></channel></rss>