2

Is it possible to associate a project (that is the root directory of a ruby project) with a certain gemset? I thought that

rvm gemset use mytestgemset

would do that, but it is temporary and just exiting and entering again restores the original gemset.

I have set up a "test" gemset where i test new version of gems. I don't think i have to issue a rvm gemset use mytestgemset each time i launch my test application, do I?

AgostinoX
  • 7,477
  • 20
  • 77
  • 137
  • I think your question is related to this one: http://stackoverflow.com/questions/15708916/use-rvmrc-or-ruby-version-file-to-set-a-project-gemset-with-rvm - maybe these answers could help you. – Matthias May 03 '13 at 10:31

1 Answers1

4

In the directory of your Rails app add a file called .rvmrc with the text rvm gemset use mytestgemset in it.

When you cd into that directory rvm will notify you that it has switched the gemset in use. The first time you need to confirm, afterwards it will switch automatically.

mind.blank
  • 4,820
  • 3
  • 22
  • 49