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 variou...
What is RVM?
 Command line tool that allows you to easily install,
manage and work with multiple ruby environments
 Its ...
Installing RVM
 Install RVM stable
curl -sSL https://get.rvm.io | bash -s stable
 Install RVM stable with ruby

curl -sS...
After successful install..
 Open a new shell and type
type rvm | head -n 1
Result: rvm is a function

 which ruby
 whic...
Common RVM commands
 List of installed ruby versions on your machine
rvm list
 To Install a particular version of ruby
r...
RVMRC
 There are 3 types of rvmrc files: system, user and project
 System rvmrc file at /etc/rvmrc is applied to all use...
RVMRC and Gemsets
 Project .rvmrc files are intended to be used to setup
your projects ruby environment when you switch t...
RVMRC and Gemsets
 To delete a gemset
rvm gemset delete my_project_name

 It’s a good practice to name the gemset with t...
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 ...
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@de...
Thanks and More
Resources
 http://cheat.errtheblog.com/s/rvm
 https://rvm.io/
 http://blog.arvidandersson.se/2011/11/29...
Upcoming SlideShare
Loading in …5
×

Rvm-notes

720 views

Published on

Notes on RVM

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
720
On SlideShare
0
From Embeds
0
Number of Embeds
181
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • It manages ruby application environments and enables switching between them
  • Rvm-notes

    1. 1. RVM ( Ruby enVironment Manager) --Sowjanya Mudunuri
    2. 2. 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
    3. 3. 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
    4. 4. 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 …
    5. 5. 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
    6. 6. 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
    7. 7. 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
    8. 8. 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?
    9. 9. 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
    10. 10. 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
    11. 11. 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
    12. 12. Thanks and More Resources  http://cheat.errtheblog.com/s/rvm  https://rvm.io/  http://blog.arvidandersson.se/2011/11/29/rvmtips

    ×