<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vinsol - Leading Ruby on Rails Development and Consulting Firm in India &#187; RubyonRails</title>
	<atom:link href="http://vinsol.com/blog/category/rubyonrails/feed/" rel="self" type="application/rss+xml" />
	<link>http://vinsol.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 26 Jul 2010 08:37:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SSL checklist for Ruby on Rails Applications</title>
		<link>http://vinsol.com/blog/2010/04/01/ssl-checklist-for-rails-applications/</link>
		<comments>http://vinsol.com/blog/2010/04/01/ssl-checklist-for-rails-applications/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 08:59:02 +0000</pubDate>
		<dc:creator>sid</dc:creator>
				<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://vinsol.com/blog/?p=857</guid>
		<description><![CDATA[Cross posted from darthsid
The purpose of SSL is to provide a reasonable level of protection against eavesdropping and man-in-the-middle attacks. Although SSL provides a greater level of security, it introduces a lot of overheads and hence should be used sparingly.  Two of the most common places to use SSL is for payment transactions and [...]


Related posts:<ol><li><a href='http://vinsol.com/blog/2009/09/07/rails-caching-and-javascript-techniques/' rel='bookmark' title='Permanent Link: Ruby on Rails Caching And JavaScript Techniques'>Ruby on Rails Caching And JavaScript Techniques</a> <small>Cross posted from darthsid While implementing caching in a recent...</small></li>
<li><a href='http://vinsol.com/blog/2009/11/16/11-things-to-consider-before-deploying-your-rails-application/' rel='bookmark' title='Permanent Link: 11 Things to Consider Before Deploying Your Ruby on  Rails Application'>11 Things to Consider Before Deploying Your Ruby on  Rails Application</a> <small>At VinSol, we have been developing and deploying Rails applications...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Cross posted from <a title="Sid's Blog" href="http://darthsid.com/blog">darthsid</a></p>
<p>The purpose of SSL is to provide a reasonable level of protection against eavesdropping and man-in-the-middle attacks. Although SSL provides a greater level of security, it introduces a lot of overheads and hence should be used sparingly.  Two of the most common places to use SSL is for payment transactions and user registration/login.<br />
This post intentionally focuses only on the Rails application as there are numerous post on the net for SSL setup on the server. Enabling SSL in a Rails application is really trivial and there are just a few points that need your attention..<br />
<span id="more-857"></span><br />
<big><big><strong>1. Enabling SSL</strong></big></big><br />
<big>a. Install the <em>ssl_requirment</em> plugin:</big></p>
<pre class="brush: bash;">
./script/plugin install git://github.com/rails/ssl_requirement.git
</pre>
<p><big>b. Include it in your <em>application_controller.rb</em>:</big></p>
<pre class="brush: ruby;">
include SslRequirement
</pre>
<p><big>c. Specify actions that require SSL in their respective controllers. For eg. my session controller has the following line:</big></p>
<pre class="brush: ruby;">
ssl_required  :new, :create if Rails.env.production?
</pre>
<p><big>d. Add the following line in <i>development.rb</i> to bypass SSL in development mode:</big></p>
<pre class="brush: ruby;">
SslRequirement.disable_ssl_check = true
</pre>
<p><big><big><strong>2. Gotcha&#8217;s</strong></big></big><br />
<big>a. Include all submit actions in requirement</big><br />
Any action that processes form data from a SSL page should also be added to the requirement. In the above example, the form on the login page(<em>new</em> action) is processed by the <em>create</em> action and hence it is also included in the requirement.<br />
<big>b. Ajax actions</big><br />
Ajax actions on a SSL page should also use SSL and must be included in the requirement. At times you do not have a body for the Ajax action and it is rendered using it&#8217;s respective RJS template. In such cases create an empty action and include it in the <em>ssl_requirement</em>.<br />
<big>c. Mixed content</big><br />
A lot of browsers show you a &#8220;Mixed Content Warning&#8221; if your SSL page references non-SSL assets. IE displays a scary looking confirmation dialog while Firefox and Chrome show a exclamation in the url bar. Any relative paths(eg. using _path helpers) on the page will automatically use the https protocol but any absolute paths(eg. using _url helper or by manually specifying as a string in link_to) will need to be changed to use https.<br />
<big>d. Asset host issue</big><br />
If you are using Rails asset hosts and do not have a SSL certificate that supports wildcard(for subdomains), then you need to disable them for the SSL pages. Just add the following code to your <em>production.rb</em>:</p>
<pre class="brush: ruby;">
ActionController::Base.asset_host = Proc.new { |source, request|
  if request.ssl?
    &amp;amp;quot;#{request.protocol}#{request.host_with_port}&amp;amp;quot;
  else
    &amp;amp;quot;#{request.protocol}assets%d.yourdomain.com&amp;amp;quot; % (source.hash % 4)
  end
}
</pre>
<p>Replace <em>&#8220;yourdomain&#8221;</em> with your apps domain and <em>&#8220;4&#8243;</em> with the number of asset hosts required.</p>
<p>The above should ensure that you have a proper SSL setup without displaying warnings to the user.</p>


<p>Related posts:<ol><li><a href='http://vinsol.com/blog/2009/09/07/rails-caching-and-javascript-techniques/' rel='bookmark' title='Permanent Link: Ruby on Rails Caching And JavaScript Techniques'>Ruby on Rails Caching And JavaScript Techniques</a> <small>Cross posted from darthsid While implementing caching in a recent...</small></li>
<li><a href='http://vinsol.com/blog/2009/11/16/11-things-to-consider-before-deploying-your-rails-application/' rel='bookmark' title='Permanent Link: 11 Things to Consider Before Deploying Your Ruby on  Rails Application'>11 Things to Consider Before Deploying Your Ruby on  Rails Application</a> <small>At VinSol, we have been developing and deploying Rails applications...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2010/04/01/ssl-checklist-for-rails-applications/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Jquery Full Calendar with Ruby on Rails</title>
		<link>http://vinsol.com/blog/2010/03/29/jquery-full-calendar-with-rails/</link>
		<comments>http://vinsol.com/blog/2010/03/29/jquery-full-calendar-with-rails/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 12:17:25 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[calendar]]></category>

		<guid isPermaLink="false">http://vinsol.com/blog/?p=834</guid>
		<description><![CDATA[Contrary to popular belief, working on a client project gives us a generous margin of creativity and explore innovative solutions. Take the example of a recent project I was working on. The client required a collaboration-based calendar module for their application similar to Google Calendar. Initially we started developing it from scratch , but then, [...]


Related posts:<ol><li><a href='http://vinsol.com/blog/2009/09/07/rails-caching-and-javascript-techniques/' rel='bookmark' title='Permanent Link: Ruby on Rails Caching And JavaScript Techniques'>Ruby on Rails Caching And JavaScript Techniques</a> <small>Cross posted from darthsid While implementing caching in a recent...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Contrary to popular belief, working on a client project gives us a generous margin of creativity and explore innovative solutions. Take the example of a recent project I was working on. The client required a collaboration-based calendar module for their application similar to Google Calendar. Initially we started developing it from scratch , but then, we found an awesome Jquery plugin. <br/> <br/></p>
<p>&#8220;<a href="http://arshaw.com/fullcalendar/">FullCalendar</a>&#8221; provides a full-sized, drag &amp; drop calendar. It uses AJAX to fetch events on-the-fly for each month. It also supports an intuitive interface to manage events that spans over multiple days or weeks. It is visually customizable and exposes hooks for user-triggered events (like clicking or dragging an event). <br/> <br/></p>
<p>I decided to give it a try and utilize its hooks for user triggered events within our Rails application. This small effort resulted in a barebone Rails app that might provide a good base for your project which require calendar, scheduling or appointment features.  I called it fullcalendar_rails  and it is now available on <a href="http://github.com/vinsol/fullcalendar_rails">github</a> with a working demo at <a href="http://fullcalendar.vinsol.com">http://fullcalendar.vinsol.com</a>.<br/><br/></p>
<p>Feel free to give your valuable feedback. I hope you will find this useful. <br/><br/></p>
<p><b>Update:</b> On popular demand, I have added recurring events functionality with daily, weekly and monthly frequencies. It also allows for exceptions to recurring events including delete and edit features.</p>
<p><br/><br/></p>


<p>Related posts:<ol><li><a href='http://vinsol.com/blog/2009/09/07/rails-caching-and-javascript-techniques/' rel='bookmark' title='Permanent Link: Ruby on Rails Caching And JavaScript Techniques'>Ruby on Rails Caching And JavaScript Techniques</a> <small>Cross posted from darthsid While implementing caching in a recent...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2010/03/29/jquery-full-calendar-with-rails/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Skiping installation of ri and RDoc documentation while installing gems</title>
		<link>http://vinsol.com/blog/2008/12/03/skiping-installation-of-ri-and-rdoc-documentation-while-installing-gems/</link>
		<comments>http://vinsol.com/blog/2008/12/03/skiping-installation-of-ri-and-rdoc-documentation-while-installing-gems/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 08:11:17 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[RubyonRails]]></category>

		<guid isPermaLink="false">http://webonrails.com/?p=145</guid>
		<description><![CDATA[Probably most of the time you would like to skip ri and RDoc installation while installing some new gems, specially on production server. 
I do like to skip ri and RDoc documentation while installing gems on my development machine, because it takes more time to generate ri and RDoc then actual installation of gem.
We can [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Probably most of the time you would like to skip ri and RDoc installation while installing some new gems, specially on production server. </p>
<p>I do like to skip ri and RDoc documentation while installing gems on my development machine, because it takes more time to generate ri and RDoc then actual installation of gem.</p>
<p>We can skip rdoc and ri documentation while installing a gem by:</p>
<textarea name="code" class="ruby" cols="60" rows="10">
gem install rails --no-ri --no-rdoc
</textarea>
<p>I am sure that you would not like to give &#8211;no-ri and &#8211;no-rdoc every time you install a gem. To avoid this situation, you can create/update $HOME/.gemrc file with following option:</p>
<textarea name="code" class="c" cols="60" rows="10">
gem: --no-ri --no-rdoc
</textarea>
<p>Now every time you install a gem, it will skip installation of ri and RDoc for the gem.</p>
<p>My .gemrc file looks like:</p>
<textarea name="code" class="ruby" cols="60" rows="10">
---
:update_sources: true
:sources:
- http://gems.rubyforge.org/
- http://gems.github.com
:benchmark: false
:bulk_threshold: 1000
:backtrace: false
:verbose: true
gem: --no-ri --no-rdoc
</textarea></p>

<p><a href="http://feedads.googleadservices.com/~a/t6q4yh3w-G0Sv8ah4hlN42bSlak/a"><img src="http://feedads.googleadservices.com/~a/t6q4yh3w-G0Sv8ah4hlN42bSlak/i" border="0" ismap="true"></img></a></p><img src="http://feedproxy.google.com/~r/WebOnRails/~4/sebSQ4uGJ10" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2008/12/03/skiping-installation-of-ri-and-rdoc-documentation-while-installing-gems/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google maps like image browsing?</title>
		<link>http://vinsol.com/blog/2008/11/28/google-maps-like-image-browsing/</link>
		<comments>http://vinsol.com/blog/2008/11/28/google-maps-like-image-browsing/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 13:00:28 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[RubyonRails]]></category>

		<guid isPermaLink="false">http://webonrails.com/?p=138</guid>
		<description><![CDATA[Does anybody over there have any idea about any library that facilitates us to implement google maps like image browsing?
Basically I want to implement something like where a user can drag drop large image to view specific portion.



No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Does anybody over there have any idea about any library that facilitates us to implement google maps like image browsing?</p>
<p>Basically I want to implement something like where a user can drag drop large image to view specific portion.</p>

<p><a href="http://feedads.googleadservices.com/~a/DtzxC0Yr9QQzESwXkKD42wMj5_o/a"><img src="http://feedads.googleadservices.com/~a/DtzxC0Yr9QQzESwXkKD42wMj5_o/i" border="0" ismap="true"></img></a></p><img src="http://feedproxy.google.com/~r/WebOnRails/~4/zdOrWwC11YM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2008/11/28/google-maps-like-image-browsing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Introduction  of Apache rewrite rules</title>
		<link>http://vinsol.com/blog/2008/11/28/basic-introduction-of-apache-rewrite-rules/</link>
		<comments>http://vinsol.com/blog/2008/11/28/basic-introduction-of-apache-rewrite-rules/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 09:03:46 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[RubyonRails]]></category>

		<guid isPermaLink="false">http://webonrails.com/?p=136</guid>
		<description><![CDATA[Today, I had a basic talk about apache&#8217;s rewrite rules. Slides are below:
Apache Rewrite Rules
View SlideShare presentation or Upload your own. (tags: apache rewrite)




No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Today, I had a basic talk about apache&#8217;s rewrite rules. Slides are below:</p>
<div  id="__ss_796748"><a  href="http://www.slideshare.net/bansalakhil/apache-rewrite-rules-presentation?type=powerpoint" title="Apache Rewrite Rules">Apache Rewrite Rules</a><object  width="425" height="355"><param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=apacherewriterules-1227862473547690-8&#038;stripped_title=apache-rewrite-rules-presentation" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=apacherewriterules-1227862473547690-8&#038;stripped_title=apache-rewrite-rules-presentation" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div >View SlideShare <a  href="http://www.slideshare.net/bansalakhil/apache-rewrite-rules-presentation?type=powerpoint" title="View Apache Rewrite Rules on SlideShare">presentation</a> or <a  href="http://www.slideshare.net/upload?type=powerpoint">Upload</a> your own. (tags: <a  href="http://slideshare.net/tag/apache">apache</a> <a  href="http://slideshare.net/tag/rewrite">rewrite</a>)</div>
</div>

<p><a href="http://feedads.googleadservices.com/~a/_hYOhwpKQuZ_j1oLPuIJZaQXu4w/a"><img src="http://feedads.googleadservices.com/~a/_hYOhwpKQuZ_j1oLPuIJZaQXu4w/i" border="0" ismap="true"></img></a></p><img src="http://feedproxy.google.com/~r/WebOnRails/~4/gdh7BCjjzaY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2008/11/28/basic-introduction-of-apache-rewrite-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebByNode: A New Hosting Service Launching Soon</title>
		<link>http://vinsol.com/blog/2008/11/08/webbynode-a-new-hosting-service-launching-soon/</link>
		<comments>http://vinsol.com/blog/2008/11/08/webbynode-a-new-hosting-service-launching-soon/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 03:36:04 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[RubyonRails]]></category>

		<guid isPermaLink="false">http://webonrails.com/?p=114</guid>
		<description><![CDATA[Guys, I received a mail today that there will be a new hosting service launching soon. They said that it makes easier to deploy your applications. Whether its Ruby on Rails, Django, LAMP or your choice  of Linux Distribution, its a ready-to-go solution. For more information please visit http://www.webbynode.com/
I am signing up there as [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Guys, I received a mail today that there will be a new hosting service launching soon. They said that it makes easier to deploy your applications. Whether its Ruby on Rails, Django, LAMP or your choice  of Linux Distribution, its a ready-to-go solution. For more information please visit <a href="http://www.webbynode.com/">http://www.webbynode.com/</a></p>
<p>I am signing up there as a beta tester. Lets see how webby-node can help rails community by its services.</p>

<p><a href="http://feedads.googleadservices.com/~a/d98mQMkFAtl7HsHT-UrFGRVvu3w/a"><img src="http://feedads.googleadservices.com/~a/d98mQMkFAtl7HsHT-UrFGRVvu3w/i" border="0" ismap="true"></img></a></p><img src="http://feedproxy.google.com/~r/WebOnRails/~4/PV_xD5spLEQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2008/11/08/webbynode-a-new-hosting-service-launching-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Funday: A Day full of Ruby fun event in India</title>
		<link>http://vinsol.com/blog/2008/11/04/ruby-funday-a-day-full-of-ruby-fun-event-in-india/</link>
		<comments>http://vinsol.com/blog/2008/11/04/ruby-funday-a-day-full-of-ruby-fun-event-in-india/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 13:45:01 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[RubyonRails]]></category>

		<guid isPermaLink="false">http://webonrails.com/?p=106</guid>
		<description><![CDATA[Monday, Tuesday, Wednesday, Thursday, Friday, Funday and Sunday. 
Surprised, This is not a typo. Saturday is now converted to Funday. How??? Why??? When???
Geekeerie has started organizing new kind of events in India. One of those kinds of event is Ruby Funday. Which is a full day pure geek ruby event. Where geeks will show their [...]


Related posts:<ol><li><a href='http://vinsol.com/blog/2010/03/29/jquery-full-calendar-with-rails/' rel='bookmark' title='Permanent Link: Jquery Full Calendar with Ruby on Rails'>Jquery Full Calendar with Ruby on Rails</a> <small>Contrary to popular belief, working on a client project gives...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Monday, Tuesday, Wednesday, Thursday, Friday, Funday and Sunday. </p>
<p>Surprised, This is not a typo. Saturday is now converted to Funday. How??? Why??? When???</p>
<p><a href="http://geekeerie.com/" target ="_blank">Geekeerie</a> has started organizing new kind of events in India. One of those kinds of event is <a href="http://www.rubyonrails.in/events/3" >Ruby Funday</a>. Which is a full day pure geek ruby event. Where geeks will show their code, tricks and funde <img src='http://webonrails.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .<br />
<a href="http://www.rubyonrails.in/events/3"><img alt="" src="http://assets1.rubyonrails.in/system/event/event_logo/3/medium/350x350Banner.png?1225773969" align = left width="100"  /></a><br />
The first Ruby Funday is scheduled for 22, Nov 2008 at Noida, India. For more details please visit their <a href="http://rubyonrails.in" >site(beta)</a>.</p>
<p><a href="http://feedads.googleadservices.com/~a/L_BILt6GFnDgqvNFnAzlm1lEAfs/a"><img src="http://feedads.googleadservices.com/~a/L_BILt6GFnDgqvNFnAzlm1lEAfs/i" border="0" ismap="true"></img></a></p>
<p><img src="http://feedproxy.google.com/~r/WebOnRails/~4/pToAuOsAgdA" height="1" width="1"/></p>


<p>Related posts:<ol><li><a href='http://vinsol.com/blog/2010/03/29/jquery-full-calendar-with-rails/' rel='bookmark' title='Permanent Link: Jquery Full Calendar with Ruby on Rails'>Jquery Full Calendar with Ruby on Rails</a> <small>Contrary to popular belief, working on a client project gives...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2008/11/04/ruby-funday-a-day-full-of-ruby-fun-event-in-india/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hoptoad: A Rails Exception Handling Service</title>
		<link>http://vinsol.com/blog/2008/08/12/hoptoad-an-rails-exception-handling-service/</link>
		<comments>http://vinsol.com/blog/2008/08/12/hoptoad-an-rails-exception-handling-service/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 10:31:17 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Rails Deprecations]]></category>
		<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[exceptions]]></category>
		<category><![CDATA[hoptoad]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails plugins]]></category>
		<category><![CDATA[thoughtbot]]></category>

		<guid isPermaLink="false">http://webonrails.com/2008/08/12/hoptoad-an-rails-exception-handling-service/</guid>
		<description><![CDATA[Many of you guys(as me) may have used Exception Notifier plugin to get Rails app exceptions right into your mailbox, and may also have faced some problem like this. 
Also if you have 2-3 or more apps running in production then managing such exception mails is also a big headache. In such case one have [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Many of you guys(as me) may have used Exception Notifier plugin to get<a href="http://webonrails.com/2006/12/28/plugin-exception-notifier-get-detail-information-of-exceptions-occurred-on-the-live-server-right-on-your-inbox/"> Rails app exceptions right into your mailbox</a>, and may also have faced some problem like <a href="http://webonrails.com/2007/07/26/careful-while-using-exception-notifier-plugin/">this</a>. </p>
<p>Also if you have 2-3 or more apps running in production then managing such exception mails is also a big headache. In such case one have to keep track of many things like which type of error is resolved/unresolved for which project etc&#8230; .</p>
<p>So, here is a good news for those who don&#8217;t know about <a href="http://www.thoughtbot.com/">Hoptoad</a>. It is an hosted service by <a href="http://www.thoughtbot.com/">thoughtbot</a> which receives your exceptions, notify you once per error type by email and keep track(resolved/unresolved, count etc&#8230;) of your errors on project basis. </p>
<p>By now its a free service. I&#8217;m gonna use this as my next project goes live. What abt you??? ;-P</p>
]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2008/08/12/hoptoad-an-rails-exception-handling-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hosting Rails app and Wordpress on same domain(as folder instead of subdomain)</title>
		<link>http://vinsol.com/blog/2008/08/08/hosting-rails-app-and-wordpress-on-same-domainas-folder-instead-of-subdomain/</link>
		<comments>http://vinsol.com/blog/2008/08/08/hosting-rails-app-and-wordpress-on-same-domainas-folder-instead-of-subdomain/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 08:35:31 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[virtualhost]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://webonrails.com/2008/08/08/hosting-rails-app-and-wordpress-on-same-domainas-folder-instead-of-subdomain/</guid>
		<description><![CDATA[Hey guys, Yesterday I did an interesting server configuration. Actually we had a rails app hosted on server which is using passenger(a.k.a mod_rails). This application can be access by going to http://domain.com . Also we had a wordpress running which could be access by going to http://blog.domain.com. 
But, for SEO sake I had to change [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Hey guys, Yesterday I did an interesting server configuration. Actually we had a rails app hosted on server which is using <a href="http://www.modrails.com/" target = '_blank'>passenger</a>(a.k.a mod_rails). This application can be access by going to http://domain.com . Also we had a wordpress running which could be access by going to http://blog.domain.com. </p>
<p>But, for SEO sake I had to change configuration so that wordpress can be access by http://domain.com/blog instead of http://blog.domain.com/</p>
<p>The problem was if I configure wordpress for http://domain.com/blog and go to this url, the request was handled by rails app because of domain.com virtualhost. </p>
<p>So what I did? I changed apache virtualhost configuration for http://blog.domain.com and http://domain.com as:</p>
<textarea name="code" class="c" cols="50" rows="10">
<VirtualHost *>
    ServerName blog.domain.com

    DocumentRoot /var/www/html/wordpress/
    <Directory "/var/www/html/wordpress/">
      Options FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
   </Directory>
 </VirtualHost>


<VirtualHost *>
    ServerName domain.com
    ServerAlias www.domain.com
    DocumentRoot /var/www/html/domain/current/public
    <Directory "/var/www/html/domain/current">
      Options FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
    </Directory>
    
  RailsAllowModRewrite  on
  RewriteRule ^/blog/?(.*)$ http://blog.domain.com/$1 [P,NC,L]

 </VirtualHost>

</textarea>
<p>Also I created a symbolic link to wordpress installation directory under rails public folder(ln -s /var/www/html/wordpress /var/www/html/railsapp/blog).</p>
<p>I restarted apache and it worked fine. Wordpress was running at http://domain.com/blog and rails app was as http://domain.com/.
</p>
]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2008/08/08/hosting-rails-app-and-wordpress-on-same-domainas-folder-instead-of-subdomain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When Ultrasphinx is used with STI…</title>
		<link>http://vinsol.com/blog/2008/07/31/when-ultrasphinx-is-used-with-sti%e2%80%a6/</link>
		<comments>http://vinsol.com/blog/2008/07/31/when-ultrasphinx-is-used-with-sti%e2%80%a6/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 14:06:38 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[STI]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ultrasphinx]]></category>

		<guid isPermaLink="false">http://webonrails.com/2008/07/31/when-ultrasphinx-is-used-with-sti/</guid>
		<description><![CDATA[Hi Guys, it has been a long time since I last posted. I had worked on several things since then, and have couple of posts pending/draft. One of those posts is related to Ultrasphinx, when it is used with STI models.
For those who are new to Ultrasphinx: Ultrasphinx is a rails plugin and client to [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Hi Guys, it has been a long time since I last posted. I had worked on several things since then, and have couple of posts pending/draft. One of those posts is related to Ultrasphinx, when it is used with STI models.</p>
<p>For those who are new to Ultrasphinx: Ultrasphinx is a rails plugin and client to the Sphinx(full text search engine) written by Evan Weaver. More about <a href = "http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/README.html" target = '_blank'>Ultrasphinx here.</a></p>
<p>Lets get into the situation. Consider a STI case where we are using ultrasphinx to index several fields:</p>
<textarea name="code" class="ruby" cols="50" rows="10">
class Post < ActiveRecord::Base

end
</textarea>
<textarea name="code" class="ruby" cols="50" rows="10">
class Article < Post
  is_indexed :fields => [:title, :body]
end
</textarea>
<textarea name="code" class="ruby" cols="50" rows="10">
class Story < Post
  is_indexed :fields => [:title, :body]
end
</textarea>
<p>Now assume we have following data in posts table:<br />
<img id="image116" src="http://webonrails.com/wp-content/uploads/2008/07/picture-4.png" alt="picture-4.png" /><br />
and now in application root:</p>
<textarea name="code" class="ruby" cols="50" rows="10">
rake ultrasphinx:configure
rake ultrasphinx:index
rake ultrasphinx:daemon:start
</textarea>
<p>By this point we have created sphinx configuration file, indexed all records from ultrasphinx models and started sphinx search daemon.</p>
<p>Now open script/console and create and fire a query to find some articles:</p>
<textarea name="code" class="ruby" cols="50" rows="10">
>> search = Ultrasphinx::Search.new(:query => "second article", :class_names => 'Article')
=> #<Ultrasphinx::Search:0x2105bec @subtotals={}, @response={}, @facets={}, @options={"indexes"=>"main", "class_names"=>["Article"], "sort_by"=>nil, "parsed_query"=>"second article", "sort_mode"=>"relevance", "weights"=>{}, "filters"=>{}, "per_page"=>20, "query"=>"second article", "page"=>1, "facets"=>[], "location"=>{"units"=>"radians", "long_attribute_name"=>"lng", "lat_attribute_name"=>"lat"}}, @results=[]>
>> search.run
ActiveRecord::RecordNotFound: Couldn't find Article with ID=5
	from /Users/akhilbansal/work/sti/vendor/plugins/ultrasphinx/lib/ultrasphinx/search/internals.rb:308:in `reify_results'
	from /Users/akhilbansal/work/sti/vendor/plugins/ultrasphinx/lib/ultrasphinx/search/internals.rb:286:in `each'
	from /Users/akhilbansal/work/sti/vendor/plugins/ultrasphinx/lib/ultrasphinx/search/internals.rb:286:in `reify_results'
	from /Users/akhilbansal/work/sti/vendor/plugins/ultrasphinx/lib/ultrasphinx/search.rb:357:in `run'
	from /Users/akhilbansal/work/sti/vendor/plugins/ultrasphinx/lib/ultrasphinx/search/internals.rb:352:in `perform_action_with_retries'
	from /Users/akhilbansal/work/sti/vendor/plugins/ultrasphinx/lib/ultrasphinx/search.rb:337:in `run'
	from (irb):3
</textarea>
<p>Here when you run the query you get an exception, because it is trying to find an article with id 5, which actually a story type not article. So why it is trying to find such article?</p>
<p>Now have a look into config/ultrasphinx/development.conf file. Under section &#8220;source articles_main&#8221; you&#8217;ll get &#8220;SELECT (posts.id * 3 + 0) AS id, &#8216;&#8217; AS article_title, posts.body AS body, &#8216;Article&#8217; AS class, 0 AS class_id, posts.title AS title FROM posts WHERE posts.id >= $start AND posts.id <= $end GROUP BY posts.id" Which is a SQL to get record to index.</p>
<p>If you check it carefully you'll findout that it should select all articles record to index but unfortunately it is selecting all records from table and considering them as articles. To fix it you need to modify this query and add "posts.type = 'Article'" in where condition. So the query should be "SELECT (posts.id * 3 + 0) AS id, '' AS article_title, posts.body AS body, 'Article' AS class, 0 AS class_id, posts.title AS title FROM posts WHERE (posts.type = 'Article') and posts.id >= $start AND posts.id <= $end GROUP BY posts.id" </p>
<p>But still there is a problem. If you do this manually you have to do it again and again whenever you issue "rake ultrasphinx:configure" because this configuration file will be overwritten.</p>
<p>Better option is to add conditions in models as is_indexed options like:</p>
<textarea name="code" class="ruby" cols="50" rows="10">
class Article < Post
  is_indexed :fields => [:title, :body], :conditions => "posts.type = 'Article'"
end
</textarea>
<p>and it worked fine.</p>
<p><a href = 'http://fromdelhi.com' target = '_blank'>Manik</a> gave me an idea to write a patch for ultrasphinx to add such conditions automatically in case of STI. So may be another post related to ultrasphinx will be soon ;-)</p>
<p><strong><em>Update:</em> Here is the patch <a href="http://webonrails.com/wp-content/plugins/wp-downloadMonitor/download.php?id=11" title="Version 0.1 downloaded 1 times" >Git patch: Fix STI Issue</a>. After applying this patch you need not to add conditions explicitly for such case. It will automatically check and add conditions for STI. </strong>
</p>
]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2008/07/31/when-ultrasphinx-is-used-with-sti%e2%80%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
