• Save
Upcoming SlideShare
Loading in...5




Notes on RVM

Notes on RVM



Total Views
Views on SlideShare
Embed Views



7 Embeds 98

https://sowju.herokuapp.com 56
http://localhost 31
https://www.facebook.com 5
http://www.linkedin.com 3
https://twitter.com 1
https://m.facebook.com&_=1390393813930 HTTP 1
https://m.facebook.com&_=1390397963980 HTTP 1



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • It manages ruby application environments and enables switching between them

Rvm-notes Rvm-notes Presentation Transcript

  • RVM ( Ruby enVironment Manager) --Sowjanya Mudunuri
  • Disclaimer  This is not an original content by me. I have used the official documentation from https://rvm.io/ and various other resources from the internet in order to compile notes for this presentation.  This Presentation is used to teach my friends and fellow ruby learners some knowledge about RVM
  • What is RVM?  Command line tool that allows you to easily install, manage and work with multiple ruby environments  Its Open source and the source code is at https://github.com/wayneeseguin/rvm  Lets you deploy each project with its self-contained environment from the specific version of ruby all the way down to all the required gems
  • Installing RVM  Install RVM stable curl -sSL https://get.rvm.io | bash -s stable  Install RVM stable with ruby curl -sSL https://get.rvm.io | bash -s stable –ruby  Install RVM stable with rails curl -sSL https://get.rvm.io | bash -s stable –rails  Installation will change you dotfiles. So keep an eye on that!!  Look at the logs from installation …
  • After successful install..  Open a new shell and type type rvm | head -n 1 Result: rvm is a function  which ruby  which rails  ruby –v  rails -v
  • Common RVM commands  List of installed ruby versions on your machine rvm list  To Install a particular version of ruby rvm install 1.9.2  Use an already installed version of ruby rvm use 1.9.2  Set a version of ruby as a default for new shells rvm use 1.9.2 --default
  • RVMRC  There are 3 types of rvmrc files: system, user and project  System rvmrc file at /etc/rvmrc is applied to all users on the system and is the first one loaded  User rvmrc file at $HOME/.rvmrc overwrites settings in system rvmrc file and applied to the user belonging to $HOME  System and User rvmrc files are meant to alter settings and behavior of RVM.  For Example to have RVM install rubies when used instead of only displaying a warning and exiting. rvm_install_on_use_flag=1
  • RVMRC and Gemsets  Project .rvmrc files are intended to be used to setup your projects ruby environment when you switch to the project root directory  Gemset: Is a separate directory with versions of various gems you are using  Create a gemset with rvm gemset create my_project_name  Try changing your ruby version and repeat it see what happens?
  • RVMRC and Gemsets  To delete a gemset rvm gemset delete my_project_name  It’s a good practice to name the gemset with the project you will be using for  List all the gemsets available rvm gemset list  Change the ruby version and list all the gemset available
  • RVMRC  To use a particular gemset rvm use ruby-2.1.0@desc_rvm  All the gems you install now using ‘gem install’ will be installed in this gemset directory  Try ‘gem env –help’  gem env gemdir  gem env gempath
  • Sample .rvmrc file rvm_install_on_use_flag=1 rvm_trust_rvmrcs_flag=1 rvm_gemset_create_on_use_flag=1 rvm use ruby-2.1.0@desc_rvm --create
  • Thanks and More Resources  http://cheat.errtheblog.com/s/rvm  https://rvm.io/  http://blog.arvidandersson.se/2011/11/29/rvmtips