<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2630200242060123289</id><updated>2024-09-10T04:29:54.532-07:00</updated><category term="Ruby"/><category term="Rails"/><category term="ruby on rails"/><category term="fedora"/><category term="linux"/><category term="Background Process"/><category term="Change column"/><category term="Dynamic Method Generation"/><category term="Migration"/><category term="MongoDB"/><category term="Multiple Table Inheritance"/><category term="Pik"/><category term="Polymorphic Association"/><category term="RVM"/><category term="Rails Version Manager"/><category term="Ruby Multiple Versions"/><category term="SQL Server 2008"/><category term="Single Table Inheritance"/><category term="Starling"/><category term="actionmailer"/><category term="activerecord"/><category term="activerecord-sqlserver-adapter"/><category term="append"/><category term="array"/><category term="class methods"/><category term="console"/><category term="define_method"/><category term="development"/><category term="excel"/><category term="execjs"/><category term="instance methods"/><category term="kdegraphics"/><category term="mail"/><category term="mailcatcher"/><category term="postgresql"/><category term="prepend"/><category term="ruby-odbc"/><category term="screenshot"/><category term="sql logs"/><category term="therubyracer"/><category term="unshift"/><category term="writeexcel"/><title type='text'>Ruby, Rails, Programming, Miscellaneous</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-1902472684168119662</id><published>2018-06-14T23:40:00.001-07:00</published><updated>2018-06-14T23:40:31.662-07:00</updated><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;section class=&quot;title_section clearfix&quot; style=&quot;background-color: white; border: 0px; font-family: proximanova, sans-serif; font-size: 10px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: -5px 0px 0px; padding: 0px; position: static; text-size-adjust: none; vertical-align: baseline;&quot;&gt;&lt;h1 class=&quot;heading1&quot; data-articletitle=&quot;&quot; style=&quot;border: 0px; color: rgb(51, 51, 51) !important; font: 40px/44px proxima-semibold, &amp;quot;roboto slab&amp;quot;, roboto, arial, sans-serif; margin: 0px 0px 20px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;arttitle&gt;Eid-al-Fitr in Dakshina Kannada district on Friday&lt;/arttitle&gt;&lt;/h1&gt;
&lt;h1 class=&quot;heading1&quot; data-articletitle=&quot;&quot; style=&quot;border: 0px; color: rgb(51, 51, 51) !important; font-family: proxima-semibold, &amp;quot;roboto slab&amp;quot;, roboto, arial, sans-serif; font-size: 40px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: 44px; margin: 0px 0px 20px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;section class=&quot;title_section clearfix&quot; style=&quot;border: 0px; color: black; font-family: proximanova, sans-serif; font-size: 10px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: -5px 0px 0px; padding: 0px; position: static; text-size-adjust: none; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;brandwire_txt&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;span itemprop=&quot;author&quot; itemscope=&quot;itemscope&quot; itemtype=&quot;https://schema.org/Person&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;&lt;a class=&quot;auth_detail&quot; href=&quot;https://timesofindia.indiatimes.com/toireporter/author-Vinobha-K-T-479218247.cms&quot; rel=&quot;author&quot; style=&quot;color: #666666; cursor: pointer; font-family: proxima-regular1, roboto, arial, sans-serif; font-size: 14px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 15px; opacity: 0.8; padding-right: 5px; text-decoration-line: none; transition: all 0.5s;&quot; target=&quot;_blank&quot;&gt;Vinobha K T&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;time_cptn&quot; style=&quot;border: 0px; color: #666666; display: inline-block; font-family: , &amp;quot;roboto&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-stretch: normal; height: 40px; line-height: 15px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;|&amp;nbsp;&lt;span style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;TNN&lt;/span&gt;&amp;nbsp;|&amp;nbsp;&lt;span style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;Jun 14, 2018, 20:26 IST&lt;time datetime=&quot;2018-06-14T20:26:20+05:30&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;&lt;/time&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;leftsocial&quot; style=&quot;border: 0px; font: inherit; left: -122px; margin: 0px; padding: 0px; position: absolute; text-size-adjust: none; top: 120px; vertical-align: baseline; width: 120px; z-index: 1;&quot;&gt;
&lt;div data-tpwidget=&quot;widget-two&quot; id=&quot;widget-two&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tpwidget tpwidget-two&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border: 0px; font-family: Roboto, sans-serif; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 90px; padding: 0px; text-rendering: optimizeLegibility !important; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tpwidget-float pos-rel&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border: 0px; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; transition: margin-top 0.4s ease-in-out; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tp-logo&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border: 0px; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 20px; left: 0px; line-height: inherit; margin: 0px auto; padding: 0px; position: absolute; right: 0px; text-rendering: optimizeLegibility !important; text-size-adjust: none; top: -18px; transition: top 0.25s ease-in-out; vertical-align: baseline; width: 34px; z-index: 11;&quot;&gt;
&lt;img src=&quot;https://image.timespoints.iimg.in/tpwidgets/static/dist/images/crown.png&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border: 0px; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; padding: 0px; text-rendering: optimizeLegibility !important; text-size-adjust: none; vertical-align: bottom;&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;text-normal tpwidget-float-head&quot; style=&quot;-webkit-font-smoothing: antialiased !important; background-color: #35b8b8; border-radius: 50%; border: 0px; box-shadow: rgba(0, 0, 0, 0.16) 0px 0px 2px 0px; color: white; font-size: 17px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; height: 40px; line-height: 42px; margin: 0px auto; padding: 0px; position: relative; text-align: center; text-rendering: optimizeLegibility !important; text-size-adjust: none; vertical-align: baseline; width: 40px; z-index: 10;&quot;&gt;
&lt;span class=&quot;&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; cursor: pointer; display: block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: auto;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;odometer odometer-auto-theme&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border: 0px; display: inline-block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 16px; margin: -17px 0px 0px; overflow: hidden; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; vertical-align: middle;&quot;&gt;
&lt;div class=&quot;odometer-inside&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border: 0px; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-rendering: optimizeLegibility !important; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;span class=&quot;&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; cursor: pointer; display: block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;odometer-digit&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; cursor: pointer; display: inline-block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; transition: inherit; vertical-align: middle; width: auto;&quot;&gt;&lt;span class=&quot;odometer-digit-spacer&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; cursor: pointer; display: inline-block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; transition: inherit; vertical-align: middle; visibility: hidden; width: auto;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;odometer-digit-inner&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; bottom: 0px; cursor: pointer; display: block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; left: 0px; line-height: inherit; margin: 10px auto; overflow: hidden; padding: 0px; position: absolute; right: 0px; text-align: left; text-rendering: optimizeLegibility !important; text-size-adjust: none; top: 0px; transition: inherit; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;odometer-ribbon&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; cursor: pointer; display: block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;odometer-ribbon-inner&quot; style=&quot;-webkit-font-smoothing: antialiased !important; backface-visibility: hidden; border-radius: 100%; border: 0px; cursor: pointer; display: block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;odometer-value&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; cursor: pointer; display: block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-align: center; text-rendering: optimizeLegibility !important; text-size-adjust: none; transform: translateZ(0px); transition: inherit; vertical-align: baseline; width: auto;&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;odometer-digit&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; cursor: pointer; display: inline-block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; transition: inherit; vertical-align: middle; width: auto;&quot;&gt;&lt;span class=&quot;odometer-digit-spacer&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; cursor: pointer; display: inline-block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; transition: inherit; vertical-align: middle; visibility: hidden; width: auto;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;odometer-digit-inner&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; bottom: 0px; cursor: pointer; display: block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; left: 0px; line-height: inherit; margin: 10px auto; overflow: hidden; padding: 0px; position: absolute; right: 0px; text-align: left; text-rendering: optimizeLegibility !important; text-size-adjust: none; top: 0px; transition: inherit; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;odometer-ribbon&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; cursor: pointer; display: block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;odometer-ribbon-inner&quot; style=&quot;-webkit-font-smoothing: antialiased !important; backface-visibility: hidden; border-radius: 100%; border: 0px; cursor: pointer; display: block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;odometer-value&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; cursor: pointer; display: block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-align: center; text-rendering: optimizeLegibility !important; text-size-adjust: none; transform: translateZ(0px); transition: inherit; vertical-align: baseline; width: auto;&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span class=&quot;&quot; style=&quot;-webkit-font-smoothing: antialiased !important; border-radius: 100%; border: 0px; cursor: pointer; display: block; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 40px; line-height: inherit; margin: 10px auto; padding: 0px; position: relative; text-rendering: optimizeLegibility !important; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: auto;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;ripple animate &quot; style=&quot;-webkit-font-smoothing: antialiased !important; border: 0px; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 25px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; text-rendering: optimizeLegibility !important; text-size-adjust: none; top: 0px; vertical-align: baseline; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;toiwidgets_social&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-align: center; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;span class=&quot;fb show_sprite toishare&quot; data-plugin=&quot;facebook-share&quot; data-type=&quot;fb&quot; data-url=&quot;https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms?utm_source=facebook.com&amp;amp;utm_medium=social&amp;amp;utm_campaign=TOIDesktop&quot; pg=&quot;AS1_Share#AS1_fb#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms&quot; style=&quot;background-color: #3a5795; background-image: url(&amp;quot;https://static.toiimg.com/photo/60954650.cms&amp;quot;); background-position: -63px -56px; background-repeat: no-repeat; border-radius: 100%; border: 0px; cursor: pointer; display: block; font: inherit; height: 40px; margin: 10px auto; padding: 0px; position: relative; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: 40px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;twitter show_sprite toishare&quot; data-plugin=&quot;twitter-share&quot; data-title=&quot;Eid-al-Fitr in Dakshina Kannada district on Friday&quot; data-type=&quot;twitter&quot; data-url=&quot;http://toi.in/qlROWa/a24gk&quot; data-via=&quot;TOICitiesNews&quot; pg=&quot;AS1_Share#AS1_twitter#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms&quot; style=&quot;background-color: #55acee; background-image: url(&amp;quot;https://static.toiimg.com/photo/60954650.cms&amp;quot;); background-position: -63px -112px; background-repeat: no-repeat; border-radius: 100%; border: 0px; cursor: pointer; display: block; font: inherit; height: 40px; margin: 10px auto; padding: 0px; position: relative; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: 40px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;gplus show_sprite toishare&quot; data-plugin=&quot;googleplus-share&quot; data-type=&quot;gplus&quot; data-url=&quot;https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms?utm_source=plus.google.com&amp;amp;utm_medium=social&amp;amp;utm_campaign=TOIDesktop&quot; pg=&quot;AS1_Share#AS1_gplus#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms&quot; style=&quot;background-color: #dd4b39; background-image: url(&amp;quot;https://static.toiimg.com/photo/60954650.cms&amp;quot;); background-position: -63px -168px; background-repeat: no-repeat; border-radius: 100%; border: 0px; cursor: pointer; display: block; font: inherit; height: 40px; margin: 10px auto; padding: 0px; position: relative; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: 40px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;linkedin show_sprite toishare&quot; data-plugin=&quot;linkedin-share&quot; data-type=&quot;linkedin&quot; data-url=&quot;https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms?utm_source=linkedin.com&amp;amp;utm_medium=social&amp;amp;utm_campaign=TOIDesktop&quot; pg=&quot;AS1_Share#AS1_linkedin#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms&quot; style=&quot;background-color: #0177b5; background-image: url(&amp;quot;https://static.toiimg.com/photo/60954650.cms&amp;quot;); background-position: -63px -223px; background-repeat: no-repeat; border-radius: 100%; border: 0px; cursor: pointer; display: block; font: inherit; height: 40px; margin: 10px auto; padding: 0px; position: relative; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: 40px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pinterest show_sprite toishare&quot; data-image=&quot;https://timesofindia.indiatimes.com/photo/64591094.cms&quot; data-plugin=&quot;pinterest-share&quot; data-type=&quot;pinterest&quot; data-url=&quot;https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms?utm_source=pinterest.com&amp;amp;utm_medium=social&amp;amp;utm_campaign=TOIDesktop&quot; pg=&quot;AS1_Share#AS1_pinterest#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms&quot; style=&quot;background-color: #bd081c; background-image: url(&amp;quot;https://static.toiimg.com/photo/60954650.cms&amp;quot;); background-position: -63px -279px; background-repeat: no-repeat; border-radius: 100%; border: 0px; cursor: pointer; display: block; font: inherit; height: 40px; margin: 10px auto; padding: 0px; position: relative; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: 40px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;comment-slider show_sprite toishare comment-loaded&quot; data-plugin=&quot;show-comments&quot; data-type=&quot;comment-slider&quot; data-url=&quot;https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms?utm_source=others&amp;amp;amp;utm_medium=social&amp;amp;amp;utm_campaign=TOIDesktop&quot; pg=&quot;AS1_Share#AS1_comment-slider#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms&quot; style=&quot;background-color: #222222; background-image: none; background-repeat: no-repeat; border-radius: 100%; border: 0px; cursor: pointer; display: block; font: inherit; height: 40px; margin: 10px auto; padding: 0px; position: relative; text-size-adjust: none; transition: inherit; vertical-align: baseline; width: 40px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;topsocial actions&quot; style=&quot;border: 0px; float: right; font: inherit; margin: -16px 0px 0px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;toiwidgets_social&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-align: center; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;span class=&quot;email show_sprite toishare&quot; data-type=&quot;email&quot; data-url=&quot;https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms?utm_source=email&amp;amp;utm_medium=email&amp;amp;utm_campaign=TOIDesktop&quot; pg=&quot;AS1_Share#AS1_email#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms&quot; style=&quot;background-image: url(&amp;quot;https://static.toiimg.com/photo/60954650.cms&amp;quot;); background-position: -126px 0px; background-repeat: no-repeat; border-radius: 100%; border: 0px; cursor: pointer; display: inline-block; font: inherit; height: 40px; margin: 0px 5px; padding: 0px; position: relative; text-size-adjust: none; vertical-align: baseline; width: 40px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;print show_sprite toishare&quot; data-type=&quot;print&quot; data-url=&quot;https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms?utm_source=others&amp;amp;amp;utm_medium=social&amp;amp;amp;utm_campaign=TOIDesktop&quot; pg=&quot;AS1_ReadibilityIcons#AS1_print#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms&quot; style=&quot;background-image: url(&amp;quot;https://static.toiimg.com/photo/60954650.cms&amp;quot;); background-position: -182px 0px; background-repeat: no-repeat; border-radius: 100%; border: 0px; cursor: pointer; display: inline-block; font: inherit; height: 40px; margin: 0px 5px; padding: 0px; position: relative; text-size-adjust: none; vertical-align: baseline; width: 40px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;fontd show_sprite toishare&quot; data-type=&quot;fontd&quot; data-url=&quot;https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms?utm_source=others&amp;amp;amp;utm_medium=social&amp;amp;amp;utm_campaign=TOIDesktop&quot; pg=&quot;AS1_ReadibilityIcons#AS1_fontd#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms&quot; style=&quot;background-image: url(&amp;quot;https://static.toiimg.com/photo/60954650.cms&amp;quot;); background-position: -237px 0px; background-repeat: no-repeat; border-radius: 100%; border: 0px; cursor: pointer; display: inline-block; font: inherit; height: 40px; margin: 0px 5px; padding: 0px; position: relative; text-size-adjust: none; vertical-align: baseline; width: 40px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;fonti show_sprite toishare&quot; data-type=&quot;fonti&quot; data-url=&quot;https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms?utm_source=others&amp;amp;amp;utm_medium=social&amp;amp;amp;utm_campaign=TOIDesktop&quot; pg=&quot;AS1_ReadibilityIcons#AS1_fonti#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms&quot; style=&quot;background-image: url(&amp;quot;https://static.toiimg.com/photo/60954650.cms&amp;quot;); background-position: -293px 0px; background-repeat: no-repeat; border-radius: 100%; border: 0px; cursor: pointer; display: inline-block; font: inherit; height: 40px; margin: 0px 5px; padding: 0px; position: relative; text-size-adjust: none; vertical-align: baseline; width: 40px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/section&gt;&lt;section class=&quot;highlight clearfix&quot; data-highlight=&quot;false&quot; style=&quot;border: 0px; color: black; float: left; font-family: proximanova, sans-serif; font-size: 10px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px 10px 20px 0px; padding: 0px; position: relative; text-size-adjust: none; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;Representative image. &quot; data-imgid=&quot;64591094&quot; src=&quot;https://timesofindia.indiatimes.com/thumb/msid-64591094,width-400,resizemode-4/64591094.jpg&quot; style=&quot;border: 0px; display: block; float: left; font: inherit; height: 300px; margin: 0px; max-width: 400px; padding: 0px; text-size-adjust: none; vertical-align: bottom; width: 400px;&quot; title=&quot;Representative image. &quot; /&gt;&lt;span class=&quot;img_cptn&quot; style=&quot;border: 0px; color: #666666; display: block; float: none; font-family: , &amp;quot;roboto&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px; font-stretch: inherit; font-style: italic; font-variant: inherit; font-weight: inherit; line-height: 18px; margin: 0px; min-height: 40px; padding: 5px 5px 0px; vertical-align: baseline; width: 390px;&quot;&gt;Representative image.&lt;/span&gt;&lt;/section&gt;&lt;div class=&quot;article_content clearfix&quot; style=&quot;border: 0px; font-family: proxima-regular1, roboto, arial, sans-serif; font-size: 18px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 27px; margin: 0px 0px 15px; padding: 0px; position: relative; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;arttextxml&gt;&lt;/arttextxml&gt;&lt;br /&gt;
&lt;div class=&quot;section1&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;Normal&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
MANGALURU: Muslims in&amp;nbsp;&lt;a class=&quot;key_underline&quot; href=&quot;https://timesofindia.indiatimes.com/topic/Dakshina-Kannada-district&quot; pg=&quot;AS1_InlineMedia#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms~Dakshina Kannada district-https://timesofindia.indiatimes.com/topic/Dakshina-Kannada-district&quot; style=&quot;border-bottom: 1px solid rgb(187, 187, 187); color: #333333; cursor: pointer; opacity: 0.8; text-decoration-line: none; transition: all 0.5s;&quot;&gt;Dakshina Kannada district&lt;/a&gt;&amp;nbsp;will celebrate&amp;nbsp;&lt;a class=&quot;key_underline&quot; href=&quot;https://timesofindia.indiatimes.com/topic/Eid-al-Fitr&quot; pg=&quot;AS1_InlineMedia#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms~Eid al-Fitr-https://timesofindia.indiatimes.com/topic/Eid-al-Fitr&quot; style=&quot;border-bottom: 1px solid rgb(187, 187, 187); color: #333333; cursor: pointer; opacity: 0.8; text-decoration-line: none; transition: all 0.5s;&quot;&gt;Eid al-Fitr&lt;/a&gt;&amp;nbsp;on Friday.&lt;br /&gt;
&lt;div class=&quot;last3brdiv&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;br style=&quot;content: &amp;quot;.&amp;quot;; display: block;&quot; /&gt;
Dakshina Kannada district&amp;nbsp;&lt;a class=&quot;key_underline&quot; href=&quot;https://timesofindia.indiatimes.com/topic/khazi-Alhaj-Twaqa-Ahmed&quot; pg=&quot;AS1_InlineMedia#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms~khazi Alhaj Twaqa Ahmed-https://timesofindia.indiatimes.com/topic/khazi-Alhaj-Twaqa-Ahmed&quot; style=&quot;border-bottom: 1px solid rgb(187, 187, 187); color: #333333; cursor: pointer; opacity: 0.8; text-decoration-line: none; transition: all 0.5s;&quot;&gt;khazi Alhaj Twaqa Ahmed&lt;/a&gt;&amp;nbsp;Musliyar has made an announcement in this regard on Thursday.&lt;br /&gt;
&lt;div class=&quot;last2brdiv&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;br style=&quot;content: &amp;quot;.&amp;quot;; display: block;&quot; /&gt;
&lt;div class=&quot;last1brdiv&quot; style=&quot;border: 0px; font: inherit; margin: 0px; padding: 0px; text-size-adjust: none; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;br style=&quot;content: &amp;quot;.&amp;quot;; display: block;&quot; /&gt;
He said the decision to celebrate Eid-al-Fitr on Friday was taken based on the first&amp;nbsp;&lt;a class=&quot;key_underline&quot; href=&quot;https://timesofindia.indiatimes.com/topic/moon-sighting&quot; pg=&quot;AS1_InlineMedia#AS1_https://timesofindia.indiatimes.com/city/mangaluru/eid-al-fitr-in-dakshina-kannada-district-on-friday/articleshow/64591086.cms~moon sighting-https://timesofindia.indiatimes.com/topic/moon-sighting&quot; style=&quot;border-bottom: 1px solid rgb(187, 187, 187); color: #333333; cursor: pointer; opacity: 0.8; text-decoration-line: none; transition: all 0.5s;&quot;&gt;moon sighting&lt;/a&gt;&amp;nbsp;of Shawwal witnessed at Kozhikode on Thursday. Special prayers will be held at all masjids in the district at 8am.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h1&gt;
&lt;/section&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/1902472684168119662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2018/06/eid-al-fitr-in-dakshina-kannada.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/1902472684168119662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/1902472684168119662'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2018/06/eid-al-fitr-in-dakshina-kannada.html' title=''/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-5871768011734096361</id><published>2013-06-19T01:13:00.001-07:00</published><updated>2013-06-19T01:13:38.449-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="append"/><category scheme="http://www.blogger.com/atom/ns#" term="array"/><category scheme="http://www.blogger.com/atom/ns#" term="prepend"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><category scheme="http://www.blogger.com/atom/ns#" term="unshift"/><title type='text'>Prepending in a Ruby Array</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Appending in Ruby array is done in the following way :&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: ruby; ruler: true; first-line: 10; highlight: [2, 4, 6]&quot;&gt;my_array = [&#39;s&#39;,&#39;a&#39;,&#39;u&#39;,&#39;r&#39;,&#39;a&#39;] =&amp;gt; [&quot;s&quot;, &quot;a&quot;, &quot;u&quot;, &quot;r&quot;, &quot;a&quot;]
my_array &amp;lt;&amp;lt; &#39;v&#39; =&amp;gt; [&quot;s&quot;, &quot;a&quot;, &quot;u&quot;, &quot;r&quot;, &quot;a&quot;, &quot;v&quot;]

&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Now, if you want to prepend any value to an array, Ruby&#39;s&amp;nbsp;&lt;a href=&quot;http://apidock.com/ruby/Array/unshift&quot; target=&quot;_blank&quot;&gt;unshift&lt;/a&gt;&amp;nbsp;method can be used for this&amp;nbsp;purpose.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: ruby; ruler: true; first-line: 10; highlight: [2, 4, 6]&quot;&gt;my_array =&amp;gt; [&quot;s&quot;, &quot;a&quot;, &quot;u&quot;, &quot;r&quot;, &quot;a&quot;, &quot;v&quot;]
my_array.unshift(&#39;c&#39;) =&amp;gt; [&quot;c&quot;, &quot;s&quot;, &quot;a&quot;, &quot;u&quot;, &quot;r&quot;, &quot;a&quot;, &quot;v&quot;]
&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Thats it !
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/5871768011734096361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2013/06/prepending-in-ruby-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/5871768011734096361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/5871768011734096361'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2013/06/prepending-in-ruby-array.html' title='Prepending in a Ruby Array'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Bangalore, Karnataka, India</georss:featurename><georss:point>12.9715987 77.594562699999983</georss:point><georss:box>12.4764182 76.949115699999979 13.4667792 78.240009699999987</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-2223443796527749952</id><published>2013-06-10T04:57:00.000-07:00</published><updated>2013-06-11T03:54:35.677-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><title type='text'>Ruby&#39;s try()</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;I came to know about Ruby&#39;s try() method today, liked, the overall purpose of this method and so, sharing a brief note about how we can use this method while writing codes.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;Many a times, we have to write conditions for checking for nil values/objects. try() can help us to write clean codes whereby we don&#39;t have explicitly do testing for nil value.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Have a look at the small example below&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;Without try():&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: ruby; ruler: true; first-line: 10; highlight: [2, 4, 6]&quot;&gt;
puts @student.school.name if @student.school
&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;With try():&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: ruby; ruler: true; first-line: 10; highlight: [2, 4, 6]&quot;&gt;puts @student.school.try(:name)&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;Read this&amp;nbsp;&lt;a href=&quot;http://apidock.com/rails/Object/try&quot;&gt;http://apidock.com/rails/Object/try&lt;/a&gt;&amp;nbsp;link, to know about try() method more in details.&lt;/span&gt; 

&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/2223443796527749952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2013/06/rubys-try.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/2223443796527749952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/2223443796527749952'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2013/06/rubys-try.html' title='Ruby&#39;s try()'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Bangalore, Karnataka, India</georss:featurename><georss:point>12.9715987 77.594562699999983</georss:point><georss:box>12.4764182 76.949115699999979 13.4667792 78.240009699999987</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-4946026730011158296</id><published>2013-02-12T20:38:00.001-08:00</published><updated>2013-02-12T20:38:49.679-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="activerecord"/><category scheme="http://www.blogger.com/atom/ns#" term="console"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><category scheme="http://www.blogger.com/atom/ns#" term="sql logs"/><title type='text'>SQL logs in Rails console</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;style type=&quot;text/css&quot;&gt;
 &lt;!--
  @page { margin: 0.79in }
  P { margin-bottom: 0.08in }
 &lt;/style&gt;
 &lt;/div&gt;
&lt;br /&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;While
working on different Rails projects, I often find it useful to see
behind the scenes SQL queries in the console itself. We can the view
the SQL queries in the log file itself, but I find it easier to look
at the SQL queries at the console itself. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;
&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;For
this purpose in my Ubuntu 11.10, I have created a file called &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;.irbrc&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;
in my home directory and have pasted the below contents in that file.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHycH5VdBUOBKHXy2rJ55GFok5UcXsldYPLpV6j3c4E33VFl4dvPI6g9i6A7fvo_l3Q7xAclbID-OMfyWlpBUvrwwanWJsxS_XGtVTrX8l9ny65ypZfK89AFNzFmj29Sc9Gq2DZpzUcik/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;1:  require &#39;pp&#39;  
2:  if ENV.include?(&#39;RAILS_ENV&#39;) &amp;amp;&amp;amp; !Object.const_defined?(&#39;RAILS_DEFAULT_LOGGER&#39;)  
3:       require &#39;logger&#39;  
4:        RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)  
5:  end&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;style type=&quot;text/css&quot;&gt;
 &lt;!--
  @page { margin: 0.79in }
  P { margin-bottom: 0.08in }
 &lt;/style&gt;
 &lt;/div&gt;
&lt;br /&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Now
after starting the console, the output for any ActiveRecord operation
shows the sql query also&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Here
is a &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;simple output from the console&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHycH5VdBUOBKHXy2rJ55GFok5UcXsldYPLpV6j3c4E33VFl4dvPI6g9i6A7fvo_l3Q7xAclbID-OMfyWlpBUvrwwanWJsxS_XGtVTrX8l9ny65ypZfK89AFNzFmj29Sc9Gq2DZpzUcik/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;1:  &amp;gt;&amp;gt; User.all(:limit =&amp;gt; 1)  
2:   User Load (0.9ms)  SELECT * FROM &quot;users&quot; LIMIT 1  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Not, I could test this only in Rails 2.
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/4946026730011158296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2013/02/sql-logs-in-rails-console.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/4946026730011158296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/4946026730011158296'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2013/02/sql-logs-in-rails-console.html' title='SQL logs in Rails console'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Bangalore, Karnataka, India</georss:featurename><georss:point>12.9715987 77.594562699999983</georss:point><georss:box>12.476417699999999 76.949115699999979 13.4667797 78.240009699999987</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-6240353355854145425</id><published>2013-02-12T11:53:00.002-08:00</published><updated>2013-02-12T11:57:31.960-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="actionmailer"/><category scheme="http://www.blogger.com/atom/ns#" term="development"/><category scheme="http://www.blogger.com/atom/ns#" term="mail"/><category scheme="http://www.blogger.com/atom/ns#" term="mailcatcher"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><title type='text'>MailCatcher gem: Testing emails in Development mode in Rails</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;Well,
I am writing this post after a long long time. Had some personal
priorities to take care of.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;Few
days, back I was given a task, to develop a module where I had to
write code for sending notification mails to different kind of users
based on different actions/events in the application. Sending mails
with &lt;a href=&quot;http://api.rubyonrails.org/classes/ActionMailer/Base.html&quot; target=&quot;_blank&quot;&gt;ActionMailer&lt;/a&gt; &lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;is
not that tough, but in my development environment I was not available
to find&amp;nbsp; out how will the contents of the mail will actually
look like when it is sent to the users. &amp;nbsp;I needed some simple
way to test it.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;em&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;While
searching in google, I came to know about the
&lt;a href=&quot;https://github.com/sj26/mailcatcher&quot;&gt;mailcatcher&lt;/a&gt; gem and I am glad that I found it very easily :)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;em&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;It
is very easy to setup and configure mailcatcher in your project.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;em&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;First,
you will add the following line in your gemfile&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;em style=&quot;cursor: pointer; font-family: arial, sans-serif; font-style: normal; white-space: nowrap;&quot;&gt;&lt;br /&gt;&lt;/em&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHycH5VdBUOBKHXy2rJ55GFok5UcXsldYPLpV6j3c4E33VFl4dvPI6g9i6A7fvo_l3Q7xAclbID-OMfyWlpBUvrwwanWJsxS_XGtVTrX8l9ny65ypZfK89AFNzFmj29Sc9Gq2DZpzUcik/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;em style=&quot;cursor: pointer; font-family: arial, sans-serif; font-style: normal; white-space: nowrap;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; gem &#39;mailcatcher&#39;  
&lt;/code&gt;&lt;/em&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHycH5VdBUOBKHXy2rJ55GFok5UcXsldYPLpV6j3c4E33VFl4dvPI6g9i6A7fvo_l3Q7xAclbID-OMfyWlpBUvrwwanWJsxS_XGtVTrX8l9ny65ypZfK89AFNzFmj29Sc9Gq2DZpzUcik/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;em style=&quot;cursor: pointer; font-family: arial, sans-serif; font-style: normal; white-space: nowrap;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;bundle install&lt;/code&gt;&lt;/em&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;em style=&quot;cursor: pointer; font-family: arial, sans-serif; font-style: normal; white-space: nowrap;&quot;&gt;Then you have to do the following changes in config/development.rb&lt;/em&gt;&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHycH5VdBUOBKHXy2rJ55GFok5UcXsldYPLpV6j3c4E33VFl4dvPI6g9i6A7fvo_l3Q7xAclbID-OMfyWlpBUvrwwanWJsxS_XGtVTrX8l9ny65ypZfK89AFNzFmj29Sc9Gq2DZpzUcik/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;em style=&quot;cursor: pointer; font-family: arial, sans-serif; font-style: normal; white-space: nowrap;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; config.action_mailer.delivery_method = :smtp&amp;nbsp;&lt;/code&gt;&lt;/em&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHycH5VdBUOBKHXy2rJ55GFok5UcXsldYPLpV6j3c4E33VFl4dvPI6g9i6A7fvo_l3Q7xAclbID-OMfyWlpBUvrwwanWJsxS_XGtVTrX8l9ny65ypZfK89AFNzFmj29Sc9Gq2DZpzUcik/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;em style=&quot;cursor: pointer; font-family: arial, sans-serif; font-style: normal; white-space: nowrap;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;config.action_mailer.smtp_settings = { address: &#39;localhost&#39;, port: 1025 }&lt;/code&gt;&lt;/em&gt;&lt;/pre&gt;
&lt;em&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;Then
start/restart your rails app and mailcatcher daemon from terminal
just by typing mailcatcher&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHycH5VdBUOBKHXy2rJ55GFok5UcXsldYPLpV6j3c4E33VFl4dvPI6g9i6A7fvo_l3Q7xAclbID-OMfyWlpBUvrwwanWJsxS_XGtVTrX8l9ny65ypZfK89AFNzFmj29Sc9Gq2DZpzUcik/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;em style=&quot;cursor: pointer; font-family: arial, sans-serif; font-style: normal; white-space: nowrap;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;saurav@saurav-Vostro-1540:~/workspace/my_project$ mailcatcher&amp;nbsp;&lt;/code&gt;&lt;/em&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHycH5VdBUOBKHXy2rJ55GFok5UcXsldYPLpV6j3c4E33VFl4dvPI6g9i6A7fvo_l3Q7xAclbID-OMfyWlpBUvrwwanWJsxS_XGtVTrX8l9ny65ypZfK89AFNzFmj29Sc9Gq2DZpzUcik/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;em style=&quot;cursor: pointer; font-family: arial, sans-serif; font-style: normal; white-space: nowrap;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;Starting MailCatcher&amp;nbsp;&lt;/code&gt;&lt;/em&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHycH5VdBUOBKHXy2rJ55GFok5UcXsldYPLpV6j3c4E33VFl4dvPI6g9i6A7fvo_l3Q7xAclbID-OMfyWlpBUvrwwanWJsxS_XGtVTrX8l9ny65ypZfK89AFNzFmj29Sc9Gq2DZpzUcik/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;em style=&quot;cursor: pointer; font-family: arial, sans-serif; font-style: normal; white-space: nowrap;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;==&amp;gt; smtp://127.0.0.1:1025&lt;/code&gt;&lt;/em&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHycH5VdBUOBKHXy2rJ55GFok5UcXsldYPLpV6j3c4E33VFl4dvPI6g9i6A7fvo_l3Q7xAclbID-OMfyWlpBUvrwwanWJsxS_XGtVTrX8l9ny65ypZfK89AFNzFmj29Sc9Gq2DZpzUcik/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;em style=&quot;cursor: pointer; font-family: arial, sans-serif; font-style: normal; white-space: nowrap;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;==&amp;gt; http://127.0.0.1:1080  
&lt;/code&gt;&lt;/em&gt;&lt;/pre&gt;
&lt;em style=&quot;cursor: pointer; font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;em&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;Now
on opening http://127.0.0.1:1080 in your browser and you can see a
virtual inbox and if you send some mails from your application, you
will be able to see the mails in the inbox created by &#39;mailcatcher&#39;
gem.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em style=&quot;cursor: pointer; font-style: normal;&quot;&gt;
&lt;/em&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 0.23in; margin-bottom: 0in;&quot;&gt;
&lt;em style=&quot;cursor: pointer; font-style: normal; line-height: 0.23in;&quot;&gt;&lt;em&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;The
most important feature of this gem, is that it allows you to see the
HTML,Plain Text and Source view of the mails.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/em&gt;&lt;/div&gt;
&lt;em style=&quot;cursor: pointer; font-style: normal;&quot;&gt;
&lt;/em&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;em style=&quot;cursor: pointer; font-style: normal; line-height: 0.23in;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Thats
it. Now test your mails :)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;em style=&quot;cursor: pointer; font-style: normal;&quot;&gt;
&lt;/em&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/6240353355854145425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2013/02/mailcatcher-testing-emails-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/6240353355854145425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/6240353355854145425'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2013/02/mailcatcher-testing-emails-in.html' title='MailCatcher gem: Testing emails in Development mode in Rails'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Bangalore, Karnataka, India</georss:featurename><georss:point>12.9715987 77.594562699999983</georss:point><georss:box>12.4764182 76.949115699999979 13.4667792 78.240009699999987</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-3878294720783305798</id><published>2012-08-17T21:21:00.001-07:00</published><updated>2012-08-17T21:24:22.427-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MongoDB"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><title type='text'>How to install MongoDB on Ubuntu 11.10</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
MongoDB can be installed in the following way&lt;br /&gt;
&lt;br /&gt;
&lt;script class=&quot;brush: ruby&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
 $ sudo vi /etc/apt/sources.list
]]&gt;&lt;/script&gt;

then inside /etc/apt/sources.list, append the following line

&lt;script class=&quot;brush: ruby&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
 deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
]]&gt;&lt;/script&gt;

Now add the GPG key and update your package list:

&lt;script class=&quot;brush: ruby&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
 $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
 $ sudo apt-get update
]]&gt;&lt;/script&gt;

Now we can install mongoid db in the following way

&lt;script class=&quot;brush: ruby&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
sudo apt-get install mongodb-10gen
]]&gt;&lt;/script&gt;

Now you can check whether mongoDB got installed in a proper way:

&lt;script class=&quot;brush: ruby&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
$ mongo
   MongoDB shell version: 2.0.7
   connecting to: test
]]&gt;&lt;/script&gt;

From your browser also, you can hit the url mentioned below and check whether mongoDB got installed properly.
&lt;script class=&quot;brush: ruby&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
http://localhost:28017/
]]&gt;&lt;/script&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/3878294720783305798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2012/08/how-to-install-mongodb-on-ubuntu-1110.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/3878294720783305798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/3878294720783305798'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2012/08/how-to-install-mongodb-on-ubuntu-1110.html' title='How to install MongoDB on Ubuntu 11.10'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Bangalore, Karnataka, India</georss:featurename><georss:point>12.9715987 77.5945627</georss:point><georss:box>12.724026199999999 77.2787057 13.2191712 77.910419699999991</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-7808876429220713305</id><published>2012-07-15T12:50:00.000-07:00</published><updated>2012-08-06T11:51:56.875-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="excel"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="writeexcel"/><title type='text'>Generating Excel file with &#39;writeexcel&#39; gem &amp; &#39;axlsx&#39; gem</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Well, here I am describing a very short example of creating excel files in ruby. For this example, I have used the gem &quot;writeexcel&quot;&amp;nbsp;&lt;a href=&quot;https://github.com/cxn03651/writeexcel&quot; target=&quot;_blank&quot;&gt;writeexcel&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Here is a very small example&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;syntaxhighlighter&quot; class=&quot;brush: ruby&quot;&gt;&lt;![CDATA[
# Create a new Excel Workbook

&amp;nbsp;workbook = WriteExcel.new(&#39;ruby.xls&#39;)

# Add worksheet(s)

&amp;nbsp;worksheet &amp;nbsp;= workbook.add_worksheet &#39;Customers&#39;


# Add header

row_0 = [&quot;Name&quot;, &quot;Country&quot;, &quot;Acknowledgement&quot;]

row_0.each_with_index do |row,index|
&amp;nbsp; &amp;nbsp; &amp;nbsp; worksheet.write(1,index,row)
end

workbook.close
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;

]]&gt;&lt;/script&gt;

&lt;pre&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; white-space: normal;&quot;&gt;Well, Now a small example for generating excel file with&amp;nbsp;&lt;a href=&quot;https://github.com/randym/axlsx/&quot; target=&quot;_blank&quot;&gt;axlsx gem&lt;/a&gt;.&lt;/span&gt;&lt;/pre&gt;

&lt;script type=&quot;syntaxhighlighter&quot; class=&quot;brush: ruby&quot;&gt;&lt;![CDATA[

require &#39;axlsx&#39;&amp;nbsp;&amp;nbsp;
p = Axlsx::Package.new&amp;nbsp;&amp;nbsp;
wb = p.workbook wb.add_worksheet(:name =&amp;gt; &quot;Basic Worksheet&quot;) do |sheet| 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sheet.add_row [&quot;Column&amp;nbsp; # 1&quot;, &quot;Column&amp;nbsp; # 2&quot;, &quot;Column&amp;nbsp; # 3&quot;]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sheet.add_row [1, 2, 3]&amp;nbsp;&amp;nbsp;
end&amp;nbsp;&amp;nbsp;

s = p.to_stream()&amp;nbsp;&amp;nbsp;
File.open(&#39;ruby.xls&#39;, &#39;w&#39;) { |f| f.write(s.read) } &amp;nbsp;

]]&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/7808876429220713305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2012/07/generating-excel-file-with-writeexcel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/7808876429220713305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/7808876429220713305'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2012/07/generating-excel-file-with-writeexcel.html' title='Generating Excel file with &#39;writeexcel&#39; gem &amp; &#39;axlsx&#39; gem'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Bangalore, Karnataka, India</georss:featurename><georss:point>12.9715987 77.5945627</georss:point><georss:box>12.724026199999999 77.2787057 13.2191712 77.910419699999991</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-5503103625518380231</id><published>2012-06-17T09:13:00.001-07:00</published><updated>2012-06-17T09:13:25.491-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="execjs"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><category scheme="http://www.blogger.com/atom/ns#" term="therubyracer"/><title type='text'>Could not find a JavaScript runtime (ExecJS::RuntimeUnavailable)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi, &amp;nbsp;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If you are using &#39;execjs&#39; gem and if you get the below mentioned error, while starting the application server or executing rake tasks or even starting the console, then you might have to add the gem &#39;therubyracer&#39;.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Today, I was getting the following error in my system after installing &#39;execjs&#39; gem:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;/home/saurav/.rvm/gems/ruby-1.9.2-p318/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect&#39;: Could ot find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;from /home/saurav/.rvm/gems/ruby-1.9.2-p318/gems/execjs-1.4.0/lib/execjs.rb:5:in `&amp;lt;module:ExecJS&amp;gt;&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;from /home/saurav/.rvm/gems/ruby-1.9.2-p318/gems/execjs-1.4.0/lib/execjs.rb:4:in `&amp;lt;top (required)&amp;gt;&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;from /home/saurav/.rvm/gems/ruby-1.9.2-p318/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;from /home/saurav/.rvm/gems/ruby-1.9.2-p318/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `&amp;lt;top (required)&amp;gt;&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;from /home/saurav/.rvm/gems/ruby-1.9.2-p318/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;from /home/saurav/.rvm/gems/ruby-1.9.2-p318/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `&amp;lt;top (required)&amp;gt;&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;from /home/saurav/.rvm/gems/ruby-1.9.2-p318/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;from /home/saurav/.rvm/gems/ruby-1.9.2-p318/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `&amp;lt;top (required)&amp;gt;&#39;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
.......&lt;/div&gt;
&lt;div&gt;
.......&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The solution was to add the following line&amp;nbsp;&lt;b&gt;gem &#39;therubyracer&#39;&lt;/b&gt; to the Gemfile and then execute&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;bundle install&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Voila !!....I don&#39;t see the error any more :)&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/5503103625518380231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2012/06/could-not-find-javascript-runtime.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/5503103625518380231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/5503103625518380231'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2012/06/could-not-find-javascript-runtime.html' title='Could not find a JavaScript runtime (ExecJS::RuntimeUnavailable)'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Bangalore, Karnataka, India</georss:featurename><georss:point>12.9715987 77.5945627</georss:point><georss:box>12.724026199999999 77.2787057 13.2191712 77.910419699999991</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-2228163786571248164</id><published>2012-05-01T09:58:00.002-07:00</published><updated>2012-08-06T11:58:41.740-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="class methods"/><category scheme="http://www.blogger.com/atom/ns#" term="instance methods"/><title type='text'>Referring to class from class method and instance method</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Instead of directly writing ClassName for calling methods, this can be done in a different way by writing &lt;i&gt;self.class&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Below is a small example:&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;syntaxhighlighter&quot; class=&quot;brush: ruby&quot;&gt;&lt;![CDATA[
class SomeClass
&amp;nbsp;&amp;nbsp; def self.what_is_the_class_name
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts &quot;Class Name is #{self}&quot;&lt;/span&gt;
&amp;nbsp;&amp;nbsp; end

&amp;nbsp;&amp;nbsp; def what_is_the_class_name_from_instance_method
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts &quot;Class Name is: #{self.class.name}&quot; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self.class.what_is_the_class_name
&amp;nbsp;&amp;nbsp; end

end

@some_class = SomeClass.new&lt;br /&gt;
@some_class.what_is_the_class_name_from_instance_method&lt;br /&gt;
&lt;br /&gt;
]]&gt;&lt;/script&gt;
&lt;i&gt;&lt;u&gt;Output will be:&lt;/u&gt;&lt;/i&gt; &lt;br /&gt;
&lt;br /&gt;
Class Name is SomeClass&lt;br /&gt;
&lt;br /&gt;
Class Name is SomeClass&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/2228163786571248164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2012/05/referring-to-class-from-class-method.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/2228163786571248164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/2228163786571248164'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2012/05/referring-to-class-from-class-method.html' title='Referring to class from class method and instance method'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Bengaluru, Karnataka, India</georss:featurename><georss:point>12.9715987 77.5945627</georss:point><georss:box>12.724026199999999 77.2787057 13.2191712 77.910419699999991</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-1181883616594414461</id><published>2012-04-25T08:40:00.000-07:00</published><updated>2012-04-25T08:40:05.398-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Change column"/><category scheme="http://www.blogger.com/atom/ns#" term="Migration"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><title type='text'>Change Column or column type in Rails</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi,&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
If you have to change the column_type of an existing column in a table, you have to create a new migration and do the following changes:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;saurav@saurav-Vostro-1540:~/workspace/project$./script/generate migration ChangeNotes&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
The above command will generate a new migration file and the migration should be like this after you have made the change:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;i&gt;class ChangeNotes &amp;lt; ActiveRecord::Migration&lt;br /&gt;&amp;nbsp; def self.up&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; change_table :notes&amp;nbsp; do |t|&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.change :note, :text&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def self.down&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; change_table :notes do |t|&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.change :note, :string&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;end&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
where &quot;note&quot; is the column for which I have changed the data-type. Earlier, the data type of &quot;note&quot; column was set to &quot;String&quot; and now it has been set to &quot;text&quot;..&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/1181883616594414461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2012/04/change-column-or-column-type-in-rails.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/1181883616594414461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/1181883616594414461'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2012/04/change-column-or-column-type-in-rails.html' title='Change Column or column type in Rails'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Bangalore, Karnataka, India</georss:featurename><georss:point>12.9715987 77.5945627</georss:point><georss:box>12.724026199999999 77.2787057 13.2191712 77.910419699999991</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-7393160831945802188</id><published>2012-02-16T05:59:00.000-08:00</published><updated>2012-02-16T05:59:27.209-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Rails Version Manager"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="RVM"/><title type='text'>RVM - No same user error fix</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Hi All,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Today, after installing RVM in my system i was getting a strange error &quot;no same user error&quot; whenever I was trying to install ruby with rvm. I was getting error of similar sort:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-rb prettyprint&quot; style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Error&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; opening archive&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Failed&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; to open &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;--no-same-owner&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;No&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; such file &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;or&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; directory&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-rb prettyprint&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;It is actually a bug in rvm, see this commit: 
https://github.com/wayneeseguin/rvm/commit/52018750763d5321b7b993e201c8589b98e090f9&lt;code&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Finally after some googling, I could solve the issue with the following command: &lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;lang-rb prettyprint&quot; style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-rb prettyprint&quot; style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: normal;&quot;&gt;[administrator@bdsi989-linux administrator]$ rvm get head&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Hope this helps some one :)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/7393160831945802188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2012/02/rvm-no-same-user-error-fix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/7393160831945802188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/7393160831945802188'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2012/02/rvm-no-same-user-error-fix.html' title='RVM - No same user error fix'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Bangalore, Karnataka, India</georss:featurename><georss:point>12.9715987 77.5945627</georss:point><georss:box>12.724026199999999 77.2787057 13.2191712 77.910419699999991</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-8721010492305165699</id><published>2011-12-22T00:27:00.000-08:00</published><updated>2011-12-26T02:42:56.325-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="kdegraphics"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="screenshot"/><title type='text'>Take Screenshots in Linux/Fedora</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Many a times we need to take screenshot. Today, I have installed&amp;nbsp;&lt;a href=&quot;http://kde.org/applications/graphics/&quot; target=&quot;_blank&quot;&gt;kdegraphics&lt;/a&gt;&amp;nbsp;for having the screenshot feature in my Fedora v14 OS.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;The installation procedure is pretty simple :)&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsTaPi_aAB5mVPPE1avHkYXp3D20fcsJMo95DI6g0KcDj-PAlGgWwGuYXRTcFJKM-GgRsMJzRoOJL6sHIWBhJ3XlpKl_8YBkMzufNzOGvWWLgOBIGeJiK-rmQHs3HjuO6Dz520R2pLAIFh/s1600/Screenshot-kdegraphics.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;235&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsTaPi_aAB5mVPPE1avHkYXp3D20fcsJMo95DI6g0KcDj-PAlGgWwGuYXRTcFJKM-GgRsMJzRoOJL6sHIWBhJ3XlpKl_8YBkMzufNzOGvWWLgOBIGeJiK-rmQHs3HjuO6Dz520R2pLAIFh/s400/Screenshot-kdegraphics.png&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;You simply have to do &lt;b&gt;sudo yum install kdegraphics &lt;/b&gt;and it will install the application for you along with the required dependencies.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Now you can take screenshots. You can launch the application from &lt;b&gt;Applications-&amp;gt;Accessories-&amp;gt;Take Screenshot&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIMip_zEGLASUPGYwLqSvBbTRzjrGBYA5xg_76HbvluhginThgxoKCBcOd4OQrk7Wh-qsbY89CfdYke63v4QYHCF55x1T6DoEimzRFBhZp9w9epvBgghAPyC3rJAshyHgIr3iKr-UuIxCA/s1600/Screenshot-takescreenshot.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIMip_zEGLASUPGYwLqSvBbTRzjrGBYA5xg_76HbvluhginThgxoKCBcOd4OQrk7Wh-qsbY89CfdYke63v4QYHCF55x1T6DoEimzRFBhZp9w9epvBgghAPyC3rJAshyHgIr3iKr-UuIxCA/s320/Screenshot-takescreenshot.png&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;You will get 3 different options for taking the screenshot.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/8721010492305165699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2011/12/take-screenshots-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/8721010492305165699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/8721010492305165699'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2011/12/take-screenshots-in-linux.html' title='Take Screenshots in Linux/Fedora'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsTaPi_aAB5mVPPE1avHkYXp3D20fcsJMo95DI6g0KcDj-PAlGgWwGuYXRTcFJKM-GgRsMJzRoOJL6sHIWBhJ3XlpKl_8YBkMzufNzOGvWWLgOBIGeJiK-rmQHs3HjuO6Dz520R2pLAIFh/s72-c/Screenshot-kdegraphics.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Bengaluru, Karnataka, India</georss:featurename><georss:point>12.9715987 77.5945627</georss:point><georss:box>12.724026199999999 77.2787057 13.2191712 77.910419699999991</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-2572616104134626571</id><published>2011-12-21T04:04:00.000-08:00</published><updated>2011-12-26T02:43:49.746-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="postgresql"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><title type='text'>POSTGRESQL: Ident authentication error</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Today,&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;I was trying to configure POSTGRESQL server in Fedora Linux OS system. On my surprise, when I typed:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;# psql -d railsapp_development -U rails_db_user -W&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;It gave me the following error:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 22px;&quot;&gt;# psql: FATAL: Ident authentication failed for user &quot;username&quot;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;For, solving this issue, you will have to edit the following file:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;vim&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 18px;&quot;&gt;/var/lib/pgsql/data/pg_hba.conf&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;This file has various functionalites apart from controlling how the user/clients are &amp;nbsp;authenticated. By default, POSTGRESQL, supporst IDENT based authentication. IDENT based authentication will not allow you to login with -U and -W option.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;The following changes has to be done inside pg_hba.conf file:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;&lt;b&gt;# Type &amp;nbsp; &amp;nbsp;Database &amp;nbsp; &amp;nbsp; User &amp;nbsp; &amp;nbsp; CIDR-ADDRESS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;METHOD&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;&lt;b&gt;----------------------------------------------------------------------------------------------------&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt; local &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;all &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trust&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; host &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; all &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 18px;&quot;&gt;all &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 18px;&quot;&gt;127.0.0.1/32&lt;b&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trust&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;Basically you will have to replace &lt;b&gt;ident &lt;/b&gt;with &lt;b&gt;trust&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;Now restart the server with the following command:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;&lt;b&gt;# /etc/init.d/postgresql restart&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;After this you will be able to login.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;Note, that I was facing the above mentioned error, when I was trying to invoke the command &lt;b&gt;rake db:migrate &lt;/b&gt;in rails.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18px;&quot;&gt;But after doing the above mentioned changes, migrations started working fine.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/2572616104134626571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2011/12/today-i-was-trying-to-configure.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/2572616104134626571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/2572616104134626571'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2011/12/today-i-was-trying-to-configure.html' title='POSTGRESQL: Ident authentication error'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total><georss:featurename>Bengaluru, Karnataka, India</georss:featurename><georss:point>12.9715987 77.5945627</georss:point><georss:box>12.724026199999999 77.2787057 13.2191712 77.910419699999991</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-3116760304872339675</id><published>2011-11-10T06:31:00.000-08:00</published><updated>2011-12-26T02:46:52.871-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="activerecord-sqlserver-adapter"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby-odbc"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2008"/><title type='text'>Rails, SQL Server 2008 &amp; Windows - Tips and Tricks !!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;In this post, I will be discussing in short about the configuration one need&#39;s to do for Rails, SQL Server 2008 and Windows XP system.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;My configuration in my current system is:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;1. Ruby: ruby 1.9.1p429 (2010-07-02 revision 28523) [i386-mingw32]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;2. Rails 2.3.8&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;3. OS: Windows XP.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;4. SQL Server 2008 &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Note, that I have downloaded Ruby from rubyinstaller site, the link is mentioned below in this post. &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;First of all, we need two gems to be installed in our system to work with SQL Server 2008&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;1. activerecord-sqlserver-adapter, command for installation: &lt;b&gt;gem install activerecord-sqlserver-adapter -v=2.3.6&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;2. ruby-odbc, command for installation: &lt;b&gt;gem install ruby-odbc&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Please note, without these two gems thing will not work properly.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;activerecord-sqlserver-adapter &lt;/b&gt;has other higher versions, which i presume works with rails 3.0 + versions. For my purpose, I have used the version, 2.3.6&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Before installing, &lt;b&gt;ruby-odbc gem, &lt;/b&gt;you will need to install the ruby development kit from the ruby installer site. The links for rubyinstaller site are:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;1. http://rubyinstaller.org/&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;2. http://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;3. https://github.com/oneclick/rubyinstaller/wiki/Development-Kit (installation instructions can be found out here)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Without installing the devkit, the ruby-odbc gem will not be able to install.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Now, in the next step, we will have to create&amp;nbsp; dsn link for odbc connection.You can get a idea about to create it by going through this link: http://www.ehow.com/how_4642566_setup-odbc-database-connection.html&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Once, the dsn link is done and lets assume that you have named it as &lt;b&gt;dsn_link&lt;/b&gt;, you have to enter the information in your database.yml file. Here is a snapshot of my database.yml&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;development:&lt;br /&gt;&amp;nbsp; adapter: sqlserver&lt;br /&gt;&amp;nbsp; mode: odbc&lt;br /&gt;&amp;nbsp; dsn: dsn_link&lt;br /&gt;&amp;nbsp; username: my_username&lt;br /&gt;&amp;nbsp; password: my_password&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;This is it !!. Restart your development server and now your application will be pointing to the SQL server configuration :)&lt;i&gt;&lt;b&gt; &lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/3116760304872339675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2011/11/rails-sql-server-2008-and-windows.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/3116760304872339675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/3116760304872339675'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2011/11/rails-sql-server-2008-and-windows.html' title='Rails, SQL Server 2008 &amp; Windows - Tips and Tricks !!'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total><georss:featurename>Bengaluru, Karnataka, India</georss:featurename><georss:point>12.9715987 77.5945627</georss:point><georss:box>12.724026199999999 77.2787057 13.2191712 77.910419699999991</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-3436627910000883519</id><published>2011-10-28T01:42:00.000-07:00</published><updated>2011-12-26T02:40:50.013-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Gem.source_index is deprecated, use Specification ( ERROR in Rails)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Hi,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Today, while setting up my new system with Rails, I was getting the following error when starting mongrel/webrick dev server:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Gem.source_index called from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/rails/gem_dependency.rb:21.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;NOTE: Gem::SourceIndex#refresh! is deprecated with no replacement. It will be removed on or after 2011-11-01.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Gem::SourceIndex#refresh! called from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/rails/vendor_gem_source_index.rb:34.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;NOTE: Gem::SourceIndex#load_gems_in is deprecated with no replacement. It will be removed on or after 2011-11-01.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Gem::SourceIndex#load_gems_in called from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:322.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Gem::SourceIndex#add_spec called from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:127.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Gem::SourceIndex#add_spec called from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:127.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Gem::SourceIndex#add_spec called from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:127.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Gem::SourceIndex#add_spec called from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:127.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;My configuration for rails was:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Ruby version 1.9.2&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Rails version 2.3.8&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;gems version 1.8.11&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;OS version: Windows XP.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;I solved the problem very easily. If you notice in the configuration section, my gem version is 1.8.11. This is causing the issue. So, I downgraded my gem version to 1.6.2 and the problem was SOLVED !!.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;The following is the command for downgrading the gem version:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;gem update --system 1.6.2&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Hope that this small instruction will help someone !!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/3436627910000883519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2011/10/gemsourceindex-is-deprecated-use.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/3436627910000883519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/3436627910000883519'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2011/10/gemsourceindex-is-deprecated-use.html' title='Gem.source_index is deprecated, use Specification ( ERROR in Rails)'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-5347847425262023198</id><published>2011-09-23T02:54:00.000-07:00</published><updated>2011-12-26T02:41:04.478-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Multiple Table Inheritance"/><category scheme="http://www.blogger.com/atom/ns#" term="Polymorphic Association"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Single Table Inheritance"/><title type='text'>Polymorphic Association in Rails , Single Table Inheritance – Part I</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 0.5in; text-align: justify; text-indent: -0.5in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;From wikipidiea:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;“Polymorphic association is a term used in discussions of Object-Relational Mapping with respect to the problem of representing in the relational database domain, a relationship from one class to multiple classes. In statically typed languages such as Java these multiple classes are subclasses of the same superclass. In languages with Duck Typing, such as Ruby, this is not necessarily the case”.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;In Rails, ActiveRecord provides you feature by which you can have Polymorphic association (relationship) between two tables without knowing which table will be in the relationship. You can have “XOR” relationships. That is, X can have either of Y or Z, but not both. &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;There are basically two ways of achieving Polymorphic Association in Rails: &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.75in; mso-add-space: auto; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Single Table Inheritance &amp;nbsp;(STI)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 10pt 0.75in; mso-add-space: auto; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Multiple Table Inheritance (MTI)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Single Table Inheritance&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;In STI, you can have only one single SQL table to maintain the relationships between two or more different model class of rails. &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Let us assume for the explanation purpose, that we want to build a mobile catalogue system. &amp;nbsp;Mobiles are of various types based on their OS, lets categorize our catalogues system based on the OS of mobile. &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;So our model definitions will be something similar to this:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Mobile Class:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;class&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;Mobile &amp;lt; ActiveRecord::Base &lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;end&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;IOS class:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;class IOS &amp;lt; Mobile&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;end&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Android class:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;class Android &amp;lt; Mobile&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;
&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;end&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 0.5in; text-align: justify; text-indent: -0.5in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 0.5in; text-align: justify; text-indent: -0.5in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;In the mobile table, we will have to put a column called &quot;&lt;strong&gt;&lt;em&gt;type&lt;/em&gt;&lt;/strong&gt;&quot; to indicate that the table is STI.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 0.5in; text-align: left; text-indent: -0.5in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;The table structure will be something, similar to this: &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;CREATE&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;TABLE&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;mobiles ( &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;id INT&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;NOT&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;NULL&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;AUTO_INCREMENT, &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;name&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;VARCHAR(25) NOT&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;NULL&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;UNIQUE, &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;price VARCHAR(10) NOT&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;NULL, &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;type VARCHAR(10) NOT&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;NULL, &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;PRIMARY&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;KEY&lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;(id) &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 0.5in; text-align: justify; text-indent: -0.5in;&quot;&gt;
&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 0.5in; text-align: justify; text-indent: -0.5in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 0.5in; text-align: justify; text-indent: -0.5in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 0.5in; text-align: justify; text-indent: -0.5in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;The &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;“type” &lt;/b&gt;column should store the class names, i.e the class type for each mobile. So in this case, it will be either IOS or Android.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 0.5in; text-align: justify; text-indent: -0.5in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 0.5in; text-align: justify; text-indent: -0.5in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;In the next part, we see how we can achieve, Multiple Table Inheritance in rails. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/5347847425262023198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2011/09/polymorphic-association-in-rails-single.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/5347847425262023198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/5347847425262023198'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2011/09/polymorphic-association-in-rails-single.html' title='Polymorphic Association in Rails , Single Table Inheritance – Part I'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-4775718127091921978</id><published>2011-09-15T23:34:00.000-07:00</published><updated>2011-12-26T02:41:17.714-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Background Process"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="Starling"/><title type='text'>Complete guide for setting up Starling</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Complete guide for&lt;a href=&quot;http://rubypond.com/blog/the-complete-guide-to-setting-up-starling&quot; title=&quot;&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;span style=&quot;color: #6666cc;&quot;&gt; setting up starling&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;.&amp;nbsp;It includes installation, configuration and monitoring of the services&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/4775718127091921978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2011/09/complete-guide-for-setting-up-starling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/4775718127091921978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/4775718127091921978'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2011/09/complete-guide-for-setting-up-starling.html' title='Complete guide for setting up Starling'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-2307000349954434771</id><published>2011-09-15T23:21:00.000-07:00</published><updated>2011-12-26T02:41:28.000-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="define_method"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamic Method Generation"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Dynamically generating methods with the help of define_method in Ruby</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Ruby language provides a very interesting feature with the help of which you can dynamically generate methods at &lt;em&gt;run-time&lt;/em&gt;. Yes you have read it correctly, you can write codes which will generate methods for you :).&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;So how can you do it in ruby ? Well, Ruby provides a method called &lt;strong style=&quot;font-style: italic;&quot;&gt;define_method. &lt;/strong&gt;This method is a private class method&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Here is the syntax :&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.ruby-doc.org/core/classes/Module.src/M000497.html&quot; target=&quot;Code&quot; title=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;define_method(symbol, method)&lt;br /&gt;
define_method(symbol) { block }&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;where,&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;em&gt;&lt;strong&gt;&lt;span style=&quot;color: #009900;&quot;&gt;symbol&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt; is the method name; it can be either a symbol, a string, or a variable whose value contains the method name.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;span style=&quot;color: #009900;&quot;&gt;method&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt; is a lambda or Proc object containing the method logic.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Let me define a very simple method, which will print a hello message for the demonstration purpose. This example will generate an instance method, therefore we will have to create a object for printing the hello message&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;em&gt;class D&lt;br /&gt;
&amp;nbsp; define_method(:hello) do |h|&lt;br /&gt;
&amp;nbsp; &amp;nbsp; puts &quot;Hello !!&quot;&lt;br /&gt;
&amp;nbsp; end&lt;br /&gt;
end&lt;br /&gt;
&lt;/em&gt;&lt;em&gt;C.new.hello(&#39;Jack&#39;) &amp;nbsp; =&amp;gt; Hello Jack !!&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Note that, this is a very simple example. Here I wanted to describe the basic idea of define_method provided in Ruby.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/2307000349954434771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2011/09/dynamically-generating-methods-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/2307000349954434771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/2307000349954434771'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2011/09/dynamically-generating-methods-with.html' title='Dynamically generating methods with the help of define_method in Ruby'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2630200242060123289.post-2671011358018958498</id><published>2011-09-15T23:07:00.001-07:00</published><updated>2011-12-26T02:41:39.178-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Pik"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby Multiple Versions"/><title type='text'>Managing multiple version of Ruby and Rails in Windows: PIK</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Here I will give a breif description about a tool called &lt;strong&gt;Pik&lt;/strong&gt; (&lt;a href=&quot;https://github.com/vertiginous/pik&quot; title=&quot;&quot;&gt;https://github.com/vertiginous/pik&lt;/a&gt;), &lt;strong&gt;a ruby version manager&lt;/strong&gt; for Windows. &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;With the help of &lt;strong&gt;Pik, &lt;/strong&gt;one can have multiple version of Ruby and Rails in his system. Find below the steps that are required for installing Pik:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;1. Go to &lt;a href=&quot;http://rubyforge.org/&quot; target=&quot;_blank&quot; title=&quot;&quot;&gt;RubyForge&lt;/a&gt;&amp;nbsp;and download Ruby. If Ruby is already present, then skip step 1.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;2. For installing pik, run the following command from your terminal. &lt;em&gt;gem install pik.&amp;nbsp;You should see ‘&lt;em&gt;Successfully installed pik-0.2.8&lt;/em&gt;‘ message soon enough&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;3. After downloading this gem, you will need to intall pik in some directory other than &lt;strong&gt;&quot;C:\Ruby\bin&quot;. &lt;/strong&gt;You can perform the following steps:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;em&gt;&amp;nbsp;&amp;nbsp;a. d:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b. mkdir pik&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c. Include the newly created directory, i.e D:\pik in the PATH environment variable.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d. pik_install D:\pik&lt;/em&gt;Pik will be now installed in your system. &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: medium;&quot;&gt;&lt;u&gt;Using Pik&lt;/u&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;I can now start using Pik for mantaining multiple versions of Ruby and Rails !!. &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;em&gt;&amp;gt;pik&lt;br /&gt;
** Adding:&amp;nbsp; 187: ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-mingw32]&lt;br /&gt;
Located at:&amp;nbsp; C:\Ruby187\bin&lt;br /&gt;
Usage: pik command [options] &lt;br /&gt;
&lt;br /&gt;
&lt;/em&gt;Executing pik list outputs all the ruby installations it knows about.&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;gt;&lt;em&gt;pik list&lt;br /&gt;
* 187: ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-mingw32]&lt;br /&gt;
&amp;nbsp; 192: ruby 1.9.2p290 (2011-07-09) [i386-mingw32]&lt;br /&gt;
&amp;nbsp;&lt;/em&gt;As Rails 3.0 requires 1.8.7 or higher, let’s install the latest version of Ruby. &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;You can then switch to the particular version you want, for example originally I was running 1.8.7. &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;em&gt;&amp;gt;ruby -v&lt;br /&gt;
ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-mingw32]&lt;br /&gt;
&lt;br /&gt;
&lt;/em&gt;But I can then switch to 1.9.2 with a simple command. &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;gt;pik switch 192 &lt;br /&gt;
&lt;br /&gt;
&amp;gt;ruby -v&lt;br /&gt;
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Now by switching the versions of ruby we can install and have different rails version. For example with ruby version 1.8.7, I can have rails 2.3.8 version and I can have rails 3.0 version by switching the ruby version to 1.9.2 !!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sauravthinks.blogspot.com/feeds/2671011358018958498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sauravthinks.blogspot.com/2011/09/managing-multiple-version-of-ruby-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/2671011358018958498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2630200242060123289/posts/default/2671011358018958498'/><link rel='alternate' type='text/html' href='http://sauravthinks.blogspot.com/2011/09/managing-multiple-version-of-ruby-and.html' title='Managing multiple version of Ruby and Rails in Windows: PIK'/><author><name>Saurav</name><uri>http://www.blogger.com/profile/04632256557437238579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Bengaluru, Karnataka, India</georss:featurename><georss:point>12.9715987 77.594562699999983</georss:point><georss:box>12.7518902 77.342821199999989 13.191307199999999 77.846304199999977</georss:box></entry></feed>