Tuesday, 14 August 2012

Installing Ruby On Rails in Ubuntu 12.04 LTS


Hi,

The latest version of Ubuntu 12.04 was relaesed, Ubuntu 12.04 LTS (Long Term Support)

Installing Ruby On Rails is easy and cane be done using RVM.

Here are the simple steps for installation

1) Install CURL
> sudo apt-get install curl

2) Install GIT
> sudo apt-get install curl git-core

3) Install RVM and Dependencies
> curl -L get.rvm.io | bash -s stable

Once that’s done, we’re going to need to add a line to ~/.bashrc file (the file responsible for setting up our bash session) which will load RVM. Do this by running this command in the terminal:


echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc 

Then we’ll need to reload the ~/.bashrc file which we can do with this small command:

. ~/.bashrc



4) Then install additional dependencies specified by the RVM
> rvm requirements

The above command will list all the requirements.
> sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion

5) Installing Javascript Runtime
> sudo apt-get install nodejs

6) Install ruby
> rvm install 1.9.3
> ruby -v

Now it should display the ruby version that was installed in your system


7) Install Rails
> gem install rails


Now you are done with Installation of Ruby On Rails in your Ubuntu system. Now you can start creating rails application.


Help full links: RVM Installations - https://rvm.io/rvm/install/


Thank You,
Uma Mahesh.

No comments:

Post a Comment