How do I “activate” a different version of a particular gem?

后端 未结 4 616
我寻月下人不归
我寻月下人不归 2020-11-29 16:45

I want to switch between rails 2.3.10 as the \"active\" gem for my OS, so that I can invoke it at the command line.

Is it possible to do this? I\'m not using rvm. Ma

4条回答
  •  清歌不尽
    2020-11-29 17:21

    You can use RVM

    Then you can also use Bundler afterwards, which manages gem dependencies fine.

    In your Gemfile

    gem "rails", "2.3.10"
    

    and in your application

    require 'rubygems'
    require 'bundler/setup'
    

    and you're done.

提交回复
热议问题