<?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>Dhaval Parikh &#187; rails on ubuntu</title>
	<atom:link href="http://blog.dhavalparikh.co.in/tag/rails-on-ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dhavalparikh.co.in</link>
	<description>Ruby on Rails, Stock Markets, Technology news and info - Its all about my passion</description>
	<lastBuildDate>Wed, 25 Jan 2012 07:06:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Deploy or Configure Rails on a Ubuntu Server</title>
		<link>http://blog.dhavalparikh.co.in/2009/09/deploy-or-configure-rails-on-a-ubuntu-server/</link>
		<comments>http://blog.dhavalparikh.co.in/2009/09/deploy-or-configure-rails-on-a-ubuntu-server/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 17:20:23 +0000</pubDate>
		<dc:creator>Dhaval Parikh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[configur rails on ubuntu]]></category>
		<category><![CDATA[deploy rails application]]></category>
		<category><![CDATA[rails + ubuntu + mysql + nginx]]></category>
		<category><![CDATA[rails on ubuntu]]></category>

		<guid isPermaLink="false">http://blog.dhavalparikh.co.in/?p=267</guid>
		<description><![CDATA[I have configured many servers till now on different OS. Like CentOs, Fedora and Ubuntu. From all the Operating systems Ubuntu is my favorite. The reason is its rails friendly according to me. Also Fedora is also good but I like Ubuntu more might be just bcoz I am more used to it Talking about [...]]]></description>
			<content:encoded><![CDATA[<p>I have configured many servers till now on different OS. Like CentOs, Fedora and Ubuntu. From all the Operating systems Ubuntu is my favorite. The reason is its rails friendly according to me. Also Fedora is also good but I like Ubuntu more might be just bcoz I am more used to it <img src='http://blog.dhavalparikh.co.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Talking about configuring rails app on an Ubuntu server takes following steps on a plain slice</p>
<p>1) Step 1 will be to install basic ruby gems and other packages</p>
<p>If its a blank slice you might also need to update ur repos using</p>
<p>apt-get update and aptitude install build-essential before u start installing ruby and other required libraries</p>
<p>sudo aptitude install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby sqlite3 libsqlite3-ruby1.8.</p>
<p>2) Create simlinks</p>
<p>sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby<br />
sudo ln -s /usr/bin/ri1.8 /usr/bin/ri<br />
sudo ln -s /usr/bin/rdoc1.8 /usr/bin/rdoc<br />
sudo ln -s /usr/bin/irb1.8 /usr/bin/irb</p>
<p>3) Install Ruby gems (Make sure you have the latest version from <a href="http://rubyforge.org/frs/?group_id=126" target="_blank" onclick="pageTracker._trackPageview('/outgoing/rubyforge.org/frs/?group_id=126&amp;referer=');">http://rubyforge.org/frs/?group_id=126</a></p>
<p>We will use the 1.3.2 version. Get the tar version from <a href="http://rubyforge.org/frs/download.php/55066/rubygems-1.3.2.tgz using wget http://rubyforge.org/frs/download.php/55066/rubygems-1.3.2.tgz" target="_blank" onclick="pageTracker._trackPageview('/outgoing/rubyforge.org/frs/download.php/55066/rubygems-1.3.2.tgz_using_wget_http_//rubyforge.org/frs/download.php/55066/rubygems-1.3.2.tgz?referer=');">http://rubyforge.org/frs/download.php/55066/rubygems-1.3.2.tgz using wget http://rubyforge.org/frs/download.php/55066/rubygems-1.3.2.tgz</a>.</p>
<p>Then do  tar xzvf rubygems-1.3.2.tgz</p>
<p>cd  rubygems-1.3.2</p>
<p>sudo ruby setup.rb (to install the setup)</p>
<p>then do simlink sudo ln -s /usr/bin/gem1.8 /usr/bin/gem</p>
<p>4) Then install rails (most important <img src='http://blog.dhavalparikh.co.in/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> )</p>
<p>gem install rails -v 2.2.2 (make sure u specify the version u want to install else it will install the latest one)</p>
<p>5) Next step will be database. I use MySql and so here is the procedure  for it</p>
<p>sudo aptitude install mysql-server mysql-client libmysqlclient15-dev</p>
<p>You will be prompted to enter password 2-3 times while the installation is on. Don&#8217;t forget to setup a password.</p>
<p>6) Then comes one important part which is mysql-ruby library. Most people forget this and then MySql don&#8217;t work for them.</p>
<p>sudo aptitude install libmysql-ruby1.8</p>
<p>I think that&#8217;s all for Ruby + Rails + Ruby gems + Mysql</p>
<p>7) Since you are using Ubuntu make sure u have installed all the essentials things using</p>
<p>aptitude install build-essential.</p>
<p>This will install cc, gcc and other core required libraries. which will help u in installing gems and configuring them. (if you haven&#8217;t done that before)</p>
<p>8 ) Like I said before you will now also require gem. And the most common one is ImageMagick and Rmagick you can install them using</p>
<p>sudo apt-get install imagemagick</p>
<p>sudo apt-get install libmagick9-dev</p>
<p>sudo gem install rmagick</p>
<p>These 3 steps works in most cases. If it doesn&#8217;t work for you let me know via comment and I shall help u in solving it. You may also visit my previously written blog post on <a href="http://blog.dhavalparikh.co.in/2008/02/rmagick-installation-on-ubuntu/" target="_blank">http://blog.dhavalparikh.co.in/2008/02/rmagick-installation-on-ubuntu/</a></p>
<p>9) Some other important ones are capistrano and git which u might require to install. Not covering them as of now.</p>
<p>10) You might also require nginx for webserver (I use Nginx so I am writing about it).</p>
<p>sudo aptitude install nginx</p>
<p>This will install nginx. For more information about nginx and its configuration you may visit my previous posts on</p>
<p><a href="http://blog.dhavalparikh.co.in/2008/11/nginx-configuration-expiry-headers-and-gzip-component-with-rails-nginxconf/" target="_blank">http://blog.dhavalparikh.co.in/2008/11/nginx-configuration-expiry-headers-and-gzip-component-with-rails-nginxconf/</a></p>
<p>That&#8217;s more than what you need to run a basic rails apps. But I think these are essentials for a good rails app deployment.</p>
<p>You can even read more about Mongrel Clustering with Nginx on my posts which could be again a part of server configuration</p>
<p><a href="http://blog.dhavalparikh.co.in/2008/11/mongrel-clustering-with-rails/" target="_blank">http://blog.dhavalparikh.co.in/2008/11/mongrel-clustering-with-rails/</a></p>
<p>I think thats all. If you have any doubts or problems write me a comment and I shall reply u ASAP.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dhavalparikh.co.in/2009/09/deploy-or-configure-rails-on-a-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

