<?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>InstaCarma Blog &#187; rails</title>
	<atom:link href="http://www.instacarma.com/blog/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.instacarma.com/blog</link>
	<description>Information Resource for Web Hosting Technical Support and Server Management</description>
	<lastBuildDate>Sat, 10 Mar 2012 21:44:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>File Uploading with Paper clip</title>
		<link>http://www.instacarma.com/blog/technical/file-uploading-with-paper-clip/</link>
		<comments>http://www.instacarma.com/blog/technical/file-uploading-with-paper-clip/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 07:13:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles and tutorials]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[File Uploading with Paper clip]]></category>
		<category><![CDATA[Paper clip]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1438</guid>
		<description><![CDATA[Filed under: File Uploading with Paper clip, Paper clip, rails This is one of the most useful plug in that can be used in your application when you require to upload a file as attachment to your application, its quite easy to use and with the help of paperclip scaffolding you can achieve file upload [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/file-uploading-with-paper-clip/'>File Uploading with Paper clip</a>, <a href='http://www.instacarma.com/blog/tag/paper-clip/'>Paper clip</a>, <a href='http://www.instacarma.com/blog/tag/rails/'>rails</a></p>
<p><a href="http://instacarma.com/blog/wp-content/uploads/2011/02/blog.png"><img class="alignright size-full wp-image-1441" title="blog" src="http://instacarma.com/blog/wp-content/uploads/2011/02/blog.png" alt="" width="242" height="174" /></a>This is one of the most useful plug in that can be used in your application when you require to upload a file as attachment to your application, its quite easy to use and with the help of paperclip scaffolding you can achieve file upload feature very easily, below i have explained the steps to create a simple application using scaffolding that enables the file upload feature with the help of paperclip plugin.</p>
<p>Steps:<br />
Install the required gems to run the paperclip plugin from the below mentioned command,</p>
<p style="padding-left: 30px;"><em>$ gem sources -a http://gemcutter.org<br />
http://gemcutter.org added to sources<br />
$ sudo gem install view_mapper<br />
Successfully installed view_mapper-0.2.0<br />
1 gem installed Installing ri documentation for view_mapper-0.2.0&#8230;<br />
Installing RDoc documentation for view_mapper-0.2.0&#8230;</em></p>
<p>1. First you need to create a rails app and change the database.yml setting and set things to install the plug in $rails student -d mysql</p>
<p>2 Then you have to just install the paperclip plugin into your application from the below mentioned command,</p>
<p style="padding-left: 30px;"><em>$ ./script/plugin install git://github.com/thoughtbot/paperclip.git</em></p>
<p>3. Once the plugin is installed, let me show you to create a simple scaffold with paperclip file attachment feature in it.<br />
Just create a simple scaffold and check it out,</p>
<p style="padding-left: 30px;"><em>$ ./script/generate scaffold_for_view Student name:string branch:string comment:string &#8211;view paperclip:photo</em></p>
<p>Then you need to enter $ rake db:create and $ rake db:migrate<br />
This will create the paperclip file attachment feature, just run $ script/server and check it out. The display looks just like the image i have mentioned at the beginning.</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/file-uploading-with-paper-clip/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/file-uploading-with-paper-clip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure Sphinx in Rails application</title>
		<link>http://www.instacarma.com/blog/technical/configure-sphinx-in-rails-application/</link>
		<comments>http://www.instacarma.com/blog/technical/configure-sphinx-in-rails-application/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 09:26:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles and tutorials]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Configure Sphinx]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Sphinx]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1430</guid>
		<description><![CDATA[Filed under: Configure Sphinx, PostgreSQL, rails, Sphinx Install Sphinx Just run the following three commands on your server or dev machine to install Sphinx: ./configure make sudo make install That will setup Sphinx with default for use with MySQL. If you want to use it with PostgreSQL, then run configure with the following flag: ./configure [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/configure-sphinx/'>Configure Sphinx</a>, <a href='http://www.instacarma.com/blog/tag/postgresql/'>PostgreSQL</a>, <a href='http://www.instacarma.com/blog/tag/rails/'>rails</a>, <a href='http://www.instacarma.com/blog/tag/sphinx/'>Sphinx</a></p>
<p><strong>Install Sphinx</strong></p>
<p>Just run the following three commands on your server or dev machine to install Sphinx:</p>
<p style="padding-left: 30px;"><em>./configure make sudo make install</em></p>
<p>That will setup Sphinx with default for use with MySQL. If you want to use it with PostgreSQL, then run configure with the following flag:</p>
<p style="padding-left: 30px;"><em>./configure &#8211;with-pgsql</em></p>
<p>Note: you can download the sphinx from http://sphinxsearch.com/downloads/beta/</p>
<p><strong>Install Thinking Sphinx</strong></p>
<p>Even though there are a couple of Sphinx plugins for Rails, I chose to go with Thinking Sphinx, as it seems to be the most popular and feature complete.<br />
So you can install it as a Rails plugin using script/plugin install command:</p>
<p><em>script/plugin install git://github.com/freelancing-god/thinking-sphinx.git</em></p>
<p><strong>Writing code to use sphinx search:</strong></p>
<p>We now need to index our models. This consists of adding a few small lines of code into each model that you want to be able to search. So lets say we have a Blog app (doesn’t everyone!), which has a Post model. And that Post model contains the usual title and description fields. We therefore add the following bit of code beneath our association declarations in</p>
<p style="padding-left: 30px;"><em>app/models/post.rb:<br />
define_index do indexes title, description end</em></p>
<p>Those very short three lines will tell Thinking Sphinx to index the title and description fields of the Post model, and allow us to search through all our posts. Now we just need to index and start Sphinx. And Thinking Sphinx makes this very easy with it’s handy Rake tasks.<br />
Just run this:</p>
<p style="padding-left: 30px;"><em>rake ts:rebuild</em></p>
<p>That will stop (if it is started), index and start Sphinx for you. Now we need to create a quick search form. This will eventually be a global site search, and not just a Post search. So we will create a new controller:</p>
<p style="padding-left: 30px;"><em>script/generate controller search</em></p>
<p>Then create a view at app/views/search/index.html.erb and place the form within it:<br />
Now in your new Search controller, create a new create action:</p>
<p style="padding-left: 30px;"><em>def create @posts = Post.search params[:search] end</em></p>
<p>Create your create view at app/views/search/create.html.erb with a bit of code to display your @posts in the usual way.</p>
<p>Note: We can even paginate our results using the WillPaginate plugin:</p>
<p style="padding-left: 30px;"><em>def create<br />
@posts = Post.search params[:search], :page =&gt; params[:page], :per_page =&gt; 10 end</em></p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/configure-sphinx-in-rails-application/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/configure-sphinx-in-rails-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Image-magick and rmagick for rails</title>
		<link>http://www.instacarma.com/blog/technical/install-image-magick-and-rmagick-for-rails/</link>
		<comments>http://www.instacarma.com/blog/technical/install-image-magick-and-rmagick-for-rails/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 10:49:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles and tutorials]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Install Image-magick]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rmagick]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1424</guid>
		<description><![CDATA[Filed under: Install Image-magick, rails, rmagick Start by removing any old versions previously installed via apt-get: sudo apt-get remove imagemagick Then update apt-get and install some supporting packages: sudo apt-get update *(sudo apt-get install libperl-dev gcc libjpeg62-dev libbz2-dev libtiff4-dev libwmf-dev libz-dev libpng12-dev libx11-dev libxt-dev libxext-dev libxml2-dev libfreetype6-dev liblcms1-dev libexif-dev perl libjasper-dev libltdl3-dev graphviz gs-gpl pkg-config)* [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/install-image-magick/'>Install Image-magick</a>, <a href='http://www.instacarma.com/blog/tag/rails/'>rails</a>, <a href='http://www.instacarma.com/blog/tag/rmagick/'>rmagick</a></p>
<p>Start by removing any old versions previously installed via apt-get:</p>
<p style="padding-left: 30px;"><em>sudo apt-get remove imagemagick</em></p>
<p>Then update apt-get and install some supporting packages:</p>
<p style="padding-left: 30px;"><em>sudo apt-get update</em></p>
<p style="padding-left: 30px;"><em>*(sudo apt-get install<br />
libperl-dev gcc libjpeg62-dev libbz2-dev<br />
libtiff4-dev libwmf-dev libz-dev libpng12-dev<br />
libx11-dev libxt-dev libxext-dev libxml2-dev<br />
libfreetype6-dev liblcms1-dev libexif-dev perl<br />
libjasper-dev libltdl3-dev graphviz gs-gpl pkg-config)*</em></p>
<p>*its a single line command.</p>
<p>get the Imagemagick package from this link:</p>
<p><em>http://www.imagemagick.org/script/install-source.php#unix</em></p>
<p>Once the source is downloaded, uncompress it:</p>
<p style="padding-left: 30px;"><em>tar -xzf ImageMagick.tar.gz</em></p>
<p>Now configure and make:</p>
<p style="padding-left: 30px;"><em>cd ImageMagick-6.5.0-0<br />
./configure<br />
sudo make<br />
sudo make install</em></p>
<p>Add the following line to ~/.bashrc:</p>
<p style="padding-left: 30px;"><em>export LD_LIBRARY_PATH=/usr/local/lib</em></p>
<p>Update: If you still get an error like the one above, try running ldconfig:</p>
<p style="padding-left: 30px;"><em>sudo ldconfig</em></p>
<p>You can confirm the install and available formats with:</p>
<p style="padding-left: 30px;"><em>identify -list format</em></p>
<p>Once Image magick is installed install rmagick gem by typing the command:</p>
<p style="padding-left: 30px;"><em>$sudo gem install rmagick</em></p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/install-image-magick-and-rmagick-for-rails/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/install-image-magick-and-rmagick-for-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RailsCarma &#8212; Partnership Opportunity</title>
		<link>http://www.instacarma.com/blog/company-updates/railscarma-partnership-opportunity/</link>
		<comments>http://www.instacarma.com/blog/company-updates/railscarma-partnership-opportunity/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 16:37:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Company Updates]]></category>
		<category><![CDATA[offshore]]></category>
		<category><![CDATA[outsourced]]></category>
		<category><![CDATA[partner]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1088</guid>
		<description><![CDATA[Filed under: offshore, outsourced, partner, rails, ruby As you all might be knowing, we had launched a new service offering under the brand name RailsCarma few weeks back. RailsCarma specializes in offshore Ruby On Rails Development. You can read more about it here. You can contact us at sales@railscarma.com for any of your Ruby On [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/offshore/'>offshore</a>, <a href='http://www.instacarma.com/blog/tag/outsourced/'>outsourced</a>, <a href='http://www.instacarma.com/blog/tag/partner/'>partner</a>, <a href='http://www.instacarma.com/blog/tag/rails/'>rails</a>, <a href='http://www.instacarma.com/blog/tag/ruby/'>ruby</a></p>
<p>As you all might be knowing, we had launched a new service offering under the brand name <a href="http://railscarma.com">RailsCarma</a> few weeks back.<br />
RailsCarma specializes in <strong>offshore Ruby On Rails Development</strong>. You can read more about it <a href="http://instacarma.com/blog/company-updates/railscarma-outsourced-ruby-on-rails-development/">here</a>.</p>
<p>You can contact us at sales@railscarma.com for any of your Ruby On Rails related needs. We can work out a deal on an hourly, monthly or on a per project basis.</p>
<p>Besides this, we are also offering a couple of partnership opportunities as given below : </p>
<p>A. <strong>White-label partnership</strong></p>
<p>RailsCarma services can be <strong>resold by you under your own brand</strong>. Through this initiative, we aim to make it possible for you to easily add Ruby on Rails web development, which has huge demand right now, to your portfolio of services. With our services and your user base, we can both profit.</p>
<p>B. <strong>Become an affiliate</strong></p>
<p>If anyone you know has any Ruby On Rails related requirements then you could forward them to us. We can work together on a <strong>profit sharing</strong> basis on such projects.</p>
<p>Let us know if you are interested or if you have any queries. </p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/company-updates/railscarma-partnership-opportunity/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/company-updates/railscarma-partnership-opportunity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RailsCarma &#8211; Outsourced Ruby On Rails Development</title>
		<link>http://www.instacarma.com/blog/company-updates/railscarma-outsourced-ruby-on-rails-development/</link>
		<comments>http://www.instacarma.com/blog/company-updates/railscarma-outsourced-ruby-on-rails-development/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 19:37:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Company Updates]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[railscarma]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1032</guid>
		<description><![CDATA[Filed under: rails, railscarma, ruby InstaCarma launched a new service offering under the brand name &#8216;RailsCarma&#8217; recently. RailsCarma (http://railscarma.com) specializes in Outsourced Ruby On Rails Development. With this venture we aim to provide an end-to-end solution which includes development, deployment, monitoring and management, including scaling support. We have been associated with the internet services industry [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/rails/'>rails</a>, <a href='http://www.instacarma.com/blog/tag/railscarma/'>railscarma</a>, <a href='http://www.instacarma.com/blog/tag/ruby/'>ruby</a></p>
<p> InstaCarma launched a new service offering under the brand  name &#8216;RailsCarma&#8217; recently. <a href="http://railscarma.com">RailsCarma</a> (http://railscarma.com) specializes in <strong>Outsourced Ruby On Rails Development</strong>. With this venture we aim to provide an  end-to-end solution which includes development, deployment,  monitoring and  management, including scaling support.</p>
<p>We have been associated with   the internet services industry for close to 7 years now, providing <strong>technical support </strong>and <strong>server management</strong> services to web hosting companies and datacenters across the globe. Having started providing support services to <strong>Ruby On Rails</strong> hosting companies way back in 2006 when it was the very beginning of RoR  which is now one of the most sought after web development platforms, it was a logical step for us to venture into this area.</p>
<p>One of our major turning points was hiring<strong> Neeraj Chowdhary</strong>, who now heads project delivery at our organization. Neeraj is one of the best in the industry with extensive experience in Ruby on Rails and agile development. He has been in this industry since the very beginning and his profile boasts of some extra-ordinary projects. Soon after he was hired we started receiving some great feedback from our projects and we knew we had a special thing going. We then went about integrating the development wing with our already established Ruby on Rails server management and support division, and this became <strong>RailsCarma</strong>.</p>
<p>We are looking forward to enter strategic partnerships with hosting and development companies.</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/company-updates/railscarma-outsourced-ruby-on-rails-development/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/company-updates/railscarma-outsourced-ruby-on-rails-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FastCGI : 500 internal server error</title>
		<link>http://www.instacarma.com/blog/technical/fastcgi-500-internal-server-error/</link>
		<comments>http://www.instacarma.com/blog/technical/fastcgi-500-internal-server-error/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 17:47:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[FastCGI]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=438</guid>
		<description><![CDATA[Filed under: error, FastCGI, rails, ruby Issue : The site was throwing up &#8217;500 internal server error&#8217; and the following error appeared in the apache error logs. FastCGI: incomplete headers (0 bytes) received from server &#8220;/home/httpd/vhosts/default/fcgi-bin/phpfcgi&#8221; Fix : If you are getting  this error then it means that no headers are being returned when a [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/error/'>error</a>, <a href='http://www.instacarma.com/blog/tag/fastcgi/'>FastCGI</a>, <a href='http://www.instacarma.com/blog/tag/rails/'>rails</a>, <a href='http://www.instacarma.com/blog/tag/ruby/'>ruby</a></p>
<p><strong>Issue :</strong></p>
<p>The site was throwing up &#8217;500 internal server error&#8217; and the following error appeared in the apache error logs.</p>
<p><em>FastCGI: incomplete headers (0 bytes) received from server &#8220;/home/httpd/vhosts/default/fcgi-bin/phpfcgi&#8221;</em></p>
<p><strong>Fix :</strong></p>
<p>If you are getting  this error then it means that no headers are being returned when a request gets through to dispatch.fcgi</p>
<p>Possible reasons (and solutions) for this error are:</p>
<p><strong>Session files are not configured correctly</strong> &#8211; This usually happens when moving between different server types. Delete the sessions in your <em>/tmp</em> folder. Execute the following command  and try again.</p>
<blockquote><p>killall -usr1 dispatch.fcgi</p></blockquote>
<p><strong>Missing AddHandler &#8211; </strong>The error occurs when the AddHandler given below is missing from httpd.conf AND and the user doesn&#8217;t have it in his app&#8217;s <em>.htaccess</em> either.</p>
<blockquote>
<pre>AddHandler fastcgi-script .fcgi</pre>
</blockquote>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/fastcgi-500-internal-server-error/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/fastcgi-500-internal-server-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error: SystemExit</title>
		<link>http://www.instacarma.com/blog/technical/error-systemexit/</link>
		<comments>http://www.instacarma.com/blog/technical/error-systemexit/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 17:38:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=431</guid>
		<description><![CDATA[Filed under: rails, ruby Error : SystemExit (Define INLINEDIR or HOME in your environment and try again): /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.7.0/lib/inline.rb:93:in `abort&#8217; Fix : Add the following line in the environment.rb file : ENV['HOME'] = &#8216;/home/username&#8217;]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/rails/'>rails</a>, <a href='http://www.instacarma.com/blog/tag/ruby/'>ruby</a></p>
<p><strong>Error : </strong></p>
<p>SystemExit (Define INLINEDIR or HOME in your environment and try again):<br />
/usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.7.0/lib/inline.rb:93:in `abort&#8217;</p>
<p><strong>Fix :</strong></p>
<p>Add the following line in the environment.rb file :</p>
<p>ENV['HOME'] = &#8216;/home/username&#8217;</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/error-systemexit/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/error-systemexit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problem with outdated RubyGems</title>
		<link>http://www.instacarma.com/blog/technical/problem-with-outdated-rubygems/</link>
		<comments>http://www.instacarma.com/blog/technical/problem-with-outdated-rubygems/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 14:30:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=404</guid>
		<description><![CDATA[Filed under: gems, rails, ruby Error : Rails requires RubyGems &#62;= 1.3.1 (you have 1.2.0). Please `gem update –system` and try again . Fix : As it is clear from the error message, updating the RubyGems will resolve this issue. Reinstall the ruby gems using the following commands: gem install rubygems-update update_rubygems]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/gems/'>gems</a>, <a href='http://www.instacarma.com/blog/tag/rails/'>rails</a>, <a href='http://www.instacarma.com/blog/tag/ruby/'>ruby</a></p>
<p><strong>Error :</strong></p>
<p><em>Rails requires RubyGems &gt;= 1.3.1 (you have 1.2.0). Please `gem update –system` and try again .</em></p>
<p><strong>Fix :</strong></p>
<p>As it is clear from the error message, updating the RubyGems will resolve this issue.<br />
Reinstall the ruby gems using the following commands:</p>
<blockquote><p>gem install rubygems-update<br />
update_rubygems</p></blockquote>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/problem-with-outdated-rubygems/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/problem-with-outdated-rubygems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error : Gem::SourceIndex#search</title>
		<link>http://www.instacarma.com/blog/technical/error-gemsourceindexsearch/</link>
		<comments>http://www.instacarma.com/blog/technical/error-gemsourceindexsearch/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 14:26:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=401</guid>
		<description><![CDATA[Filed under: gems, rails, ruby Error : boot.rb:20:Warning: Gem::SourceIndex#search support for String patterns is deprecated Fix : There is a call to Gem Source Index in  boot.rb: &#8216;Gem.cache.search&#8217; Just replace &#8216;search&#8217; with &#8216;find_name&#8217; . It should look something like this : rails_gem = Gem.cache.find_name(`rails&#8217;,&#8221;=#{rails_gem_version}.0&#8243;).sort_by { &#124;g&#124; g.version.version}.last]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/gems/'>gems</a>, <a href='http://www.instacarma.com/blog/tag/rails/'>rails</a>, <a href='http://www.instacarma.com/blog/tag/ruby/'>ruby</a></p>
<p><strong>Error :</strong></p>
<p><em>boot.rb:20:Warning: Gem::SourceIndex#search support for String<br />
patterns is deprecated<br />
</em><br />
<strong>Fix</strong> :</p>
<p>There is a call to <em>Gem Source Index</em> in  boot.rb:</p>
<p>&#8216;Gem.cache.search&#8217;</p>
<p>Just replace &#8216;search&#8217; with &#8216;find_name&#8217; .</p>
<p>It should look something like this :</p>
<p>rails_gem = Gem.cache.find_name(`rails&#8217;,&#8221;=#{rails_gem_version}.0&#8243;).sort_by { |g| g.version.version}.last</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/error-gemsourceindexsearch/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/error-gemsourceindexsearch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Oniguruma and textpow</title>
		<link>http://www.instacarma.com/blog/technical/installing-oniguruma-and-textpow/</link>
		<comments>http://www.instacarma.com/blog/technical/installing-oniguruma-and-textpow/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 01:25:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=395</guid>
		<description><![CDATA[Filed under: rails, ruby Issue : Sometimes, simply installing Oniguruma gem using gem install might not work well. Fix: To get around this , do the following : wget http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.9.1.tar.gz tar -zxvf onig-5.9.1.tar.gz cd onig-5.9.1 ./configure Now , you can install the gems using : gem install oniguruma gem install textpow]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/rails/'>rails</a>, <a href='http://www.instacarma.com/blog/tag/ruby/'>ruby</a></p>
<p><strong>Issue :</strong></p>
<p>Sometimes, simply installing <em>Oniguruma</em> gem using <em>gem install</em> might not work well.</p>
<p><strong>Fix: </strong></p>
<p>To get around this , do the following :</p>
<blockquote><p><code>wget http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.9.1.tar.gz<br />
tar -zxvf onig-5.9.1.tar.gz<br />
cd onig-5.9.1<br />
./configure<br />
</code></p></blockquote>
<p>Now , you can install the gems using :</p>
<blockquote><p><code>gem install oniguruma<br />
gem install textpow</code></p></blockquote>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/installing-oniguruma-and-textpow/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/installing-oniguruma-and-textpow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Action Mailer &#8211; Undefined method server_settings</title>
		<link>http://www.instacarma.com/blog/technical/action-mailer-undefined-method-server_settings/</link>
		<comments>http://www.instacarma.com/blog/technical/action-mailer-undefined-method-server_settings/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 01:18:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=393</guid>
		<description><![CDATA[ Action mailer – method_missing: undefined method server_settings= for ActionMailer::Base:Class (NoMethodError)
The error occurs because in  Rails 2.* server_settings has been replaced by smtp_settings.]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/rails/'>rails</a></p>
<p><strong>Error : </strong></p>
<p>Action mailer – method_missing: undefined method server_settings= for ActionMailer::Base:Class (NoMethodError)</p>
<p><strong>Fix :</strong></p>
<p>The error occurs because in  Rails 2.* <em>server_settings</em> has been replaced by <em>smtp_settings</em>.</p>
<p>Make the change in the <em>environment.rb</em> file and the issue should be fixed.</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/action-mailer-undefined-method-server_settings/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/action-mailer-undefined-method-server_settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phusion Passenger (a.k.a Mod_Rails)</title>
		<link>http://www.instacarma.com/blog/technical/phusion-passenger-aka-mod_rails/</link>
		<comments>http://www.instacarma.com/blog/technical/phusion-passenger-aka-mod_rails/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 16:32:39 +0000</pubDate>
		<dc:creator>Tech</dc:creator>
				<category><![CDATA[Articles and tutorials]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mongrel]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=182</guid>
		<description><![CDATA[Filed under: apache, mongrel, passenger, rails, ruby Have you ever come across a term called Mod_rails or passenger while visiting a ruby on rails site ? What is mod_rails ? Mod_rails is an Apache module that enables the Ruby on Rails application to work with Apache for delivering high performance. Various tests have proven that [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/mongrel/'>mongrel</a>, <a href='http://www.instacarma.com/blog/tag/passenger/'>passenger</a>, <a href='http://www.instacarma.com/blog/tag/rails/'>rails</a>, <a href='http://www.instacarma.com/blog/tag/ruby/'>ruby</a></p>
<p>Have you ever come across a term called <strong>Mod_rails</strong> or <strong>passenge</strong>r while visiting a ruby on rails site ?<br />
<strong><br />
What is mod_rails ?</strong></p>
<p>Mod_rails is an Apache module that enables the Ruby on Rails application to work with Apache for delivering high performance. Various tests have proven that passenger apps are faster,reliable and robust when compared to FastCGI/Mongrel served apps.</p>
<p><strong>How passenger apps provide higher performance than a Mongrel/FastCGI application ?</strong></p>
<p>Passenger with Ruby Enterprise edition is significantly better in terms of Virtual Memory Size and there by offers a much more stable performance than its competitors. Moreover passenger process get spawned only when a hit comes for a particular URL and it dies after a sometime.</p>
<p><strong>How to enable passenger of an application and how to restart it ?</strong></p>
<p>Its simple.. Just add the following code to the vhost settings of the domain</p>
<p>RailsBaseURI /</p>
<p>and for restarting passenger just create a file called restart.txt under the tmp directory of the application.. like this</p>
<blockquote><p>#[yourapp] touch tmp/restart.txt</p></blockquote>
<p>*    In the newer version of passenger the restart.txt file doesn&#8217;t get removed. Instead , the passenger checks the time stamp of the restart.txt and restarts automatically.</p>
<p><strong>Is Mod_rails a right choice for shared hosting environment ?</strong></p>
<p>YES, as we all know mod_rails instances die after a while , saves a lot of memory when compared to mongrel which stay running forever. Also, an improved architectural framework for passenger manages the VM utilization effectively.<br />
<strong><br />
Why Ruby Enterprise Edition for Passenger ?</strong></p>
<p>Ruby enterprise edition is a server oriented version of ruby interpreter and it has  advanced memory management features than ordinary Ruby interpreter.</p>
<p><strong>How Apache recognizes passenger ?</strong></p>
<p>We need to load the passenger module by manually including it in the Apache config file.</p>
<p>Add the following lines</p>
<blockquote><p>LoadModule passenger_module /opt/rubyenterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.1.3/ext/apache2/mod_passenger.so</p></blockquote>
<blockquote><p>PassengerRoot /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.1.3</p></blockquote>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/phusion-passenger-aka-mod_rails/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/phusion-passenger-aka-mod_rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

