0

I have one machine which runs multiple standalone ruby scripts. Every time I have to upgrade some gem for one of the scripts, I have to look for its impact on other scripts as well. Do you think it will be a good practice to create one gemfile each for a ruby script or can someone recommend me a better way to maintain such system? I also sometimes want to use different versions of the same gem in different scripts.

sawa
  • 165,429
  • 45
  • 277
  • 381
Arpit Bansal
  • 75
  • 1
  • 5

2 Answers2

0

How about using RVM or RbEnv?

In this case, you will need to have each file in a separate folder with rvm/rbenv config.

  • Thanks for your answer Denyago. I have considered using rvm and was writing gemfile for each script. but writing it one for each was little cumbersome. Thanks again – Arpit Bansal Aug 02 '13 at 10:46
0

I create independent gemset for each project to be sure that all be ok with gems and it's versions. RVM gives all the tools to manage gemsets.

So you will need to create a separate folder for each script with its own .ruby-gemset in it.

freemanoid
  • 14,592
  • 6
  • 54
  • 77