<?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-8417933811034205854</id><updated>2026-04-10T16:57:04.844-07:00</updated><title type='text'>Ruby on Rails environment setup on Linux</title><subtitle type='html'>This blog will help the RoR newbies to setup their machine environment from netbeans to RVM installations under the same hood.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://setuprubyonrails.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8417933811034205854/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://setuprubyonrails.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nadeem Yasin</name><uri>http://www.blogger.com/profile/01572784650640133579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWtrbRWPH5UM9BU9dAq9mOcKAZM8aq0p9qPcrOv_y2-i1f0xtI7VxHFHsw_HKjHjVIP9y7pFxDY_puCfbY4VxOyY7Zv1lqLl3ZfxGgEp8fIWGV0Wf6RMSZU5aZlLmH_xU/s220/578463_10150818843251908_554371907_11994209_615028825_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8417933811034205854.post-6195941271095941057</id><published>2012-04-24T10:44:00.000-07:00</published><updated>2012-07-09T20:14:35.837-07:00</updated><title type='text'>Ruby on Rails environment setup on linux</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I have been looking around for a quite long time to find all the Ruby on Rails environment setup instructions for linux on a single page, so finally i decided to write a blog where all the things from Netbeans to RVM gemsets are available under the same hood.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we are going to setup:&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Appache2 server&lt;/li&gt;
&lt;li&gt;MySql&lt;/li&gt;
&lt;li&gt;Phpmyadmin&lt;/li&gt;
&lt;li&gt;RVM setup&lt;/li&gt;
&lt;li&gt;Installing Ruby&lt;/li&gt;
&lt;li&gt;Creating Gemset&lt;/li&gt;
&lt;li&gt;Installing Rails and some other gems&lt;/li&gt;
&lt;li&gt;Netbeens Installations&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
I have been using ubuntu 10.04, but will equally valid for higher versions&amp;nbsp;up till&amp;nbsp;11.10.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Lets Start&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Open the terminal, you can find it in, Applications -&amp;gt; Accessories -&amp;gt; Terminal&lt;/div&gt;
&lt;div&gt;
Copy each and every command from the rest of the page and paste it in the terminal, sequentially. In most of the commands, i have been using the word &quot;sudo&quot; which is require to install the desired packages with admin user rights.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;




















































Installing Appache2 server&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 42px; width: 100%;&quot;&gt;
&lt;div&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;sudo apt-get install apache2&lt;/span&gt;&lt;/div&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;sudo /etc/init.d/apache2 restart&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The first command will install the Appache2 server and second command will restart the server again to &amp;nbsp; work it normally. This command is not essential but we should do it being on safer side.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;




















































Installing MySql&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 63px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;sudo apt-get install mysql-server
&lt;/span&gt;&lt;br /&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;sudo /etc/init.d/mysql restart&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: white;&quot;&gt;sudo apt-get install libmysqlclient-dev&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now, the things are going to be self explanatory. The first command will install the server and the following one will restart it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To check the status of the MySql, issue the following command&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 21px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;sudo netstat -tap | grep mysql&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;




















































Installing Phpmyadmin&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 21px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;sudo apt-get install phpmyadmin&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now open the following file in any of your&amp;nbsp;favorite&amp;nbsp;text editor and put the following line. I will use vim.&lt;/div&gt;
&lt;div&gt;
&lt;i style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;Include /etc/phpmyadmin/apache.conf&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 21px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;vim&amp;nbsp;/etc/apache2/apache2.conf&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now, open you favorite browser and access the local host by hitting the url &quot;&lt;i&gt;&lt;span style=&quot;color: #999999;&quot;&gt;localhost/phpmyadmin&lt;/span&gt;&lt;/i&gt;&quot; If you get some error then try installing the phpmyadmin by using the following command and during installations, select the &quot;&lt;span style=&quot;color: #999999;&quot;&gt;&lt;i&gt;apache2&lt;/i&gt;&lt;/span&gt;&quot; from the option list and continue installations.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 21px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;sudo dpkg-reconfigure -plow phpmyadmin&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now, hit again the localhost, this time it will be working hopefully.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;




















































RVM setup&lt;/h3&gt;
&lt;div&gt;
Rvm is Ruby Version Management tool which widely used to setup different RoR environments on the same machine and allowing you to switch between different environments, depending upon projects, very easily. To read more about RVM, you can visit the &lt;a href=&quot;http://beginrescueend.com/rvm/install/&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; site where you can find much more stuff related to rvm.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
RVM require has some dependencies issues, so you need to first install some of the supporting libraries to install rvm and work it properly.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 42px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;sudo apt-get install build-essential
&lt;/span&gt;&lt;br /&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;sudo apt-get install zlib1g-dev libreadline-dev libssl-dev libxml2-dev&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There are some prerequisites&amp;nbsp;which you can easily install by issuing the following commands.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 21px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;sudo apt-get install curl git-core&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now install rvm:&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 42px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;bash -s stable &amp;lt; &amp;lt;(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now, close your shell/terminal and open a new one and run the following command.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 21px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;source ~/.profile&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;




















































Post Install Configuration:&lt;/h4&gt;
&lt;div&gt;
&lt;div&gt;
Put the following line at the very end of your .profile file.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 21px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;[[ -s &quot;$HOME/.rvm/scripts/rvm&quot; ]] &amp;amp;&amp;amp; . &quot;$HOME/.rvm/scripts/rvm&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Executes the following command, it will read and run the each command in the script:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 21px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;. &quot;$HOME/.rvm/scripts/rvm&quot;&lt;/span&gt;&lt;/div&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;
Open a new shell/terminal, and play around with rvm.&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;h3 style=&quot;text-align: left;&quot;&gt;




















































Install Ruby:&lt;/h3&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 63px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;rvm pkg install zlib
&lt;/span&gt;&lt;br /&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;rvm install 1.9.2
&lt;/span&gt;&lt;br /&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;rvm use 1.9.2&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You could have install any version of the ruby by replacing the &quot;1.9.2&quot; from the above command with you desired version.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;




















































Creating Gemsets&lt;/h3&gt;
&lt;div&gt;
Rvm provide a feature called gemset, it is a complete set of all the gems that we are using for a single application. With the help of these gemsets, we create&amp;nbsp;a separate and independent set of gems for each project and can switch around very easily depending upon the project. First of all create a gemset by:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 21px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;rvm gemset create rails3.1.3&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now, tells RVM to use this gemset with the mentioned version of ruby for our application by running the following command.&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 21px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;rvm use 1.9.2@rails3.1.3&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;




















































Installing Rails and Some other Gems&lt;/h3&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 21px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;gem install rails -v=&#39;3.1.3&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If you got some error like &quot;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;Uninitialized constant Gem&lt;/i&gt;&lt;/span&gt;&quot;, then run the following set of commands:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
If there is some error like Unintialized constant Gem, then:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 120px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;rvm package install zlib
&lt;/span&gt;&lt;br /&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;rvm remove 1.9.2
&lt;/span&gt;&lt;br /&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;rvm install 1.9.2 --with-zlib-dir=$rvm_path/usr
&lt;/span&gt;&lt;br /&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;rvm gemset create rails3.1.3
&lt;/span&gt;&lt;br /&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;rvm use 1.9.2@rails3.1.3
&lt;/span&gt;&lt;br /&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;gem install rails&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
If get the following error:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #990000; font-size: x-small;&quot;&gt;&lt;i&gt;&quot;ERROR: &amp;nbsp;While executing gem ... (Gem::DependencyError)&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #990000; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Unable to resolve dependencies: rails requires actionpack (= 3.1.3), activerecord (= 3.1.3), activeresource (= 3.1.3), actionmailer (= 3.1.3), railties (= 3.1.3); activesupport requires multi_json (~&amp;gt; 1.0)&quot;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
then:&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 42px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;gem update
&lt;/span&gt;&lt;br /&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;gem install rails -v=&#39;3.1.3&#39; --include-dependencies&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We have done with our installations, lets start our first app.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;

















































Netbeans Installation&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
To install netbeans, first you need to install JVM which you can install by issuing the following command.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 21px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;sudo apt-get install openjdk-6-jdk&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Then, Download the netbeans from the official site of netbeans which you can find &lt;a href=&quot;http://dlc.sun.com.edgesuite.net/netbeans/6.9/rc/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now go to the directory where the downloaded file and run the following command.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: darkslategrey; height: 42px; width: 100%;&quot;&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;cd path/to/netbean_downloaded_file
&lt;/span&gt;&lt;br /&gt;
:&lt;span style=&quot;color: #6aa84f;&quot;&gt;~/&lt;/span&gt;path/to/file&lt;span style=&quot;color: #6aa84f;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;sh netbeans-6.9rc2-ml-linux.sh&lt;/span&gt;&lt;/div&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;color: #a64d79; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: large;&quot;&gt;Congrats...!!!&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Your environment setup is complete. You can play around by creating the rails app. If you have any queries, then please let me know. All of your comments will be appreciated.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://setuprubyonrails.blogspot.com/feeds/6195941271095941057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://setuprubyonrails.blogspot.com/2012/04/ruby-on-rails-environment-setup-on.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8417933811034205854/posts/default/6195941271095941057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8417933811034205854/posts/default/6195941271095941057'/><link rel='alternate' type='text/html' href='http://setuprubyonrails.blogspot.com/2012/04/ruby-on-rails-environment-setup-on.html' title='Ruby on Rails environment setup on linux'/><author><name>Nadeem Yasin</name><uri>http://www.blogger.com/profile/01572784650640133579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWtrbRWPH5UM9BU9dAq9mOcKAZM8aq0p9qPcrOv_y2-i1f0xtI7VxHFHsw_HKjHjVIP9y7pFxDY_puCfbY4VxOyY7Zv1lqLl3ZfxGgEp8fIWGV0Wf6RMSZU5aZlLmH_xU/s220/578463_10150818843251908_554371907_11994209_615028825_n.jpg'/></author><thr:total>7</thr:total></entry></feed>