Wednesday 6 July 2011

Install RVM on Ubuntu 10.04 & installing Rails with gemset


  • Installed RVM with multiple Rails version in fresh installation of Ubuntu 10.04
  • This tutorial is for single use only means not root (i.e. root@gloscon-desktop:~# ) 
step-0
open terminal by pressing Cltr+Altr+T OR
From menu Applications -> Accessories -> Terminal
step-1
$ apt-get install curl git-core build-essential zlib1g-dev libssl-dev libreadline5-dev
step-2
$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
OR
$ curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer ; chmod +x rvm-installer ; ./rvm-installer --version latest
OR
$ bash < <(curl -sk https://rvm.beginrescueend.com/install/rvm)
step-3
$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
step-4
restart terminal
OR
$ source .bash_profile
step-5
$ rvm | head -1
'rvm is a function'
step-6
// install Ruby 1.9.2
$ rvm install 1.9.2
$ ruby -v
step-7
// set Ruby 1.9.2 as default
$ rvm --default 1.9.2
step-8
$ gem install rails -v 3.0.3  // default rails for Ruby 1.9.2
$ rails -v
step-9
$ rvm install 1.8.7
// install Ruby 1.8.7
$ gem install rails -v 2.3.2    //default rails for Ruby 1.8.7
$ rails -v
For more about RVM with GEMSET
=> gemset is create separate workspace for different versions of rails will not conflict multiple rails versions and gems

// for gemset options by following command
$ rvm gemset  
$ rvm use 1.9.2

// following command create two gemset for Ruby 1.9.2
$ rvm gemset create rails222 rails126
$ rvm gemset use rails222

// Following command install rails 2.2.2 in gemset name rails222
$ gem install rails -v 2.2.2
$ rvm gemset use rails126

// Following command install rails 1.2.6 in gemset name rails126
$ gem install rails -v 1.2.6

// To display all gemsets as following command with all Ruby versions
$ rvm list gemsets

// To swap from one gemset to another with following command
//syntax $ rvm gemset use <gemset_name>
$ rvm gemset use rails222

// You can create & use gemset by following single commad
$ rvm use 1.9.2@demo --create
$ rvm gemset name

// To set gemset as default by following command
$ rvm use 1.9.2@demo --default

// Same for another Ruby as follow
$ rvm use 1.8.7

// following command create a gemset for Ruby 1.8.7
$ rvm gemset create rails122
$ rvm gemset use rails122

// Following command install rails 1.2.2 in gemset name rails122
$ gem install rails -v 1.2.2

// You can create & use gemset by following single commad
$ rvm use 1.8.7@demo --create

// To set gemset as default by following command
$ rvm use 1.8.7demo --default



Saturday 14 May 2011

May 2nd, 2011 Ruby on rails Conf.-2011, Baltimore USA




Baltimore’s Rails community has been eagerly anticipating RailsConf. They’ve organized a few different projects to welcome Rails programmers at beautiful city BALTIMORE.
RailsConf 2011 Features
  • Four entire days dedicated to Ruby on Rails

  • A program designed around all levels of expertise from beginner to intermediate to advanced

  • The most innovative and successful Rails experts and companies showcased onstage

  • A forum for people seeking to collaborate and solve similar problems

  • A gathering place for the worldwide Rails community, including an important network of experts, alpha geeks, and innovators

  • Hands-on and in-depth guides for learning how to best employ Rails in a variety of situations and tackle common problems

  • Ample opportunities for all participants to connect, contribute, and collaborate throughout the event

  • The chance to hear the latest updates, get information, and meet some of the the Rails core development team
       > Livestreaming the all of the keynote beginning Tue May 17

Ref. by from
http://en.oreilly.com/rails2011
http://en.oreilly.com/rails2011/public/schedule/stype/keynote

Thursday 31 March 2011

How to restart rails site after make changes on live site/server

        when you are using Phusion Passenger plugin & make change or add file, etc to live site by SVN or directly on server , you need to follow below steps after "up SVN" or changes on server to get changes on live site..
  
step-1 Go to you to web site's root directory.
               i.e. root@u15369819:/home/yoursite_name.com#


step-2 type command, ps.
               i.e. root@u15369819:/home/yoursite_name.com#ps

step-3  type command like, touch tmp/restart.txt. 
              i.e. root@u15369819:/home/yoursite_name.com# touch tmp/restart.txt

step-4 type command again, ps. 
             i.e.  root@u15369819:/home/public_html/yoursite_name.com#ps