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

    • 0
    • 3
    • 3
    • 1
    • 0
    • 0
    • 0
    • 0
    • 307
    Comment on it

    Installing RVM and creating Gemsets can be difficult at times. Frown not because in this tutorial we will learn the basics of installing RVM and in part 2 of the tutorial we will be creating Gemsets.

    Quick Revision

    RVM helps to manage multiple versions of Ruby on non Windows Environment.

    Coming back to the tutorial we need to install RVM

    Fire up the terminal or console and key in the following command

    \curl -sSL https://get.rvm.io | bash
    

    Note - There is a backslash before curl. This prevents misconfiguration if you have aliased it with configuration in your ~/.curlrc file.

    Be sure to follow any subsequent instructions as guided by the installation process.

    If successfully installed execute the following command to check if RVM is working or not

    rvm notes
    

    It shows system specific notes.

    In RVM jargon Rubies are essentially Ruby versions

    Now to install Ruby 1.9.3

    rvm install 1.9.3
    

    This command will install Ruby 1.9.3. To switch to this ruby version use

    rvm 1.9.3
    

    To check the ruby version

    ruby -v 
    

    This will show you the current ruby in use which will be off course the one we just installed i.e. Ruby 1.9.3 To set this as default

    rvm --default 1.9.3
    

    Now let's install another version of Ruby

    rvm install 1.8.7
    

    This will install Ruby version 1.8.7. You are now up and running with two Rubies!

    To switch between Ruby version simply use

    To switch to Ruby version 1.8.7

    rvm 1.8.7
    

    To switch to Ruby version 1.9.3

    rvm 1.9.3
    

    In the next tutorial we will learn how to create gemsets to enable seamless integration of various gems for same version of ruby and rails.

 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: