When changing into Rails folder, have rvm pick ruby and gemset?

后端 未结 7 655
情话喂你
情话喂你 2020-12-28 13:21

For my different Rails folders, I would like to have rvm automatically load the correct gemset when running anything from \'bundle install\' to doing my \'autotest\' or rail

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-28 13:49

    Create a .rvmrc file in your rails directory, and rvm will automatically load it. An example .rvmrc that loads Ruby 1.9.2 and a gemset named "rails3":

    .rvmrc

    rvm 1.9.2@rails3
    

    You can do a lot more too, described in detail here: https://rvm.io/workflow/rvmrc/

提交回复
热议问题