<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0QGQ3o-fip7ImA9WhRaFE0.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027</id><updated>2012-02-16T06:08:42.456-08:00</updated><category term="Ruby methods" /><category term="Rufus scheduler" /><category term="Apache" /><category term="GIT" /><category term="General" /><category term="Active record" /><category term="Rake tasks" /><category term="Rails" /><category term="SQL server" /><title>Open source is wide open</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://railsblogger.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/railsblogger" /><feedburner:info uri="railsblogger" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;A0QFSXY4cCp7ImA9WxBTEUU.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-2608054353807510443</id><published>2009-12-07T04:31:00.001-08:00</published><updated>2009-12-07T04:35:18.838-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-07T04:35:18.838-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Rails" /><title>REST in RAILS Snapshot</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fOanu7lJM9I/Sxz177ZXhvI/AAAAAAAACo0/ZsHgHGpu6Lg/s1600-h/REST3.bmp"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 183px;" src="http://1.bp.blogspot.com/_fOanu7lJM9I/Sxz177ZXhvI/AAAAAAAACo0/ZsHgHGpu6Lg/s320/REST3.bmp" border="0" alt=""id="BLOGGER_PHOTO_ID_5412471262097671922" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fOanu7lJM9I/Sxz13pYG9GI/AAAAAAAACos/Dgbe16PhW2I/s1600-h/REST2.bmp"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 183px;" src="http://3.bp.blogspot.com/_fOanu7lJM9I/Sxz13pYG9GI/AAAAAAAACos/Dgbe16PhW2I/s320/REST2.bmp" border="0" alt=""id="BLOGGER_PHOTO_ID_5412471188541076578" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fOanu7lJM9I/Sxz1ypz-orI/AAAAAAAACok/bgJgR_LPRxU/s1600-h/REST1.bmp"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 183px;" src="http://3.bp.blogspot.com/_fOanu7lJM9I/Sxz1ypz-orI/AAAAAAAACok/bgJgR_LPRxU/s320/REST1.bmp" border="0" alt=""id="BLOGGER_PHOTO_ID_5412471102758625970" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-2608054353807510443?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/cy5R0OTVpBE" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/2608054353807510443?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/2608054353807510443?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/cy5R0OTVpBE/rest-in-rails-sanpshot.html" title="REST in RAILS Snapshot" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_fOanu7lJM9I/Sxz177ZXhvI/AAAAAAAACo0/ZsHgHGpu6Lg/s72-c/REST3.bmp" height="72" width="72" /><feedburner:origLink>http://railsblogger.blogspot.com/2009/12/rest-in-rails-sanpshot.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UCQXg7eCp7ImA9WxBTE0k.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-9062252019548559952</id><published>2009-12-02T05:05:00.000-08:00</published><updated>2009-12-08T22:47:40.600-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-08T22:47:40.600-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="General" /><title>Useful links</title><content type="html">Links that are really helpful in getting clear view abt rails concepts.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&gt;&gt; &lt;a href="http://asciicasts.com/episodes/154-polymorphic-association"&gt;Nice explanation about polymorphic relations.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&gt;&gt; &lt;a href="http://asciicasts.com/episodes/181-include-vs-joins"&gt;Joins vs Include&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&gt;&gt; &lt;a href="http://www.b-simple.de/download/restful_rails_en.pdf"&gt;A Basic guide for REST in rails&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&gt;&gt; &lt;a href="http://blog.hasmanythrough.com/2006/4/20/many-to-many-dance-off"&gt;has_many :through VS HABTM&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&gt;&gt; &lt;a href="http://railsforum.com/viewtopic.php?id=682"&gt;creating plugins in rails&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-9062252019548559952?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/-9Lya8pcXCw" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/9062252019548559952?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/9062252019548559952?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/-9Lya8pcXCw/useful-links.html" title="Useful links" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><feedburner:origLink>http://railsblogger.blogspot.com/2009/12/useful-links.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0INSXozcCp7ImA9WxNaEk0.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-1734718292898076832</id><published>2009-11-25T05:05:00.000-08:00</published><updated>2009-11-25T20:26:38.488-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-25T20:26:38.488-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="General" /><title>Detect Firebug using javascript</title><content type="html">Firefox users with &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/1843"&gt;FIREBUG&lt;/a&gt; add on, would have often seen messages stating "Firebug is known to make Google Mail slow unless it is configured correctly". &lt;br /&gt;&lt;br /&gt;Firebug detection can be implemented using javascript &lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;if (window.console &amp;&amp; window.console.firebug) &lt;br /&gt;{&lt;br /&gt;  alert(window.console.firebug);&lt;br /&gt;}&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Windows.console.firebug will return the version of firebug.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-1734718292898076832?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/ff_EW5EymUw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/1734718292898076832/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=1734718292898076832" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/1734718292898076832?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/1734718292898076832?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/ff_EW5EymUw/detect-firebug.html" title="Detect Firebug using javascript" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/11/detect-firebug.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUDQ3YycCp7ImA9WxJaGU0.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-8852211474328575506</id><published>2009-08-09T23:23:00.000-07:00</published><updated>2009-08-10T05:44:32.898-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-10T05:44:32.898-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Rails" /><title>Production log analyzer - RAWK</title><content type="html">Performance tuning and code optimization are vital for any application.&lt;br /&gt;&lt;br /&gt;The hardest thing to do is to identify the parts of application that are sluggish. Once identified - they need to be optimized with care (be careful not to break present business logic in the process of optimization...... This is were test cases comes for rescue)&lt;br /&gt;&lt;br /&gt;One of the simplest but powerful tool that I came across is ( &lt;a href="http://railscasts.com/episodes/97-analyzing-the-production-log"&gt;REFERENCE&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Installation&lt;/span&gt; : None......... There is no installation, you just have to copy the RAWK.rb file ( &lt;a href="http://ckhsponge.wordpress.com/2006/10/11/ruby-on-rails-log-analyzer-rawk/"&gt;SOURCE&lt;/a&gt;) and pass the log file you want to process.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Usage&lt;/span&gt; :  ruby rawk.rb &lt; production.log&lt;br /&gt;&lt;br /&gt;This will list out the entire report, detailing the request action, MIN &amp;amp; MAX rendering times etc.&lt;br /&gt;&lt;br /&gt;Most importantly RAWK is very fast.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-8852211474328575506?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/YyM7RufLYAw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/8852211474328575506/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=8852211474328575506" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/8852211474328575506?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/8852211474328575506?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/YyM7RufLYAw/production-log-analyzer-rawk.html" title="Production log analyzer - RAWK" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/08/production-log-analyzer-rawk.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMGSHk6fip7ImA9WxBTEko.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-294465887363542758</id><published>2009-06-27T00:40:00.000-07:00</published><updated>2009-12-08T05:20:29.716-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-08T05:20:29.716-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Rails" /><title>Rails 2.x substantials</title><content type="html">&gt;&gt; New template naming syntax.&lt;br /&gt;action.type.renderer&lt;br /&gt; .rhtml &gt; .html.erb&lt;br /&gt; .rjs   &gt; .js.rjs&lt;br /&gt; .rxml  &gt; .xml.builder&lt;br /&gt; .haml  &gt; .html.haml &lt;br /&gt;&lt;br /&gt;&gt;&gt; Sexy Migrations&lt;br /&gt;&lt;br /&gt;&gt;&gt; rake routes&lt;br /&gt;Lists all routes defined for your application&lt;br /&gt;&lt;br /&gt;&gt;&gt; rake db:migrate:reset&lt;br /&gt;This will drop the database and will create the database.&lt;br /&gt;&lt;br /&gt;&gt;&gt; rake db:migrate:redo &lt;br /&gt;rollback one migration and migrate back up. If you need to go further than one step back pass the STEP=x parameter (rake db:migrate:redo STEP=X)&lt;br /&gt;&lt;br /&gt;&gt;&gt; &lt;a href="http://ruby.about.com/b/2008/10/30/new-in-rails-22-connection-pooling.htm"&gt;Connection Pooling&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&gt;&gt; Deprecations &lt;br /&gt;• find(:all) not find_all&lt;br /&gt;• form_for not form_tag&lt;br /&gt;• pagination is gone&lt;br /&gt;&lt;br /&gt;&gt;&gt; Active Record validation :allow_blank&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;validates_length_of :name, :maximum =&gt; 15, :allow_blank =&gt; true&lt;br /&gt;user = User.new(:name =&gt; "")&lt;br /&gt;user.valid?  #=&gt; true&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&gt;&gt; Commercial DB's out of rails core, available as gems&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;gem install activerecord-oracle-adapter&lt;br /&gt;gem install activerecord-sqlserver-adapter&lt;br /&gt;gem install activerecord-firebird-adapter&lt;br /&gt;gem install activerecord-frontbase-adapter&lt;br /&gt;gem install activerecord-openbase-adapter&lt;br /&gt;gem install activerecord-sybase-adapter&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&gt;&gt; Partials can have their own layouts&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;&lt;%= render :partial =&gt; 'user_info', :layout =&gt; 'boxed', :locals =&gt; {:user =&gt; @user} %&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&gt;&gt; Accessing helper&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;class ApplicationController &lt; ActionController::Base&lt;br /&gt;  # Our many helpers that need to be available throughout the app&lt;br /&gt;  [:formatting, :highlighting, :i18n].each { |h| helper h }  ...&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;class ApplicationController &lt; ActionController::Base&lt;br /&gt;  # Make all helpers in app/helpers/**/ available&lt;br /&gt;  helper :all  ...&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&gt;&gt; Cookie based session are the new Default session store &lt;br /&gt;Previously it was file based session store&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-294465887363542758?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/FUueiiGR8qE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/294465887363542758/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=294465887363542758" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/294465887363542758?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/294465887363542758?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/FUueiiGR8qE/rails-2-substantials.html" title="Rails 2.x substantials" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/06/rails-2-substantials.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQMQHs6cCp7ImA9WxVaEUU.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-4621777501451416707</id><published>2009-04-08T02:17:00.000-07:00</published><updated>2009-04-08T02:36:21.518-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-08T02:36:21.518-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="GIT" /><title>GIT Warning: LF will be replaced by CRLF</title><content type="html">I am using msysgit on windows 2000&lt;br /&gt;&lt;br /&gt;After setting up the repository and when I tried to add files to GIT index (inorder to have my files considered for next commit) ........ I got&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Warning: LF will be replaced by CRLF in &lt;filename style="font-weight: bold;"&gt;&lt;/filename&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;FILENAME&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After googling I found this a default GIT setting and can be overridden by issuing&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;git config core.autocrlf false&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;in Bash mode&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A note on LF &amp;amp; CRLF&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Most Unix operating systems represent the end of each line with a line feed (LF) character. However, the Windows operating system represent the end of line with both a carriage return (CR) and a LF.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-4621777501451416707?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/HpElHPjivwk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/4621777501451416707/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=4621777501451416707" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/4621777501451416707?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/4621777501451416707?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/HpElHPjivwk/git-warning-lf-will-be-replaced-by-crlf.html" title="GIT Warning: LF will be replaced by CRLF" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>7</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/04/git-warning-lf-will-be-replaced-by-crlf.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEANQXk9eip7ImA9WxVaEUU.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-7417716048207789297</id><published>2009-04-06T23:52:00.000-07:00</published><updated>2009-04-08T03:33:10.762-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-08T03:33:10.762-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="GIT" /><title>Git on windows - Basics</title><content type="html">GIT has now become the preferred source code management tool for Rails community. GIT is at its best when used in  Linux / Mac platforms, here we will see how this can be used in Windows. GIT still has few issues in windows but the basic functionalities should work fine.&lt;br /&gt;&lt;br /&gt;GIT for windows can be downloaded from &lt;a href="http://code.google.com/p/msysgit/"&gt;Google&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There some good links detailing the installation steps&lt;br /&gt;&lt;br /&gt;&gt; &lt;a href="http://beans.seartipy.com/2008/12/09/setting-up-ruby-on-rails-projects-with-git-and-github/"&gt;Using SSH &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&gt; &lt;a href="http://nathanj.github.com/gitguide/tour.html"&gt;Using PuTTY &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Follow the above links to finish installation.&lt;br /&gt;&lt;br /&gt;Once done with this we  are ready to start using GIT as SCM tool.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Getting started&lt;/span&gt; - To start GIT bash Right click on your project directory and select 'Git Bash Here' ( if you are a fan of typing commands or else use GUI  option)&lt;br /&gt;&lt;br /&gt;This will open a CMD window, start by typing 'git help'&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fOanu7lJM9I/SdnojK-SsmI/AAAAAAAACZ0/DTgiSfgM2l4/s1600-h/git_help.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 177px;" src="http://2.bp.blogspot.com/_fOanu7lJM9I/SdnojK-SsmI/AAAAAAAACZ0/DTgiSfgM2l4/s320/git_help.bmp" alt="" id="BLOGGER_PHOTO_ID_5321540125653643874" border="0" /&gt;&lt;/a&gt; &lt;span style="font-weight: bold;"&gt;Create Git repository&lt;/span&gt; - to create a git repo. for your project type - &lt;span style="font-weight: bold;"&gt;git init&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fOanu7lJM9I/SdnsS187yuI/AAAAAAAACaM/Mhk6a0ySe_4/s1600-h/git_init.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 39px;" src="http://2.bp.blogspot.com/_fOanu7lJM9I/SdnsS187yuI/AAAAAAAACaM/Mhk6a0ySe_4/s320/git_init.bmp" alt="" id="BLOGGER_PHOTO_ID_5321544243179408098" border="0" /&gt;&lt;/a&gt;I don't want to reinvent the wheel, so just providing a list of useful links which has very good articles on GIT usage.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Useful links&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&gt; &lt;a href="http://github.com/guides/home"&gt;Github&lt;/a&gt;&lt;br /&gt;&gt; &lt;a href="http://nathanj.github.com/gitguide/"&gt;User guide&lt;/a&gt;&lt;br /&gt;&gt; &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/"&gt;GIT commands&lt;/a&gt;&lt;br /&gt;&gt; &lt;a href="http://blog.codeslower.com/2008/8/Using-PuTTY-and-SSL-to-securely-access-GitHub-repositories-via-SSH"&gt;Access issue&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-7417716048207789297?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/UcOaoxtCZn4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/7417716048207789297/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=7417716048207789297" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/7417716048207789297?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/7417716048207789297?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/UcOaoxtCZn4/git-in-windows-basics.html" title="Git on windows - Basics" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_fOanu7lJM9I/SdnojK-SsmI/AAAAAAAACZ0/DTgiSfgM2l4/s72-c/git_help.bmp" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/03/git-in-windows-basics.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEHR3o-eip7ImA9WxNbFEg.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-3419801651393360641</id><published>2009-04-05T23:52:00.000-07:00</published><updated>2009-11-17T02:43:56.452-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-17T02:43:56.452-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Ruby methods" /><title>Nice output for Ruby objects</title><content type="html">Ruby has a wide range of methods to format the output of an object.&lt;br /&gt;&lt;br /&gt;Like&lt;br /&gt;&lt;br /&gt;1) Inspect&lt;br /&gt;2)  y or to_yaml&lt;br /&gt;3)  PrettyPrint&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;y&lt;/span&gt; is actually used as a shorthand for &lt;span style="font-weight: bold;"&gt;to_yaml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;example&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;a={'1'=&gt;'one','2'=&gt;'two','3'=&gt;'three','4'=&gt;'four'}&lt;br /&gt;&lt;br /&gt;y a&lt;br /&gt;&lt;br /&gt;puts a.to_yaml&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;generates the same output.&lt;br /&gt;&lt;br /&gt;Below are the ouputs using different output methods&lt;br /&gt;&lt;br /&gt;&gt; &lt;span style="font-weight: bold;"&gt;Using normal puts&lt;/span&gt;&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;usage: puts a&lt;br /&gt;&lt;br /&gt;output:&lt;br /&gt;&lt;br /&gt;1one2two3three4four&lt;br /&gt;&lt;br /&gt;Using y or to_yaml&lt;br /&gt;&lt;br /&gt;usage: y a or puts a.to_yaml&lt;br /&gt;&lt;br /&gt;output:&lt;br /&gt;&lt;br /&gt;"1": one&lt;br /&gt;"2": two&lt;br /&gt;"3": three&lt;br /&gt;"4": four&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&gt; &lt;span style="font-weight: bold;"&gt;Using PrettyPrint&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;usage: Please do a require 'pp' in your script file,&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;pp a&lt;br /&gt;&lt;br /&gt;output:&lt;br /&gt;&lt;br /&gt;{"1"=&gt;"one", "2"=&gt;"two", "3"=&gt;"three", "4"=&gt;"four"}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&gt; Using inspect&lt;/span&gt;&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;usage: puts a.inspect&lt;br /&gt;&lt;br /&gt;output:&lt;br /&gt;&lt;br /&gt;{"1"=&gt;"one", "2"=&gt;"two", "3"=&gt;"three", "4"=&gt;"four"}&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/1018755780270535027-3419801651393360641?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/0Wid7O45rwg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/3419801651393360641/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=3419801651393360641" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/3419801651393360641?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/3419801651393360641?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/0Wid7O45rwg/nice-output-for-ruby-objects.html" title="Nice output for Ruby objects" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/04/nice-output-for-ruby-objects.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8ASXkyfip7ImA9WxNbFEg.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-7197792924052901847</id><published>2009-04-02T23:50:00.000-07:00</published><updated>2009-11-17T02:47:28.796-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-17T02:47:28.796-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Ruby methods" /><title>Ruby - DUP vs CLONE</title><content type="html">Both&lt;span style="font-weight: bold;"&gt; DUP&lt;/span&gt; &amp;amp; &lt;span style="font-weight: bold;"&gt;CLONE&lt;/span&gt; can be used to create shallow copy of an object. Both copies the instance variables of &lt;i class="obj"&gt;obj&lt;/i&gt;. But we need to be selective in their usage.&lt;br /&gt;&lt;br /&gt;Few difference between these are&lt;br /&gt;&lt;br /&gt;1) &lt;span style="font-weight: bold;"&gt;CLONE&lt;/span&gt; copies both&lt;span style="font-weight: bold;"&gt; FROZEN&lt;/span&gt; and &lt;a href="http://phrogz.net/ProgrammingRuby/taint.html#lockingrubyinthesafe"&gt;&lt;span style="font-weight: bold;"&gt;TAINTED&lt;/span&gt; &lt;/a&gt;state of an object, where as&lt;span style="font-weight: bold;"&gt; DUP&lt;/span&gt; only copies TAINTED state of an object.&lt;br /&gt;&lt;br /&gt;2) With &lt;span style="font-weight: bold;"&gt;CLONE&lt;/span&gt; you can copy any singleton methods of an object but&lt;span style="font-weight: bold;"&gt; DUP&lt;/span&gt; does not support this.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CLONE&lt;/span&gt; is used to duplicate an object, including its internal state, &lt;span style="font-weight: bold;"&gt;DUP&lt;/span&gt; typically uses the class of the descendent object to create the new instance.&lt;br /&gt;&lt;br /&gt;I had some bitter experience while using DUP for duplicating an ActiveRecord row, this ended up in losing the original one the same worked fine with CLONE.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A good article on Objects states can be found &lt;a href="http://phrogz.net/ProgrammingRuby/ref_c_object.html#Object.dup"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Frozen state: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The object can not be modified any more.&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;a = [ "a", "b", "c" ]&lt;br /&gt;a.freeze&lt;br /&gt;a &lt;&lt; "z"&lt;br /&gt;&lt;br /&gt;Will return&lt;br /&gt;&lt;br /&gt;`&lt;&lt;': can't modify frozen array &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/1018755780270535027-7197792924052901847?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/cBK8ni8O69A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/7197792924052901847/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=7197792924052901847" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/7197792924052901847?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/7197792924052901847?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/cBK8ni8O69A/ruby-dup-vs-clone.html" title="Ruby - DUP vs CLONE" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/03/ruby-dup-vs-clone.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cESXYzeip7ImA9WxNbFEg.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-1494104547437942388</id><published>2009-03-27T06:11:00.000-07:00</published><updated>2009-11-17T02:50:08.882-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-17T02:50:08.882-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Active record" /><title>Duplicating Activerecord record</title><content type="html">Was trying to copy an existing DB record  by using&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;parent_record = User.find(1)&lt;br /&gt;&lt;br /&gt;new_user = User.new(parent_record)&lt;br /&gt;&lt;br /&gt;new_user.name = 'new_name'&lt;br /&gt;&lt;br /&gt;new_user.save&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;But this ended in throwing&lt;span style="font-weight: bold;"&gt; stringify_keys error for User&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This can done by specifying&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;new_user = User.new(parent_record.attributes)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-1494104547437942388?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/RiJdez_7ydk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/1494104547437942388/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=1494104547437942388" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/1494104547437942388?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/1494104547437942388?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/RiJdez_7ydk/duplicating-activerecord-record.html" title="Duplicating Activerecord record" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/03/duplicating-activerecord-record.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEGRHc9cSp7ImA9WxVaEUU.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-2675997007600140100</id><published>2009-03-25T03:24:00.000-07:00</published><updated>2009-04-08T02:40:25.969-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-08T02:40:25.969-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Ruby methods" /><title>Binary conversion in Ruby</title><content type="html">We hardly stretch ourselves to limit unless situation demands to do so.&lt;br /&gt;&lt;br /&gt;My requirement  - convert a decimal to binary conversion&lt;br /&gt;&lt;br /&gt;My first impression - there would be a to_b default method available in ruby which I can use straight away. But it was not so.&lt;br /&gt;&lt;br /&gt;But as always it is quite simple to do it in ruby,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;number.to_s(2) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;gives the binary equivalent of the number&lt;br /&gt;&lt;br /&gt;try this from ur IRB&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3.to_s(2)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;similarly for any base conversion  just pass the base value to &lt;span style="font-weight: bold;"&gt;to_s&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;3.to_s(10)  for base 10 conversion.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-2675997007600140100?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/ZzDJTmL0kD4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/2675997007600140100/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=2675997007600140100" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/2675997007600140100?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/2675997007600140100?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/ZzDJTmL0kD4/binary-conversion-in-ruby.html" title="Binary conversion in Ruby" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/03/binary-conversion-in-ruby.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YMQ384eyp7ImA9WxNbFEg.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-1470607996178526110</id><published>2009-03-16T16:13:00.000-07:00</published><updated>2009-11-17T02:53:02.133-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-17T02:53:02.133-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL server" /><title>Database log file size issue</title><content type="html">Recently I faced a problem where my SQLServer 2005 ran out of space for log files. Usually the log files can be reduced by shrinking them but this time the transaction logs were so much huge that I was not even allowed to run shrink log command.&lt;br /&gt;&lt;br /&gt;My DB was in Recovery phase.&lt;br /&gt;&lt;br /&gt;My friend &lt;span style="font-weight: bold;"&gt;Dagupati&lt;/span&gt; ( a professional DBA ) helped me getting out of this trouble.&lt;br /&gt;&lt;br /&gt;Following are the steps to be followed in sequence to achieve this.&lt;br /&gt;&lt;br /&gt;1) Take the DB into emergency mode.&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;&lt;pre style="margin-top: 0pt;" id="pre0"&gt;ALTER DATABASE yourDBname SET EMERGENCY&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;2) Bring DB to single user mode.&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;&lt;pre style="margin-top: 0pt;" id="pre0"&gt;ALTER DATABASE yourDBname SET SINGLE_USER&lt;br /&gt;&lt;br /&gt;3)Repair you DB&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;&lt;pre style="margin-top: 0pt;" id="pre0"&gt;DBCC CheckDB (&lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;yourDBname'&lt;/span&gt;, REPAIR_REBUILD)&lt;br /&gt;&lt;br /&gt;if the above command fails, try this&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;&lt;pre style="margin-top: 0pt;" id="pre0"&gt;DBCC CheckDB (&lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;yourDBname'&lt;/span&gt;, REPAIR_ALLOW_DATA_LOSS)&lt;br /&gt;&lt;br /&gt;NOTE : This may result in dataloss&lt;br /&gt;&lt;br /&gt;4) Bring you DB to multi user mode&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;&lt;pre style="margin-top: 0pt;" id="pre0"&gt;ALTER DATABASE yourDBname SET MULTI_USER&lt;br /&gt;&lt;br /&gt;By now you should have your DB up &amp;amp; running.&lt;br /&gt;&lt;br /&gt;DB at times enter into SUSPECT mode - restarting server should solve them if not follow the above steps.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;To be on safer side take full / transactional backups regularly&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-1470607996178526110?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/VAA6zTly-VE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/1470607996178526110/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=1470607996178526110" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/1470607996178526110?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/1470607996178526110?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/VAA6zTly-VE/database-log-file-size-issue.html" title="Database log file size issue" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/03/database-log-file-size-issue.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QNQXk7eip7ImA9WxNbFEg.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-4739624024582287374</id><published>2009-03-16T15:57:00.000-07:00</published><updated>2009-11-17T02:56:30.702-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-17T02:56:30.702-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Active record" /><title>Handel database NULL values in rails</title><content type="html">I was in the impression that rails takes care of&lt;br /&gt;&lt;br /&gt;1)  nil to NULL when inserting, and&lt;br /&gt;&lt;br /&gt;2) NULL to nil while fetching records through Active record&lt;br /&gt;&lt;br /&gt;But this proved wrong when my application running in SQL server 2005 fails to detect database NULL fetched from DB.&lt;br /&gt;&lt;br /&gt;The fetched value was not even caught by blank? method.&lt;br /&gt;&lt;br /&gt;Found this &lt;a href="http://thisoldcoder.com/"&gt;article&lt;/a&gt; while googling  on this issue, this more or less matched the problem I was facing.&lt;br /&gt;&lt;br /&gt;I tried it and was successful.&lt;br /&gt;&lt;br /&gt;I am providing a snapshot of the article&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;ActiveRecord::Base.class_eval do&lt;br /&gt; def attributes_from_column_definition_with_null_fix&lt;br /&gt;returning attributes = attributes_from_column_definition_without_null_fix do&lt;br /&gt;attributes.each_value { |value| value.replace('') if value == 'NULL' }&lt;br /&gt;   end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;alias_method_chain :attributes_from_column_definition, :null_fix&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This helped me in dealing with DB NULL values. Certainly without this article it would have been a tough going to find a way around for this issue ;).&lt;br /&gt;&lt;br /&gt;Have also made a thread for this in &lt;a href="http://www.workingwithrails.com/forums/4-ask-a-rails-expert/topics/681-database-null-values"&gt;&lt;span style="font-weight: bold;"&gt;WorkingWithRails&lt;/span&gt;&lt;/a&gt;, just to make sure the fix is valid and to get expert comments on the fix.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-4739624024582287374?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/RaVbNAxFPOg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/4739624024582287374/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=4739624024582287374" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/4739624024582287374?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/4739624024582287374?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/RaVbNAxFPOg/handel-database-null-values-in-rails.html" title="Handel database NULL values in rails" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/03/handel-database-null-values-in-rails.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IGR34_fCp7ImA9WxNbFEg.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-6206200112524437816</id><published>2009-03-15T20:16:00.000-07:00</published><updated>2009-11-17T02:58:46.044-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-17T02:58:46.044-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Rake tasks" /><title>Calling RAKE tasks</title><content type="html">The syntax for calling a Rake task within rails env,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Rake::Task[TASK_NAME].invoke&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you need to call a rake task from a standalone ruby script, then do remember to include 'rake' files.&lt;br /&gt;&lt;br /&gt;Bellow I have provided an usage on how to call a RAKE task from a rufus scheduler script.&lt;br /&gt;&lt;br /&gt;My scheduler script is placed inside /lib folder&lt;br /&gt;&lt;br /&gt;Also the script will fail to locate your rake task if  just call a RAKE method without loading the RAKE  file ( the .rake file in which you have your tasks defined ).&lt;br /&gt;&lt;br /&gt;So, make sure you load your rake task files.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;USAGE&lt;/span&gt;&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;require 'rubygems'&lt;br /&gt;require 'rake'&lt;br /&gt;require 'rufus/scheduler'&lt;br /&gt;&lt;br /&gt;load File.join( RAILS_ROOT, 'lib', &lt;br /&gt;'tasks', 'my_task.rake')&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;scheduler = Rufus::Scheduler.start_new&lt;br /&gt;&lt;br /&gt;scheduler.cron("0 17 * * 0") do&lt;br /&gt;Rake::Task["maintenance:delete_order_files"].invoke&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This when triggered will call 'delete_order_files' task defined in a .rake file called MY_TASK.RAKE having namespace 'MAINTENANCE'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-6206200112524437816?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/pEM_uAaKI-U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/6206200112524437816/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=6206200112524437816" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/6206200112524437816?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/6206200112524437816?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/pEM_uAaKI-U/in-queue_15.html" title="Calling RAKE tasks" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/03/in-queue_15.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQCSX49eyp7ImA9WxNbFEg.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-8286416473193796123</id><published>2009-03-09T06:46:00.000-07:00</published><updated>2009-11-17T02:39:28.063-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-17T02:39:28.063-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Rufus scheduler" /><title>Schedule using Rufus scheduler</title><content type="html">We learned how to create Rake tasks in rails app. Next thing in process will be scheduling these tasks.&lt;br /&gt;&lt;br /&gt;I opted for Rufu-Scheduler, mainly bcs it is quite simple to implement/configure&lt;br /&gt;&lt;br /&gt;You can download the gem directly from  &lt;span style="text-decoration: underline;"&gt;: http://gems.rubyforge.vm.bytemark.co.uk/gems/&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;There some good resources in net which describes usage of Rufus scheduler.&lt;br /&gt;&lt;br /&gt;Like &lt;span style="text-decoration: underline;"&gt;:http://rufus.rubyforge.org/rufus-scheduler/&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;But some how I got myself into trouble in getting this to working ;(&lt;br /&gt;&lt;br /&gt;Following are questions that bubbled in my mind while implementing Rufus.&lt;br /&gt;&lt;br /&gt;&gt;&gt; Where  do I put the scheduler code?&lt;br /&gt;&lt;br /&gt;&gt;&gt;  How will rails trigger my tasks, do I need to include something in my config. file?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I created a file in my /lib dir named myscheduler.rb, this contains the scheduler code and inorder to allow rails to load your rufus scheduler, you have to do&lt;br /&gt;&lt;br /&gt;require ' myscheduler'&lt;br /&gt;&lt;br /&gt;in environment.rb&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;My myscheduler.rb has&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;  &lt;br /&gt;require 'rubygems'&lt;br /&gt;require 'rake'&lt;br /&gt;require 'rufus/scheduler'&lt;br /&gt;load File.join( RAILS_ROOT, 'lib', &lt;br /&gt;'tasks', 'mytasks.rake')&lt;br /&gt;&lt;br /&gt;# Note include file containing your rake tasks&lt;br /&gt;# Else you will get - Don’t know how to build &lt;br /&gt;#task XXXXX’ error for the tasks you &lt;br /&gt;#have defined&lt;br /&gt;&lt;br /&gt;scheduler = Rufus::Scheduler.start_new&lt;br /&gt;&lt;br /&gt;scheduler.every("1m") do&lt;br /&gt;puts "Scheduler invoked"&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;restart the server and check for 'Scheduler invoked' in your CMD.&lt;br /&gt;&lt;br /&gt;Got it ......... your half done with your scheduling, take a break ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-8286416473193796123?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/KhNolGhrtv0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/8286416473193796123/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=8286416473193796123" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/8286416473193796123?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/8286416473193796123?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/KhNolGhrtv0/in-queue.html" title="Schedule using Rufus scheduler" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/03/in-queue.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ABRXg9fCp7ImA9WxNbFEg.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-1958308048382627985</id><published>2009-02-18T22:40:00.000-08:00</published><updated>2009-11-17T03:02:34.664-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-17T03:02:34.664-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Rake tasks" /><title>Raking in rails</title><content type="html">Rake tasks are one of the most power but still under utilized part in rails.&lt;br /&gt;&lt;br /&gt;Building rake tasks makes in much easier for manual execution of scripts and plays a big role when scheduling a job.&lt;br /&gt;&lt;br /&gt;We might have taken the command 'rake db:migrate' lightly, but it is the time to explore the components behind this.&lt;br /&gt;&lt;br /&gt;'Rake --tasks ' lists the available tasks that can be performed by rake&lt;br /&gt;&lt;br /&gt;We can create our now Rake tasks by creating .rake files in side lib/tasks dir in rails app.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Introducing NAMESPACE and TASK&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;TASK&lt;/span&gt; : This block defines what actually you want your ruby code to perform.&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;task :my_first_rake_task do&lt;br /&gt;&lt;br /&gt;puts "This is my first rake code"&lt;br /&gt;&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;save this sample code in lib/tasks with any name ( with rake ext. )&lt;br /&gt;&lt;br /&gt;Now, in cmd run 'rake my_first_rake_task'&lt;br /&gt;&lt;br /&gt;...... existed!?? theres still more......&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NAMESPACE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To manage your tasks in a better/ logical way you can bind them to a NAMESPACE&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;USAGE&lt;/span&gt;&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;namespace :test do&lt;br /&gt;task :my_first_rake_task do&lt;br /&gt;&lt;br /&gt;   puts "This is my first rake code"&lt;br /&gt;&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;in CMD run rake test:my_first_rake_task&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now that you have learned how to create a rake task, Next question is ........ how to give description for the task you have created????&lt;br /&gt;&lt;br /&gt;simple...&lt;br /&gt;&lt;br /&gt;use &lt;span style="font-weight: bold;"&gt;desc&lt;/span&gt;&lt;br /&gt;&lt;pre name="code" class="ruby"&gt; &lt;br /&gt;namespace :test do&lt;br /&gt;desc "This is a simple example to show the usage of rake tasks in rails"&lt;br /&gt;task :my_first_rake_task do&lt;br /&gt;&lt;br /&gt;    puts "This is my first rake code"&lt;br /&gt;&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In CMD type RAKE --tasks&lt;br /&gt;&lt;br /&gt;one of the entry in the list will be&lt;br /&gt;&lt;br /&gt;rake test:my_first_rake_task   #This is a simple example to show the usage of rake tasks in rails&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-1958308048382627985?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/A4WoodPzuVM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/1958308048382627985/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=1958308048382627985" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/1958308048382627985?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/1958308048382627985?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/A4WoodPzuVM/raking-in-rails.html" title="Raking in rails" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/02/raking-in-rails.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4CRn84eyp7ImA9WxVaEUU.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-6593947599806975019</id><published>2009-01-28T23:53:00.000-08:00</published><updated>2009-04-08T02:46:07.133-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-08T02:46:07.133-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Rails" /><title>Ungenerate Stuffs in rails</title><content type="html">Rails 'generators' makes it quite easy to create basic model, controller, helper &amp;amp; test skeleton  files&lt;br /&gt;&lt;br /&gt;But lately I found that it is equally easy to clear files created by generator by using DESTROY.&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;ruby script/destroy controller XXXX&lt;br /&gt;&lt;br /&gt;Will remove all files dumped by rails for command ruby script/generate controller XXXX&lt;br /&gt;&lt;br /&gt;ruby script/destroy scaffold XXXX&lt;br /&gt;&lt;br /&gt;Will remove all files dumped by rails for command ruby script/generate scaffold XXXX&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-6593947599806975019?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/4pvoTOtd1GQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/6593947599806975019/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=6593947599806975019" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/6593947599806975019?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/6593947599806975019?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/4pvoTOtd1GQ/ungenerate-stuffs-in-rails.html" title="Ungenerate Stuffs in rails" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2009/01/ungenerate-stuffs-in-rails.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYNQX86eCp7ImA9WxVaEUU.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-7964533415598338449</id><published>2008-12-23T00:25:00.000-08:00</published><updated>2009-04-08T02:49:50.110-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-08T02:49:50.110-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="General" /><title>NET HELPMSG</title><content type="html">&lt;p&gt;To provide help with a Windows error message (Typically the 4    digit number from the Event Viewer system log)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Type the following in a command prompt&lt;br /&gt;&lt;/p&gt; &lt;blockquote&gt;   &lt;p&gt;NET HELPMSG message#&lt;br /&gt; e.g.&lt;br /&gt; NET HELPMSG 2184 &lt;/p&gt; &lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-7964533415598338449?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/rsuMPRxUpuM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/7964533415598338449/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=7964533415598338449" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/7964533415598338449?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/7964533415598338449?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/rsuMPRxUpuM/net-helpmsg.html" title="NET HELPMSG" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2008/12/net-helpmsg.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUADR3wzeSp7ImA9WxVaEUU.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-1121629505242909849</id><published>2008-12-16T05:23:00.000-08:00</published><updated>2009-04-08T02:42:56.281-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-08T02:42:56.281-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL server" /><title>Rare issue while deleting full text catalog in SQL server 2005</title><content type="html">select * from sysfulltextcatalogs&lt;br /&gt;&lt;br /&gt;This Lists all the full text catalogs present for the selected table. This table contains the catalog name and the path where these are physically stored.&lt;br /&gt;&lt;br /&gt;In case of broken index or to delete a catalog after restoring database form an external source, update the path to a physical drive present in server. ( These steps to be followed only when the there is mismatch of catalog path in the new server or the SUBST command has failed )&lt;br /&gt;&lt;br /&gt;update dbo.sysfulltextcatalogs set path='D:\Full Text Catalog' where ftcatid=X&lt;br /&gt;&lt;br /&gt;by default update on sysfulltextcatalogs table is disabled, run the following script to enable this.&lt;br /&gt;&lt;br /&gt;exec sp_configure 'allow updates',1&lt;br /&gt;go&lt;br /&gt;reconfigure with override&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-1121629505242909849?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/5Mb163NpvW4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/1121629505242909849/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=1121629505242909849" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/1121629505242909849?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/1121629505242909849?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/5Mb163NpvW4/rare-issue-while-deleting-full-text.html" title="Rare issue while deleting full text catalog in SQL server 2005" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2008/12/rare-issue-while-deleting-full-text.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAARH86eSp7ImA9WxNbFE4.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-4528739778095342475</id><published>2008-12-10T03:40:00.001-08:00</published><updated>2009-11-16T20:39:05.111-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-16T20:39:05.111-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="General" /><title>Rails forum</title><content type="html">&lt;a href="http://vysnu.com/log/tag/rubyrails"&gt;http://vysnu.com/log/tag/rubyrails&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-4528739778095342475?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/W31czvx23W8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/4528739778095342475/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=4528739778095342475" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/4528739778095342475?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/4528739778095342475?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/W31czvx23W8/rails-forum.html" title="Rails forum" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2008/12/rails-forum.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEACQng-cCp7ImA9WxNbFE4.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-623340181223861313</id><published>2008-12-07T20:29:00.000-08:00</published><updated>2009-11-16T20:39:23.658-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-16T20:39:23.658-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="General" /><title>Info on GEM</title><content type="html">http://www.rubygems.org/read/chapter/11&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-623340181223861313?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/NH7aEFwiZsE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/623340181223861313/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=623340181223861313" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/623340181223861313?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/623340181223861313?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/NH7aEFwiZsE/info-on-gem.html" title="Info on GEM" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2008/12/info-on-gem.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAMQnw4fSp7ImA9WxNbFE4.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-4608166251629607061</id><published>2008-12-03T20:45:00.001-08:00</published><updated>2009-11-16T20:39:43.235-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-16T20:39:43.235-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="General" /><title>Rails logger article</title><content type="html">info on logger :&lt;br /&gt;&lt;br /&gt;http://dev.ctor.org/doc/devel-logger/classes/Logger.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-4608166251629607061?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/ePWbXX85PQg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/4608166251629607061/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=4608166251629607061" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/4608166251629607061?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/4608166251629607061?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/ePWbXX85PQg/rails-logger-article.html" title="Rails logger article" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2008/12/rails-logger-article.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8CQ3Y8fSp7ImA9WxVaEUU.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-4487835628460811813</id><published>2008-12-03T00:19:00.000-08:00</published><updated>2009-04-08T02:44:22.875-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-08T02:44:22.875-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Rails" /><title>Use of concat tag</title><content type="html">&lt;span style="font-family:courier new,courier;"&gt; This example shows how  to use concat tags in helper class, also note the use of rendering partial template inside this.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;def content_headers(header = '', sub_header = '', options = {}, &amp;amp;block)&lt;br /&gt; if !options.has_key?(:if) || options[:if]&lt;br /&gt;   content_body = capture(&amp;amp;block)&lt;br /&gt;   concat(render(:partial =&gt; 'shared/content_headers',&lt;br /&gt;     :locals =&gt; { :body =&gt; content_body, :header =&gt; header, :sub_header =&gt; sub_header }),&lt;br /&gt;     block.binding)&lt;br /&gt; end&lt;/span&gt;&lt;br /&gt;end&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-4487835628460811813?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/Dbz7vVHFEPA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/4487835628460811813/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=4487835628460811813" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/4487835628460811813?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/4487835628460811813?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/Dbz7vVHFEPA/use-of-concat-tag.html" title="Use of concat tag" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2008/12/use-of-concat-tag.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8EQXsyfSp7ImA9WxNbFE4.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-5304527364015463299</id><published>2008-10-13T04:02:00.000-07:00</published><updated>2009-11-16T20:40:00.595-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-16T20:40:00.595-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="General" /><title>Perl Tutorial links</title><content type="html">&lt;a href="http://www.perl.com/pub/a/2000/11/begperl2.html"&gt;http://www.perl.com/pub/a/2000/11/begperl2.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.tizag.com/perlT/index.php"&gt;http://www.tizag.com/perlT/index.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.comp.leeds.ac.uk/Perl/"&gt;http://www.comp.leeds.ac.uk/Perl/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://webhome.cs.uvic.ca/%7Egtzan/seng265/Summer2006/slides/05_perl_regex.pdf"&gt;http://webhome.cs.uvic.ca/~gtzan/seng265/Summer2006/slides/05_perl_regex.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-5304527364015463299?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/K7vKCaxHX9I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/5304527364015463299/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=5304527364015463299" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/5304527364015463299?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/5304527364015463299?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/K7vKCaxHX9I/perl-tutorial-links.html" title="Perl Tutorial links" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2008/10/perl-tutorial-links.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcHQH8yeyp7ImA9WxVaEUU.&quot;"><id>tag:blogger.com,1999:blog-1018755780270535027.post-6375403222392120092</id><published>2008-09-22T00:09:00.000-07:00</published><updated>2009-04-08T02:47:11.193-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-08T02:47:11.193-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Ruby methods" /><title>Three ways to invoke a method in ruby</title><content type="html">1. object = Object.new&lt;br /&gt;     puts object.object_id&lt;br /&gt;     #=&gt; 282660&lt;br /&gt;&lt;br /&gt; 2. puts object.send(:object_id)&lt;br /&gt;     #=&gt; 282660&lt;br /&gt;&lt;br /&gt; 3. puts object.method(:object_id).call&lt;br /&gt;     #=&gt; 282660&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1018755780270535027-6375403222392120092?l=railsblogger.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/railsblogger/~4/GIrfru9xCVE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://railsblogger.blogspot.com/feeds/6375403222392120092/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1018755780270535027&amp;postID=6375403222392120092" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/6375403222392120092?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1018755780270535027/posts/default/6375403222392120092?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/railsblogger/~3/GIrfru9xCVE/three-ways-to-invoke-method-in-ruby.html" title="Three ways to invoke a method in ruby" /><author><name>Balaji</name><uri>http://www.blogger.com/profile/04503907429371411146</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://railsblogger.blogspot.com/2008/09/three-ways-to-invoke-method-in-ruby.html</feedburner:origLink></entry></feed>

