Categories

Tuesday 25 June 2013

How to install Ruby on rails application on Ubuntu machine.


Hi All,

Below is the step by step installation procedure for ruby on rails on ubuntu 11.10 machine.

The packages needed for the installation of Ruby on rails on

    Ubuntu 11.10
    Ruby 1.92
    Rails 3.20
    Rubygems 1.8.15
    MySQL
    SQLite
    Git


1) First upgrade and update your system packages using the commands

"sudo apt-get upgrade
sudo apt-get update"

2)Install Ruby 1.9.2 , build-essential and git.

 Ubuntu provides several versions of Ruby. If you aren’t careful, you may end up installing older or even multiple versions. We want to install version 1.9.2 so we have the latest and greatest. For this, and other tasks ahead of us, we’ll also need build-essential as it has the developer tools that will be needed to compile various gems. Git is optional,

sudo apt-get install ruby1.9.2-full build-essential git-core

3)Install RubyGems 1.8.15

wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.15.tgz
tar -zxvf rubygems-1.8.15.tgz
cd rubygems-1.8.15
sudo ruby setup.rb

4)Update gems

sudo gem update --system
sudo gem install rubygems-update
sudo update_rubygem


5)Install the remaining some packages using the below commands


As rubygems  is installed we have to install rails on the machine now



sudo gem install rails
sudo apt-get install libsqlite3-dev
sudo gem install sqlite3
sudo apt-get install nodejs
sudo apt-get install mysql-server mysql-client
sudo apt-get install libmysql-ruby libmysqlclient-dev
sudo gem install mysql


6)Test the application

You should now have a working Ruby on Rails environment

to test it out


cd ~/
rails new app_of_the_century
cd app_of_the_century
rails generate model User


If you installation worked, Rails should create your application file/folder structure and generate a User model all without a single error.




Reference :http://www.brandedclever.com/the-perfect-rails-install-on-ubuntu-11-10/




No comments:

Post a Comment

Ad