The version of Ruby I want to handle is old,
I have Gem installed individually.
When a gem's dependency gem is installed
Existing gems may be duplicated.
Switch while leaving both duplicate gems
I want to do it. Please professor.

  • Answer # 1

    If you want to switch between multiple installed versions of Gem,
    gem (gem_name, * version_requirements)-> boolis.

    For example, the latest version is usually called

    require "csv"
    p CSV :: VERSION #= >
    If you specify the version before


    require "rubygems"
    gem "csv", "3.1.7"
    require "csv"
    p CSV :: VERSION #= >
    It becomes