Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Installing RVM and Creation of Gemsets Part 2

    • 0
    • 4
    • 4
    • 1
    • 0
    • 0
    • 0
    • 0
    • 257
    Comment on it

    In the last tutorial we learnt how to install RVM. In this one we will take one step further by creating Gemsets.

    Note - Gemsets are used to eliminate Gem clutter and version mismatches. Also by creating Gemsets we can install multiple versions of Gems for same version of Ruby (p.s. You can even install different versions of Rails for same version of Ruby).

    Back to theTestbed - Suppose we have Ruby 1.9.3 and Ruby 1.8.7 installed in our system. To switch to Ruby 1.9.3 we will use the below mentioned command in our terminal

    rvm 1.9.3
    

    This will switch to Ruby 1.9.3 Now we will create a new Gemset

    rvm gemset create test 
    

    This will create a new Gemset by the name of test which will be using Ruby 1.9.3. To use this Gemset use the command

    rvm 1.9.3@test
    

    This will switch you to the newly created Gemset. Now you can install whichever Gem you want pertaining to your requirements. You can install Rails and then create a new Gemset for the same ruby version and then again switch to the new Gemset and install a new version of Rails.

    Every Gemset is isolated from the other one so you need not care about managing Gems any further. Each Gemset will contain Gems which you will install for that particular Gemset.

    Isn't it cool?

    Now go on create some Gemsets and play around with various versions of Gems.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: