Setup Ubuntu machine for Ruby on Rails with RVM-Mysql-Git-Curl-Java-Sublime Text 2 or Scite

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 )

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


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-″ 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 ……

Deploy Rails (Ruby on Rails )application…

Deploy Rails (Ruby on Rails )application from Windows with Heroku and Git.

1) First get Git and install it.

2) If Git has not set PATH , press window+break and in advance tab set path “C:\Program Files\Git\bin”

3) Restart you system

4) Now install gem Heroku

gem install heroku

5) Make application with rails “appplication”

6) Initialize git repo.

git init

7) Now, Create your application on Heroku

heroku create

This will ask you for heroku credentil email and password once you have given correct will save in heroku
credentil file. /heroku/credentil

If you have already created application on heroku please skip this step.

8) Now it’s time to push you application to Heroku

git push heroku master

9) Now Database on Heroku

heroku rake db:migrate

Hey , your creation is on ^

In case if you need to set your rsa key just type ssh-keygen -t rsa -C “email_address” it will generate rsa key for heroku.You can find in current user ~/.ssh folder.

Have fun !!!!!