How can i install ruby on rails in ubuntu

i am new to rails so please help me to install
ruby on rails to my ubuntu 9.10


You can read the instructions here:

  1. First, you need to install rubygems here

    Install rubygems instruction here:

  2. Then you can install rails. The instruction also here:

Good luck!

On 27 March 2010 23:10, Luan [email protected] wrote:

  1. Then you can install rails. The instruction also here:

Those are not particularly helpful as they are not ubuntu specific.
For example suggests gem
install rails when on Ubuntu it should be sudo gem install rails.

Google for ubuntu install ruby rails will I am sure give lots of hits.
I use this script to install it for use with apache and mysql. You
would have to tweak the folder names. Also check whether I am
fetching the latest version of rubygems, it may have been upgraded
since I used this last. Note that there are other solutions which
avoid apache and mysql but this is how I do it. Install apache and
mysql first, preferably (see below).

this derived from

bits for building stuff

sudo apt-get install build-essential

ruby and mysql stuff, this assumes that the lamp stack with mysql

has already been installed
sudo apt-get install ruby ri rdoc libmysql-ruby ruby1.8-dev irb1.8
libdbd-mysql-perl libdbi-perl libmysql-ruby1.8 libmysqlclient15off
libnet-daemon-perl libplrpc-perl libreadline-ruby1.8 libruby1.8
rdoc1.8 ri1.8 ruby1.8 irb libopenssl-ruby libopenssl-ruby1.8
wget -N -P /home/colinl/downloads
tar xvzf /home/colinl/downloads/rubygems-1.3.5.tgz
cd rubygems-1.3.5
sudo ruby setup.rb
cd …
rm -rf rubygems-1.3.5
echo " making symlinks - not sure if this will always be necessary,
must be done if gem -v does not work"
sudo ln -s /usr/bin/gem1.8 /usr/local/bin/gem
sudo ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby
sudo ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc
sudo ln -s /usr/bin/ri1.8 /usr/local/bin/ri
sudo ln -s /usr/bin/irb1.8 /usr/local/bin/irb

rails latest version

sudo gem install rails

any other versions needed

#sudo gem install rails --version 2.3.2

To install the lamp stack and mysql - preferably do this before
install ruby and rails

this installs the lamp stack, the ^ is important. See
sudo apt-get install lamp-server^
sudo apt-get install libapache2-mod-auth-mysql phpmyadmin
echo “"
echo “check server by http://localhost, should show ‘It Works’”
echo “to check php (or just go to phpmyadmin below):”
echo “gksudo gedit /var/www/testing.php and put <?php phpinfo(); ?> in
echo “restart apache, not sure why by sudo service apache2 restart
(possibly because php was installed after apache)”
echo “go to http://localhost/testing.php
echo “check phpmyadmin by http://localhost/phpmyadmin
echo “To allow access to ~/webpages edit
echo “Change Document Root and associated directory line from /var/www
to /home/colinl/websites”
echo “note that doc root has no trailing /, directory does. Then
restart apache”
echo "


If your Ubuntu is the 9.10, then
apt-get install rails


Best regards

On 28 March 2010 11:23, Castilho [email protected] wrote:

If your Ubuntu is the 9.10, then
apt-get install rails

That should be sudo apt-get install rails of course, but I thought
there were some issues installing from the ubuntu repository though I
don’t remember what.


Current version in Ubuntu repository is 2.2.3 which lags pretty much
behind official Rails repository (current stable release 2.3.5)

Regarding the original question, anyway you need some kind of Rails
tutorial and every one of them contains installation instructions.
Rails isn’t particularly difficult to install.

and I would strongly recommend RVM
Makes managing rubies and gems much easier.

I’m sorry I only have a French link to give you. But it’s a pretty
good one which saved my life last week. I’m sure you can translate it
with google.éveloppement-Ruby-On-Rails-sous-Ubuntu-8.10-/-9.0

At least you can follow the line of codes.

Good luck.

Le 27 mars 2010 à 23:41, sachiguns [email protected] a écrit :