Sunday, April 8, 2012

Setup RVM + Ruby + Rails + Gemset

Setup rvm  

  1. sudo apt-get install curl git-core
  2. copy/paste following lines in terminal
    bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
    echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc
    source ~/.bashrc
    type rvm | head -1
    rvm requirements
    Install rvm dependencies
    rvm list known

Install Ruby 

  1. ​rvm install 1.8.7
  2. rvm use 1.8.7 #Set 1.8.7 
  3. ruby -v #Check ruby version

Setup gemset 

  1. ​rvm gemset create project_name
  2. rvm 1.8.7@project_name
  3. gem install rails

Setup gemset for your project

  1. Go to your project directory
  2. rvm --rvmrc --create 1.8.7@project_name

No comments:

Post a Comment