Configure brand new Ubuntu machine for Rails
Step 1 – Install RVM
Prerequisite for RVM sudo apt-get install curl git-core
Run command in terminal bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
After installation update .bashrc is require
command >nano ~/.bashrc
Replace [ -z "$PS1" ] && return
with if [[ -n "$PS1" ]]; then
Also add following line of code at end of file
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
fi
Run bash -l in terminal.
Now rvm notes you can see rvm is working !
Install following packages before installing ruby via RVM
sudo apt-get install build-essential bison openssl libreadline5 libreadline-dev curl git-core zlib1g zlib1g-dev libssl-dev vim libsqlite3-0 libsqlite3-dev sqlite3 libreadline-dev libxml2-dev git-core subversion autoconf
After that rvm list known will display know ruby package choose your favorite !
Install using e.g rvm install 1.9.2
RVM Up and Running !!!!!!
Step 2 – Install Mysql
apt-get install mysql-server
Step 3 – Install GIT and Curl
Already installed as prerequisite.
Step 4 – Install Java
Can install Java using two methods
1st Method
sudo apt-cache search jdk
sudo apt-get install sun-java6-jdk sun-java6-jre
and set export JAVA_HOME=”/usr/lib/jvm/java-6-sun-1.6.0.06″ in your .bashrc file
2nd Method (Live installation)
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:sun-java-community-team/sun-java6
sudo apt-get update
sudo apt-get install sun-java6-jdk
System is ready with java, can check version with java –version in terminal
Step 5 – Install Sublime Text 2
Add Sublime Text 2 PPA using the following command
sudo add-apt-repository ppa:webupd8team/sublime-text-2
After run these commands in terminal
sudo apt-get update
sudo apt-get install sublime-text-2-beta
Step 6 – Install Scite
Run following command in terminal
sudo apt-get install scite
After this installations you are ready to enjoy rails ……